{"id":10186,"date":"2013-12-10T09:00:48","date_gmt":"2013-12-10T08:00:48","guid":{"rendered":"https:\/\/www.corelan.be\/?p=10186"},"modified":"2013-12-10T09:00:48","modified_gmt":"2013-12-10T08:00:48","slug":"using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity","status":"publish","type":"post","link":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/","title":{"rendered":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>Last weekend I had some time so I wanted to have a look at a reversing challenge which you can find here: <\/p>\n<p><a href=\"https:\/\/www.ethicalhacker.net\/features\/special-events\/reverse-engineering-101-newbie-contest-webcast-elearnsecurity\">https:\/\/www.ethicalhacker.net\/features\/special-events\/reverse-engineering-101-newbie-contest-webcast-elearnsecurity<\/a><\/p>\n<h3>Reverse Engineering 101 Contest Steps<\/h3>\n<ol>\n<li>Get the exe to be hacked<\/li>\n<li>Break it open and start exploring.<\/li>\n<li>The only rule for the challenge is that it has to be solved by creating a valid key file named eLearnSecurity.dat. No patching is allowed! Test your dat file using the exe. <\/li>\n<\/ol>\n<p>Download the exe here: https:\/\/www.ethicalhacker.net\/i\/features\/specialevents\/els_re_2013\/elearnsecurity_eh-net_re_challenge2013.7z<\/p>\n<p><b><\/b><\/p>\n<h3>Static analysis with IDA<\/h3>\n<p>A big giveaway is the following rule:<\/p>\n<p>\u201cThe only rule for the challenge is that it has to be solved by creating a valid key file named <b>eLearnSecurity.dat<\/b>\u201d.<\/p>\n<p>That means the binary is reading that file sooner or later. So let\u2019s open the binary in IDA and check the imports. Maybe we find something like ReadFile.<\/p>\n<p><b><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic11.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic1\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic1\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png\" width=\"640\" height=\"384\" \/><\/a><\/b><\/p>\n<p>So here the binary reads the file:<\/p>\n<p><b><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic21.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic2\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic2\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic2_thumb1.png\" width=\"640\" height=\"363\" \/><\/a><\/b><\/p>\n<p>We also can see that after the function <b>GetFileSize<\/b> there\u2019s a compare against 10h which means, the size of the file is 10h = 16 bytes.<\/p>\n<p>Scrolling down a little bit we can find the crypto algorithm right after reading the file:<\/p>\n<p><b><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic31.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic3\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic3\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic3_thumb1.png\" width=\"640\" height=\"384\" \/><\/a><\/b><\/p>\n<p>Since ESI points to the buffer where the file was written in memory, the file should contain 4 dwords like this:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">dword1dword2dword3dword4 <\/pre>\n<p>which is represented in memory by this buffer:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">[ESI][ESI+4][ESI+8][ESI+C]<\/pre>\n<p>So the algorithm is:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">dword4 ^ dword3 ^ dword2 ^ dword1 ^ key1 ^ key2 ^ key3 ^ key4 ^ key5 == 4C833425<\/pre>\n<p>From now on it\u2019s pure mathematics and some fiddling\u2026\u2026\u2026\u2026..<\/p>\n<p>We can influence dword1 to dword4, key1 to key5 are computed at compile time, run time or whatever. We don\u2019t have to care about that at the moment (getting back to key5 soon!) since they are constant for each run of the program, that means <b>key1 ^ key2 ^ key3 ^ key4 ^ key5<\/b><b> <\/b>is a constant value for each run of the binary. <\/p>\n<p>And this means the following:<\/p>\n<p><b><\/b><\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">dword4 ^ dword3 ^ dword2 ^ dword1 ^ const_Value == 4C833425<\/pre>\n<p><b><\/b><\/p>\n<p>So we only need to know the value of <b>const_Value <\/b>at runtime! <\/p>\n<p>But how to get it? <\/p>\n<p>Well, the check is done here after the crypto algorithm:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">.text:0x004014D9 cmp ecx, 0x4C833425 <\/pre>\n<p>where<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">ecx = dword4 ^ dword3 ^ dword2 ^ dword1 ^ const_Value<\/pre>\n<p>We know: A ^ 0 = A<\/p>\n<p>So if we provide a file with only null bytes then at the time the compare happens we will have in ecx:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">ecx = 0 ^ 0 ^ 0 ^ 0 ^ const_Value = const_Value <\/pre>\n<p>So we just have to provide a file containing only null bytes, start the binary in a debugger, set a breakpoint at that compare, and check what\u2019s in ecx, right?<\/p>\n<p>Well, it\u2019s not that easy here as we will see soon! But anyway, as an exercise let\u2019s try that out...<\/p>\n<p><b><\/b><\/p>\n<h3><b>Dynamic analysis with Immunity<\/b><\/h3>\n<p>Starting the binary in a debugger, you are landing here:<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic4.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic4\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic4\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic4_thumb.png\" width=\"640\" height=\"403\" \/><\/a><\/p>\n<p>Unfortunately it\u2019s horrible to step through the binary since there is a fair amount of anti-debug techniques in place, like this one:<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic5.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic5\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic5\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic5_thumb.png\" width=\"640\" height=\"269\" \/><\/a><\/p>\n<p>Of course, we can set a BP on the exception handler, and continue stepping through the binary. But we don\u2019t want to lose time on anti-debugging. So let\u2019s search for the ReadFile API:<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic6.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic6\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic6\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic6_thumb.png\" width=\"640\" height=\"251\" \/><\/a><\/p>\n<p>Double-click on the first ReadFile entry:<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic7.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic7\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic7\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic7_thumb.png\" width=\"640\" height=\"309\" \/><\/a><\/p>\n<p>Ok, what now??? Because we never get here when running the binary in a debugger due to anti-debug stuff, I suggest to place instructions for an infinite loop here (EB FE), to run the binary and then to attach a debugger to it.<\/p>\n<p>Here are the steps:<\/p>\n<h4>[*] Patch the binary with an infinite loop:<\/h4>\n<p>CTRL-E, write down the original bytes which we are changing now (85 C0) to EB FE:<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic8.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic8\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic8\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic8_thumb.png\" width=\"640\" height=\"328\" \/><\/a><\/p>\n<h4>[*] Then save the patched file:<\/h4>\n<ol>\n<li>Copy to executable -&gt; all modifications<\/li>\n<li>Save file: \u201celearnsecurity_eh-net_re_challenge2013_patched.exe\u201d<\/li>\n<\/ol>\n<h4>[*] Now run the patched binary and attach a debugger to its process: <\/h4>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic9.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic9\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic9\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic9_thumb.png\" width=\"640\" height=\"200\" \/><\/a><\/p>\n<p><b><font color=\"#ff0000\">Important: wait around 10 \u2013 15 seconds before attaching the debugger \u2026..the anti-debugging stuff is running now\u2026\u2026<\/font><\/b><\/p>\n<h4>[*] Then start ImmunityDebugger or OllyDbg, attach to the process, press F9 to start and then press F12 to pause the application:<\/h4>\n<p>-&gt; you land our our loop (EB FE):<\/p>\n<h4>[*] Set a BP here (F2) and restore the original bytes :<\/h4>\n<p><a class=\"thickbox\" href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic10.png\"><img loading=\"lazy\" decoding=\"async\" title=\"pic10\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"pic10\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic10_thumb.png\" width=\"640\" height=\"373\" \/><\/a><\/p>\n<h4>[*] Now we can step through the crypto algorithm (F8) till the compare instruction:<\/h4>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic11.jpg\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic11\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic11\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic11_thumb.jpg\" width=\"640\" height=\"208\" \/><\/a><\/p>\n<p>So here is ECX = A50DA5E3.<\/p>\n<p>But I\u2019m sorry, this is worth nothing since <b><font color=\"#ff0000\">key5<\/font><\/b> \u2013 the value at <b>DWORD PTR DS:[41B2C4] -<\/b> is generated by some kind of checksum during runtime. If you patch the binary its value is different. Ouch. So if we change even more bytes in the same routine in that binary we receive<\/p>\n<p>ECX = 2AF4A100.<\/p>\n<p>What now?<\/p>\n<p>Well, checking the rules again we recognize: <b>no patching is allowed! <\/b><\/p>\n<p>So anyway we are not allowed to patch the binary therefore we need to find another way to solve it \u2013 DBI to the rescue !!!<\/p>\n<h3>Analyzing with DBI (PIN)<\/h3>\n<p>I then wrote a small PIN Tool which traces all compare instructions and logs the values of ECX into a logfile.<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">pin \u2013t PINtrace_INS.dll -- E:\\work\\elearnsecurity_eh-net_re_challenge2013\\elearnsecurity_eh-net_re_challenge2013.exe<\/pre>\n<p>(you can find the source code for the pin tool at the bottom of this post)<\/p>\n<p>The logfile will look like this:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">0x00406F8A cmp ecx, dword ptr [0x41a1a0] ECX:0x0041A0C8\n0x00406F8A cmp ecx, dword ptr [0x41a1a0] ECX:0x0041A0C8\n0x00406F8A cmp ecx, dword ptr [0x41a1a0] ECX:0x0041A0C8\n0x00411BA4 cmp ecx, eax ECX:0x0018F70C\n0x004041D4 cmp ecx, dword ptr [0x419680] ECX:0x6C6DFEF0\n0x00406F8A cmp ecx, dword ptr [0x41a1a0] ECX:0x0041A0C8\n0x00407012 cmp ecx, ebx ECX:0x000000FF\nx00407012 cmp ecx, ebx ECX:0x000000FE\n0x00407012 cmp ecx, ebx ECX:0x000000FD\n0x00407012 cmp ecx, ebx ECX:0x000000FC\n0x00407012 cmp ecx, ebx ECX:0x000000FB\n0x00407012 cmp ecx, ebx ECX:0x000000FA\n.\n.\n.<\/pre>\n<p>Almost at the end of the logfile we find the result for the important compare instruction:<\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">0x004014D9 cmp ecx, 0x4c833425 ECX:0xCF6FC79D <\/pre>\n<p>Note: ECX is different than in our analysis with ImmunityDebugger.<\/p>\n<p>So this means:<\/p>\n<p><b>const_Value <\/b><b>= <\/b>0xCF6FC79D<\/p>\n<p>-&gt; <strong>dword4 ^ dword3 ^ dword2 ^ dword1 ^ 0xCF6FC79D = 0x4C833425<\/strong><\/p>\n<p>-&gt; <b>dword4 ^ dword3 ^ dword2 ^ dword1 = 0x83ECF3B8 <\/b><\/p>\n<p>(0xCF6FC79D ^ 0x4C833425 = 0x83ECF3B8)<\/p>\n<p>If we deliberately choose <\/p>\n<p><b>dword1= 0<\/b>, <b>dword2 = 0<\/b>, <b>dword3 = 0<\/b><\/p>\n<p>then <\/p>\n<p><b><font color=\"#ff0000\">dword4 = 0x83ECF3B8<\/font><\/b><b><\/b><\/p>\n<p>Ok, let\u2019s construct the appropriate dat-file with our favorite hex editor (mind the little endian nuisance):<\/p>\n<p><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic12.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic12\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic12\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic12_thumb.png\" width=\"640\" height=\"165\" \/><\/a><\/p>\n<p>Run the binary and voila:<\/p>\n<p><b><a href=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic13.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" title=\"pic13\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 7px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"pic13\" src=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic13_thumb.png\" width=\"640\" height=\"221\" \/><\/a><\/b><\/p>\n<p><b><\/b><\/p>\n<h3>Conclusion<\/h3>\n<p>If you spend enough time you could solve this challenge by pure reversing but sometimes it\u2019s just pita, especially when heavy anti-debugging techniques are at work.<\/p>\n<p>Sometimes you just need a small piece of information out of the runtime context. Here DBI is really the best solution. DBI or Dynamic Binary Instrumentation (note: it doesn\u2019t mean \u201cDull But Important\u201d) is an easy and fast way to overcome reversing barriers like anti-debugging techniques or other obstacles. Other typical usage examples are taint analysis, tracing, unpacking code, examining memory or registers, fuzzing, capturing code, and so on. So my recommendation to each reverser is: please have a look at DBI.<\/p>\n<h3>Thanks !<\/h3>\n<p>My big thanks go to Peter (corelanc0d3r) for giving me the insight of DBI. Also I\u2019d like to thank Carlos (m0n0sapiens) for teaching RE to the world. You are both great guys I appreciate very much!!<\/p>\n<p>Fancy<\/p>\n<hr \/>\n<h3>Source code<\/h3>\n<p><b><u>PIN_trace.cpp:<\/u><\/b><\/p>\n<pre style=\"overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 650px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #191919\">#include &lt;iostream&gt;\n#include &lt;fstream&gt;\n#include &lt;sstream&gt;\n#include &quot;<span style=\"color: #8b0000\">pin.H<\/span>&quot;\n#include &lt;stdio.h&gt;\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Global Variables *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\nstd::ofstream TraceFile;\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Commandline Switches *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\nKNOB&lt;<span style=\"color: #0000ff\">string<\/span>&gt; KnobOutputFile(KNOB_MODE_WRITEONCE, &quot;<span style=\"color: #8b0000\">pintool<\/span>&quot;, &quot;<span style=\"color: #8b0000\">o<\/span>&quot;, &quot;<span style=\"color: #8b0000\">trace.out<\/span>&quot;, &quot;<span style=\"color: #8b0000\">specify trace file name<\/span>&quot;);\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Print Help Message *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n\nINT32 Usage()\n{\ncerr &lt;&lt;\n&quot;<span style=\"color: #8b0000\">This tool logs instructions and register values\\n<\/span>&quot;\n&quot;<span style=\"color: #8b0000\">which you can determine in the source code.\\n<\/span>&quot;\n&quot;<span style=\"color: #8b0000\">\\n<\/span>&quot;;\ncerr &lt;&lt; KNOB_BASE::StringKnobSummary();\ncerr &lt;&lt; endl;\n<span style=\"color: #0000ff\">return<\/span> -1;\n}\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Logging function *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n\nVOID logCall(<span style=\"color: #0000ff\">const<\/span> <span style=\"color: #0000ff\">string<\/span> *s, CONTEXT * ctxt)\n{\nADDRINT EIP = (ADDRINT)PIN_GetContextReg(ctxt, REG_INST_PTR);\nADDRINT ECX = (ADDRINT)PIN_GetContextReg(ctxt, REG_ECX);\n<span style=\"color: #0000ff\">char<\/span> ss [14]; <span style=\"color: #008000\">\/\/ EIP<\/span>\nsprintf (ss, &quot;<span style=\"color: #8b0000\">0x%p \\n<\/span>&quot;,EIP);\n<span style=\"color: #0000ff\">char<\/span> sp [14]; <span style=\"color: #008000\">\/\/ ECX<\/span>\nsprintf (sp, &quot;<span style=\"color: #8b0000\">0x%p \\n<\/span>&quot;,ECX);\nTraceFile.write(ss, 12);\nTraceFile.write(s-&gt;c_str(), s-&gt;size());\nTraceFile.write(&quot;<span style=\"color: #8b0000\"> ECX: <\/span>&quot;,10);\nTraceFile.write(sp, 12);\nTraceFile.write(&quot;<span style=\"color: #8b0000\">\\n<\/span>&quot;,1);\n}\n\n<span style=\"color: #008000\">\/* ======================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Function to determine if an address is part of the main executable image *\/<\/span>\n<span style=\"color: #008000\">\/* ======================================================================== *\/<\/span>\n\n<span style=\"color: #0000ff\">bool<\/span> isPartOfMainImage(ADDRINT address)\n{\n<span style=\"color: #0000ff\">for<\/span> (IMG img=APP_ImgHead(); IMG_Valid(img); img = IMG_Next(img))\n{\n<span style=\"color: #0000ff\">if<\/span> (IMG_IsMainExecutable(img))\n{\n<span style=\"color: #0000ff\">for<\/span> (SEC sec=IMG_SecHead(img); SEC_Valid(sec); sec = SEC_Next(sec))\n{\n<span style=\"color: #0000ff\">if<\/span> (address &gt;= SEC_Address(sec) &amp;&amp; address &lt; SEC_Address(sec) + SEC_Size(sec))\n{\n<span style=\"color: #0000ff\">return<\/span> <span style=\"color: #0000ff\">true<\/span>;\n}\n}\n}\n}\n<span style=\"color: #0000ff\">return<\/span> <span style=\"color: #0000ff\">false<\/span>;\n}\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* instrumentation function *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n\n<span style=\"color: #0000ff\">void<\/span> Eval(INS ins, <span style=\"color: #0000ff\">void<\/span> *v)\n{\n<span style=\"color: #008000\">\/* instruction to look for *\/<\/span>\n<span style=\"color: #0000ff\">string<\/span> findString = &quot;<span style=\"color: #8b0000\">cmp ecx<\/span>&quot;; <span style=\"color: #008000\">\/\/ .text:004014D9 cmp ecx, 4C833425h<\/span>\nADDRINT address = INS_Address(ins);\n<span style=\"color: #0000ff\">if<\/span> ( INS_Disassemble(ins).find (findString) != <span style=\"color: #0000ff\">string<\/span>::npos &amp;&amp; isPartOfMainImage(address) )\n{\nstd::<span style=\"color: #0000ff\">string<\/span> asminstruction; \nasminstruction = INS_Disassemble(ins).c_str();\nINS_InsertCall(ins, IPOINT_BEFORE, (AFUNPTR)logCall, IARG_PTR, <span style=\"color: #0000ff\">new<\/span> <span style=\"color: #0000ff\">string<\/span>(asminstruction), IARG_CONTEXT, IARG_END);\n}\n}\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Wrap up log when all is said and done *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n\nVOID Fini(INT32 code, VOID *v)\n{\nTraceFile &lt;&lt; &quot;<span style=\"color: #8b0000\">#eof<\/span>&quot; &lt;&lt; endl;\nTraceFile.close();\n}\n\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n<span style=\"color: #008000\">\/* Main *\/<\/span>\n<span style=\"color: #008000\">\/* ===================================================================== *\/<\/span>\n\n<span style=\"color: #0000ff\">int<\/span> main(<span style=\"color: #0000ff\">int<\/span> argc, <span style=\"color: #0000ff\">char<\/span> *argv[])\n{\nPIN_Init(argc,argv);\nTraceFile.open(KnobOutputFile.Value().c_str());\nINS_AddInstrumentFunction(Eval, 0);\nPIN_AddFiniFunction(Fini, 0);\nPIN_StartProgram();\n<span style=\"color: #0000ff\">return<\/span> 0;\n}<\/pre>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Last weekend I had some time so I wanted to have a look at a reversing challenge which you can find here: https:\/\/www.ethicalhacker.net\/features\/special-events\/reverse-engineering-101-newbie-contest-webcast-elearnsecurity Reverse Engineering 101 Contest Steps Get the exe to be hacked Break it open and start exploring. The only rule for the challenge is that it has to be solved by &hellip; <a href=\"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> \"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity\"<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2561],"tags":[2676,2128,955,269,261],"class_list":["post-10186","post","type-post","status-publish","format-standard","hentry","category-malware-and-reversing","tag-reverse-engineering","tag-immunity-debugger","tag-c","tag-peter-van-eeckhoutte","tag-corelan"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research\" \/>\n<meta property=\"og:description\" content=\"Introduction Last weekend I had some time so I wanted to have a look at a reversing challenge which you can find here: https:\/\/www.ethicalhacker.net\/features\/special-events\/reverse-engineering-101-newbie-contest-webcast-elearnsecurity Reverse Engineering 101 Contest Steps Get the exe to be hacked Break it open and start exploring. The only rule for the challenge is that it has to be solved by &hellip; Continue reading &quot;Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/\" \/>\n<meta property=\"og:site_name\" content=\"Corelan | Exploit Development &amp; Vulnerability Research\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/corelanconsulting\" \/>\n<meta property=\"article:published_time\" content=\"2013-12-10T08:00:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png\" \/>\n<meta name=\"author\" content=\"Corelan Team (fancy)\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@corelanc0d3r\" \/>\n<meta name=\"twitter:site\" content=\"@corelanc0d3r\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/\"},\"author\":{\"name\":\"Corelan Team (fancy)\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/person\\\/19ac49794ad03a4f053203b956e97513\"},\"headline\":\"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity\",\"datePublished\":\"2013-12-10T08:00:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/\"},\"wordCount\":1084,\"publisher\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/pic1_thumb1.png\",\"keywords\":[\"reverse engineering\",\"immunity debugger\",\"C#\",\"Peter Van Eeckhoutte\",\"corelan\"],\"articleSection\":[\"Malware and Reversing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/\",\"name\":\"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/pic1_thumb1.png\",\"datePublished\":\"2013-12-10T08:00:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/pic1_thumb1.png\",\"contentUrl\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2013\\\/12\\\/pic1_thumb1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/2013\\\/12\\\/10\\\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.corelan.be\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#website\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/\",\"name\":\"Corelan CyberSecurity Research\",\"description\":\"Corelan publishes in-depth tutorials on exploit development, Windows exploitation, vulnerability research, heap internals, reverse engineering and security tooling used by professionals worldwide.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.corelan.be\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#organization\",\"name\":\"Corelan CyberSecurity Research\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/corelanlogo2_small-20.png\",\"contentUrl\":\"https:\\\/\\\/www.corelan.be\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/corelanlogo2_small-20.png\",\"width\":200,\"height\":200,\"caption\":\"Corelan CyberSecurity Research\"},\"image\":{\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/corelanconsulting\",\"https:\\\/\\\/x.com\\\/corelanc0d3r\",\"https:\\\/\\\/x.com\\\/corelanconsulting\",\"https:\\\/\\\/instagram.com\\\/corelanconsult\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.corelan.be\\\/#\\\/schema\\\/person\\\/19ac49794ad03a4f053203b956e97513\",\"name\":\"Corelan Team (fancy)\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x\",\"caption\":\"Corelan Team (fancy)\"},\"url\":\"https:\\\/\\\/www.corelan.be\\\/index.php\\\/author\\\/fancy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/","og_locale":"en_US","og_type":"article","og_title":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research","og_description":"Introduction Last weekend I had some time so I wanted to have a look at a reversing challenge which you can find here: https:\/\/www.ethicalhacker.net\/features\/special-events\/reverse-engineering-101-newbie-contest-webcast-elearnsecurity Reverse Engineering 101 Contest Steps Get the exe to be hacked Break it open and start exploring. The only rule for the challenge is that it has to be solved by &hellip; Continue reading \"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity\"","og_url":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/","og_site_name":"Corelan | Exploit Development &amp; Vulnerability Research","article_publisher":"https:\/\/www.facebook.com\/corelanconsulting","article_published_time":"2013-12-10T08:00:48+00:00","og_image":[{"url":"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png","type":"","width":"","height":""}],"author":"Corelan Team (fancy)","twitter_card":"summary_large_image","twitter_creator":"@corelanc0d3r","twitter_site":"@corelanc0d3r","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#article","isPartOf":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/"},"author":{"name":"Corelan Team (fancy)","@id":"https:\/\/www.corelan.be\/#\/schema\/person\/19ac49794ad03a4f053203b956e97513"},"headline":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity","datePublished":"2013-12-10T08:00:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/"},"wordCount":1084,"publisher":{"@id":"https:\/\/www.corelan.be\/#organization"},"image":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png","keywords":["reverse engineering","immunity debugger","C#","Peter Van Eeckhoutte","corelan"],"articleSection":["Malware and Reversing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/","url":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/","name":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity - Corelan | Exploit Development &amp; Vulnerability Research","isPartOf":{"@id":"https:\/\/www.corelan.be\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#primaryimage"},"image":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png","datePublished":"2013-12-10T08:00:48+00:00","breadcrumb":{"@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#primaryimage","url":"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png","contentUrl":"https:\/\/www.corelan.be\/wp-content\/uploads\/2013\/12\/pic1_thumb1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.corelan.be\/index.php\/2013\/12\/10\/using-dbi-for-solving-reverse-engineering-101-newbie-contest-from-elearnsecurity\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.corelan.be\/"},{"@type":"ListItem","position":2,"name":"Using DBI for solving Reverse Engineering 101 &ndash; Newbie Contest from eLearnSecurity"}]},{"@type":"WebSite","@id":"https:\/\/www.corelan.be\/#website","url":"https:\/\/www.corelan.be\/","name":"Corelan CyberSecurity Research","description":"Corelan publishes in-depth tutorials on exploit development, Windows exploitation, vulnerability research, heap internals, reverse engineering and security tooling used by professionals worldwide.","publisher":{"@id":"https:\/\/www.corelan.be\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.corelan.be\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.corelan.be\/#organization","name":"Corelan CyberSecurity Research","url":"https:\/\/www.corelan.be\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.corelan.be\/#\/schema\/logo\/image\/","url":"https:\/\/www.corelan.be\/wp-content\/uploads\/2026\/03\/corelanlogo2_small-20.png","contentUrl":"https:\/\/www.corelan.be\/wp-content\/uploads\/2026\/03\/corelanlogo2_small-20.png","width":200,"height":200,"caption":"Corelan CyberSecurity Research"},"image":{"@id":"https:\/\/www.corelan.be\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/corelanconsulting","https:\/\/x.com\/corelanc0d3r","https:\/\/x.com\/corelanconsulting","https:\/\/instagram.com\/corelanconsult"]},{"@type":"Person","@id":"https:\/\/www.corelan.be\/#\/schema\/person\/19ac49794ad03a4f053203b956e97513","name":"Corelan Team (fancy)","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x","url":"https:\/\/secure.gravatar.com\/avatar\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e61c2a72c3ac875b017df8edf75c236f8c0147bee76db02a9b84f58d24283ed9?s=96&d=mm&r=x","caption":"Corelan Team (fancy)"},"url":"https:\/\/www.corelan.be\/index.php\/author\/fancy\/"}]}},"views":11508,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts\/10186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/comments?post=10186"}],"version-history":[{"count":0,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/posts\/10186\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/media?parent=10186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/categories?post=10186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corelan.be\/index.php\/wp-json\/wp\/v2\/tags?post=10186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}