
{"id":126,"date":"2014-05-02T23:01:23","date_gmt":"2014-05-02T21:01:23","guid":{"rendered":"http:\/\/remchp.com\/blog\/?p=126"},"modified":"2017-02-16T17:56:06","modified_gmt":"2017-02-16T15:56:06","slug":"simple-crackme-with-radare2","status":"publish","type":"post","link":"https:\/\/futex.re\/blog\/?p=126","title":{"rendered":"Simple crackme with Radare2"},"content":{"rendered":"<p><a href=\"http:\/\/dustri.org\/\" title=\"dustri\">Jvoisin<\/a> and <a href=\"http:\/\/maijin.fr\/\" title=\"maijin\">Maijin<\/a>, a members of my hackerspace <a href=\"http:\/\/www.hackgyver.org\/\" title=\"hackerspace\">(Hackgyver)<\/a> always talk to me about <a href=\"http:\/\/radare.org\/\" title=\"radare2\">Radare<\/a>, a new reverse engineering open source framework which they are working on.<\/p>\n<p>So i want to try it on a very simple Linux crackme.<\/p>\n<p>Classic and easy install, download it to the <a href=\"https:\/\/github.com\/radare\/radare2\" title=\"git\">git<\/a>, configure, make and make install.<\/p>\n<p>The condemned binary&#8217;s called &#8220;Easy_ELF&#8221;<\/p>\n<p>Start to see who is it<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/rabin2.jpg\" alt=\"rabin2\" \/><\/p>\n<p>Sections:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/Sections.jpg\" alt=\"sections\" \/><\/p>\n<p>I want to see it&#8217;s strings.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/strings.jpg\" alt=\"strings\" \/><\/p>\n<p>We have the good and bad boy and they offset \ud83d\ude42<\/p>\n<p>Try to launch the crackme:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/launch.jpg\" alt=\"launch\" \/><\/p>\n<p>Ok, we can start static analysis, disassemble the 15 first lines<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/start.jpg\" alt=\"start\" \/><\/p>\n<p>We arrive to the start function and we can see the main function start at 0x804851b.<\/p>\n<p>Show the 30 first lines of the main function<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/begin.jpg\" alt=\"begin\" \/><\/p>\n<p>We assumed the password check function is at 0x8048451<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/check1.jpg\" alt=\"check1\" \/><\/p>\n<p>The first cmp compare the second letter of the pass with 0x31, an the fifth with 0x58. <\/p>\n<p>All other characters is just xored.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/xor.jpg\" alt=\"xor\" \/><\/p>\n<p>We have 0x4C 0x31 0x4E 0x55 0x58<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/rax.jpg\" alt=\"rax\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/05\/result.jpg\" alt=\"result\" \/><\/p>\n<p>\\o\/<\/p>\n<p>Radare support many architectures arm,x86, x86-64, gameboy, mips, sparc,&#8230; and many type of files, dex, bios, elf, PE, COFF. Radare team make a great work!<\/p>\n<p>So, i have try 1% of all Radare possibility the 99% others is here:<\/p>\n<p><a href=\"http:\/\/radare.org\" title=\"radare\">Official web site<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/Maijin\/radare2book\/tree\/master\/refcard\" title=\"Documentation\">Documentation<\/a><\/p>\n<p><a href=\"http:\/\/theevilbit.blogspot.fr\/2014\/03\/radare2-reverse-engineering-framework.html\" title=\"rasm\">rasm<\/a><\/p>\n<p><a href=\"http:\/\/dustri.org\/b\/defeating-crackme03.html\" title=\"crackme\">other crackme<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jvoisin and Maijin, a members of my hackerspace (Hackgyver) always talk to me about Radare, a new reverse engineering open source framework which they are working on. So i want to try it on a very simple Linux crackme. Classic &hellip; <a href=\"https:\/\/futex.re\/blog\/?p=126\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/126"}],"collection":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=126"}],"version-history":[{"count":27,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/126\/revisions"}],"predecessor-version":[{"id":224,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/126\/revisions\/224"}],"wp:attachment":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}