{"id":155,"date":"2021-10-10T20:58:07","date_gmt":"2021-10-10T18:58:07","guid":{"rendered":"https:\/\/areyou1or0.it\/?p=155"},"modified":"2021-10-10T21:15:45","modified_gmt":"2021-10-10T19:15:45","slug":"slae64-assignment-7-cryptor","status":"publish","type":"post","link":"https:\/\/areyou1or0.it\/index.php\/2021\/10\/10\/slae64-assignment-7-cryptor\/","title":{"rendered":"SLAE64: Assignment 7 &#8211; Cryptor"},"content":{"rendered":"\n<p>This blog post has been created for completing the requirements of the SecurityTube Linux Assembly Expert (SLAE64) certification:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.pentesteracademy.com\/course?id=7\">https:\/\/www.pentesteracademy.com\/course?id=7<\/a><\/p>\n\n\n\n<p>Student-ID:&nbsp;<strong>PA-15847<\/strong><\/p>\n\n\n\n<p>The Objectives for the Assignment:<\/p>\n\n\n\n<p><strong><code>- create a custom crypter<br>- free to use any existing encryption schema<br>- can use any programming language<\/code><\/strong><\/p>\n\n\n\n<p>We&#8217;ll use the following encryption script for this assignment:<\/p>\n\n\n\n<p>I used the following encoder for this purpose: <\/p>\n\n\n\n<p>https:\/\/github.com\/kokke\/tiny-AES128-C <\/p>\n\n\n\n<p>I used the Execve Shellcode as we wrote during the course:<\/p>\n\n\n\n<p><code>\"\\xeb\\x1d\\x48\\x31\\xc0\\x5f\\x88\\x67\\x07\\x48\\x89\\x7f\\x08\\x48\\x89\\x47\\x10\\x48\\x8d\\x77\\x08\\x48\\x8d\\x57\\x10\\x48\\x83\\xc0\\x3b\\x0f\\x05\\xe8\\xde\\xff\\xff\\xff\\x2f\\x62\\x69\\x6e\\x2f\\x73\\x68\\x41\\x42\\x42\\x42\\x42\\x42\\x42\\x42\\x43\\x43\\x43\\x43\\x43\\x43\\x43\\x43\";<\/code><\/p>\n\n\n\n<p>We&#8217;ll compile the file:<\/p>\n\n\n\n<p><code>gcc assignment7-crypter.c -o assignment7-crypter<\/code><\/p>\n\n\n\n<p>And then run the crypter file to have the encoded shellcode:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/areyou1or0\/SLAE64\/blob\/main\/assignment7-crypter.c\">https:\/\/github.com\/areyou1or0\/SLAE64\/blob\/main\/assignment7-crypter.c<\/a><\/p>\n\n\n\n<p>Then we&#8217;ll run the following decoder to get the same decoded shellcode<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/areyou1or0\/SLAE64\/blob\/main\/assignment7-decrypter.c\">https:\/\/github.com\/areyou1or0\/SLAE64\/blob\/main\/assignment7-decrypter.c<\/a><\/p>\n\n\n\n<p>Here&#8217;s the command for the compilation:<\/p>\n\n\n\n<p><code>gcc assignment7-decrypter.c assignment7-aes.c -o decrypter -fno-stack-protector -z execstack<\/code><\/p>\n\n\n\n<p>This will give us the original shellcode back.<\/p>\n\n\n\n<p>So this was the last assignment of the SLAE64 course. Hope you enjoyed them as much as I did \ud83d\ude42 <\/p>\n\n\n\n<p>You can find the sourcecode in my Github repository:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/areyou1or0\/SLAE64\">https:\/\/github.com\/areyou1or0\/SLAE64<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post has been created for completing the requirements of the SecurityTube Linux Assembly Expert (SLAE64) certification: https:\/\/www.pentesteracademy.com\/course?id=7 Student-ID:&nbsp;PA-15847 The Objectives for the Assignment: &#8211; create a custom crypter- free to use any existing encryption schema- can use any programming language We&#8217;ll use the following encryption script for this assignment: I used the following&hellip; <a class=\"more-link\" href=\"https:\/\/areyou1or0.it\/index.php\/2021\/10\/10\/slae64-assignment-7-cryptor\/\">Continue reading <span class=\"screen-reader-text\">SLAE64: Assignment 7 &#8211; Cryptor<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/posts\/155"}],"collection":[{"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":2,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/posts\/155\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/areyou1or0.it\/index.php\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}