Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://www.rohitab.com/discuss/rss/forums/1-new-topics/

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <rss version="2.0">
  3. <channel>
  4. <title>New Topics</title>
  5. <description>New topics from all forums</description>
  6. <link>http://www.rohitab.com/discuss</link>
  7. <pubDate>Fri, 16 Feb 2024 12:54:43 +0000</pubDate>
  8. <ttl>10</ttl>
  9. <item>
  10. <title>Custom API Definitions Not Working</title>
  11. <link>http://www.rohitab.com/discuss/topic/63784-custom-api-definitions-not-working/</link>
  12. <description><![CDATA[<p>I've been monitoring an executable which uses a 3rd party DLL and I can see the function names in the summary window.</p>
  13. <p>&nbsp;</p>
  14. <p>If I create a custom XML definitions file for the DLL and specify only one of the API calls I'm interested in (very simple function, one parameter and a return value) then when I restart API Monitor, although the XML file loads successfully, when I monitor the executable again, the API function from the definition file is no longer shown in the summary window and other API functions not documented are also no longer present.</p>
  15. <p>&nbsp;</p>
  16. <p>What may cause this?</p>
  17. <p>&nbsp;</p>
  18. <p>There are no errors with the XML definition and it appears within the "API Filter" in an "uncategorized" group.</p>
  19. <p>&nbsp;</p>
  20. <p>For reference, this is the XML definition:</p>
  21. <pre title='Extensible Markup Language (XML)' class='brush:xml'>
  22. &lt;ApiMonitor&gt;
  23. &lt;Include Filename="Headers\windows.h.xml" /&gt;
  24. &lt;Module Name="brom.dll" CallingConvention="STDCALL"&gt;
  25. &lt;Variable Name="OTP_OPERATION" Type="Alias" Base="UINT"&gt;
  26. &lt;Enum&gt;
  27. &lt;Set Name="OTP_READ" Value="0" /&gt;
  28. &lt;Set Name="OTP_WRITE" Value="1" /&gt;
  29. &lt;Set Name="OTP_LOCK" Value="2" /&gt;
  30. &lt;Set Name="OTP_WRITE_AND_LOCK" Value="3" /&gt;
  31. &lt;Set Name="OTP_OPERATION_END" Value="4" /&gt;
  32. &lt;/Enum&gt;
  33. &lt;/Variable&gt;
  34. &lt;Api Name="OTPOpToString" CallingConvention="STDCALL"&gt;
  35. &lt;Param Type="OTP_OPERATION" Name="op" /&gt;
  36. &lt;Return Type="char*" /&gt;
  37. &lt;Success Return="NotEqual" Value="0" /&gt;
  38. &lt;/Api&gt;
  39. &lt;/Module&gt;
  40. &lt;/ApiMonitor&gt;
  41. </pre>
  42. <p><a class='resized_img' rel='lightbox[10388759]' id='ipb-attach-url-5616-0-04240200-1716144437' href="/discuss/uploads/monthly_02_2024/post-32128-0-31700100-1708088264.png" title="Capture2.PNG - Size: 62.98KB, Downloads: 10"><img itemprop="image" src="/discuss/uploads/monthly_02_2024/post-32128-0-31700100-1708088264_thumb.png" id='ipb-attach-img-5616-0-04240200-1716144437' style='width:100;height:43' class='attach' width="100" height="43" alt="Capture2.PNG" /></a>
  43.  
  44. is what the summary windows looks like when the new XML definition is selected in the filter:</p>
  45. <p>&nbsp;</p>
  46. <p><a class='resized_img' rel='lightbox[10388759]' id='ipb-attach-url-5615-0-03332300-1716144437' href="/discuss/uploads/monthly_02_2024/post-32128-0-46029900-1708088258.png" title="Capture1.PNG - Size: 85.78KB, Downloads: 8"><img itemprop="image" src="/discuss/uploads/monthly_02_2024/post-32128-0-46029900-1708088258_thumb.png" id='ipb-attach-img-5615-0-03332300-1716144437' style='width:100;height:58' class='attach' width="100" height="58" alt="Capture1.PNG" /></a>
  47.  
  48. is what the summary window looks like when API Monitor knows nothing about the XML definition but with the DLL loaded into the "External DLL" window:</p>
  49. <p>&nbsp;</p>
  50. <p>&nbsp;</p>
  51. ]]></description>
  52. <pubDate>Fri, 16 Feb 2024 12:54:43 +0000</pubDate>
  53. <guid>http://www.rohitab.com/discuss/topic/63784-custom-api-definitions-not-working/</guid>
  54. </item>
  55. <item>
  56. <title><![CDATA[[C/C++] Reverse Engineering Tutorial for newbies]]></title>
  57. <link>http://www.rohitab.com/discuss/topic/35537-cc-reverse-engineering-tutorial-for-newbies/</link>
  58. <description><![CDATA[<p class='bbc_center'>                        ---------------------------------------------------------<br />                                ---===&gt; Reverse Engineering Tutorial &lt;===---<br />                                         --==&gt; For Beginners &lt;==--<br />                                                 on Windows<br />                        ---------------------------------------------------------<br /><br /><br />-= SECTION 1 (Misc. information) =-<br />I. WHAT THIS TUTORIAL WILL COVER<br />II. PREFACE<br />III. REQUIREMENTS<br />IV. RECOMMENDATIONS<br /><br />-= SECTION 2 (WPM hack) =-<br />I. WHAT TO HACK/HOW TO DO IT<br />II. THE "GAME"<br />III. THE MEMORY SEARCHER<br />IV. TYING IT ALL TOGETHER (WPM)<br /><br />-= SECTION 3 (DLL hack) =-<br />I. ADVANTAGES TO CODE INJECTION<br />II. HOW TO CREATE A BASIC DLL<br />III. DLL FILES -&gt; MORE IN DEPTH<br />IV. FINDING MEMORY ADDRESSES (OllyDbg)<br />V. HOW 'JUMP PATCHING' WORKS<br />VI. CALLING A FUNCTION FROM WITHIN<br /><br />APPENDIXES:<br />A. How to create a DLL project (MSVC, Dev-C++, etc)<br />B. TextControl header file<br />C. Links to function prototypes used (MSDN site)<br />D. WPM Hack (source code)<br />E. DLL Hack (source code)<br />F. DLL Injector (source code) - I take no credit for this<br />G. The game (source code, "Hack me")<br />-------------------------------------------------------------------------------------------------------------------<br /><br /></p><br /><span style='font-size: 14px;'><strong class='bbc'><span style='color: Red'>Section 1</span></strong></span><br /><span style='color: Cyan'>WHAT THIS TUTORIAL WILL COVER</span>:<br />- General theory behind 'hacking' games<br />- Usage of (C/C++) WriteProcessMemory function<br />- Injection of code (patch jumping to a user-defined *.dll)<br /><br /><span style='color: Cyan'>PREFACE</span> (skip if you want):<br />This tutorial is aimed in a very general direction, towards helping people who have never really '<em class='bbc'>hacked</em>'<br />anything before, but want to try. Somebody who may, or may not have knowledge in the 'field' area, of hacking.<br />If you've never hacked before, but used them, and used memory searchers before, this is for you to read!<br />If you've created a few hacks before, but never tried to inject a *.dll before, or created a patch jump...<br />This tutorial <em class='bbc'>might</em> be for you, but then again, you may already know, but never really have done it.<br /><br /><span style='color: #00ffff'>REQUIREMENTS</span>:<br />- Knowledge of C or C++ (if you've only coded in C, know that "naked" is a <strong class='bbc'>C++ only</strong> keyword)<br />- A compiler that is capable of inline, <strong class='bbc'>Intel</strong> syntax Assembly (MSVC is, but is <strong class='bbc'><em class='bbc'>not</em></strong> share/freeware)<br /><br /><span style='color: #00ffff'>RECOMMENDATIONS</span>:<br />- Knowledge of basic Assembly (extremely helpful)<br />- Knowledge of how to use a memory searcher (TSearch, ArtMoney, or another)<br />- Knowledge of how to use a debugger (OllyDbg, SoftIce)<br />- Knowledge of how computers function, in general (memory addresses, virtual memory addresses, etc)<br /><br /><span style='font-size: 14px;'><strong class='bbc'><span style='color: Red'>Section 2</span></strong></span><br /><span style='color: Cyan'>WHAT TO HACK/HOW TO DO IT</span>:<br />Usually games have something very significant in them, that you'd like to modify.<br />In this tutorial, I've created a very specific program, for you to reverse engineer.<br />You may be thinking right now, "Oh, so this will teach me absolutely nothing? Just waste my time...?"<br />If you thought that, you're <em class='bbc'>completely</em> right! Quit reading right now, and go read something else! :)<br /><br />No, but really, it's the same logic! In order to hack a game, you need to do the following:<br />- Find something you want to modify (a "target"), such as life, or a name<br />- Find a way to find it, such as a memory searcher (this does NOT always work)<br />- Find a main loop of code where stuff is constantly executed<br /><br /><span style='color: Cyan'>THE</span> "<span style='color: #00ffff'>GAME</span>":<br />As mentioned, there is a "game" or program, you'll be using to hack ('reverse engineer'), that I wrote.<br />All it does, is displays some text, sleeps for a little bit, 'erases' it with spaces, and writes it again.<br /><br />Your objectives (that I will NOT help with) will be the following:<br />- Find and remove the function that removes the text<br />- Modify the placement of the text that is blinking (X, Y coordinates)<br />- Modify the persons name with WriteProcessMemory<br /><br /><span style='color: #00ffff'>THE MEMORY SEARCHER</span>:<br />I've chosen to specifically use ArtMoney, but you can use whatever you're comfortable with.<br />Now, in a "real" game, the first thing you'll want to do, is to find a specific value, such as your life...<br />But in this case, since I wrote this (for all intents and purposes): It'll be the "age" being displayed (21).<br /><br />You're able to <strong class='bbc'>increase</strong>, and <strong class='bbc'>decrease</strong> the age's actual value, by using the +/- keys (numpad).<br />In a real game, the only way you could get the value to change, is by dying, or leveling up, or whatever.<br />Again: For all intents and purposes of learning, I did this, so please, do not complain, be thankful! :P<br /><br />In ArtMoney (ArtMoney SE v7.32), this is the following steps you'd take to find the actual "age" value:<br />Select process -&gt; ABCD (Hack me.exe)<br />Search -&gt; "Exact value" -&gt; 21 -&gt; Type "Custom" -&gt; Address Range "All" -&gt; OK<br />Filter -&gt; "Exact value" -&gt; 22 (assuming you increased, else 20 if you decrease) -&gt; Type "Custom"<br />Now, it should pop out at you, with <em class='bbc'>a single address</em>, but if it doesn't, try again from the beginning.<br /><br />The address for <em class='bbc'>me</em> (and I'm sure it'll change for every reader) is: 0x012FF7C<br />I will hence fourth use this address, even though it <strong class='bbc'>will</strong> change per reader, just remember that!<br /><br />WE HAVE THE ADDRESS, NOW WHAT?<br />Now that you have the memory address of the value you'd like to modify, you're done! You simply write a program<br />that will <em class='bbc'>modify</em> that program accordingly, and that's as easy-as-pie! You can do this many ways...<br />I've chosen to show you how to do it <em class='bbc'>both</em> ways, and the first way I shall teach, is the infamous:<br />WPM (WriteProcessMemory) - it's a little more "limited" than other methods, but if it works, <em class='bbc'>use it</em>! ;)<br /><br />WRITEPROCESSMEMORY FUNCTION:<br />There's no real way to explain this, other than: <em class='bbc'>Always look up functions on Google</em>.<br />Since there isn't much to say, I'll simply post the function prototype, and a potential example of use.<br /><br />The prototype for WriteProcessMemory is:<br /><pre title='C Source' class='brush:c'>BOOL WINAPI WriteProcessMemory(
  59.  __in   HANDLE hProcess,  // The target process
  60.  __in   LPVOID lpBaseAddress,  // The memory address IN the target
  61.  __in   LPCVOID lpBuffer,  // A pointer to a null-terminated string to write
  62.  __in   SIZE_T nSize,  // The size of the buffer to write
  63.  __out  SIZE_T *lpNumberOfBytesWritten  // &#91;Optional&#93; NULL if not used, returns how many bytes were wrote
  64. );</pre><br />It is defined in "Winbase.h" although you include "Windows.h" to use it.<br /><br />Now, to use WPM, you need one <em class='bbc'>very</em> important piece of information, and that is the process handle!<br />To obtain the process handle, you could go a few various ways, but the method I much prefer is, to use<br />FindWindow (to obtain a window handle), then GetWindowThreadProcessId (to obtain a PID (process ID)), and<br />finally! You'd call upon OpenProcess to obtain a handle, to the window.<br /><br /><span style='color: #00ffff'>TYING IT ALL TOGETHER (WPM)</span>:<br />By now, you should have looked up the other two functions (FindWindow, GetWindowThreadProcessId), and realized<br />that they require a HWND variable, and a DWORD variable to use, to be put together with the HANDLE variable,<br />for use with the actual WriteProcessMemory function, so you can modify the process memory! Now, there is<br />sometimes, where you actually need to use yet <em class='bbc'>another</em> function, called VirtualProtectEx function,<br />but I'll leave that, for you to look into all on your own (it's VERY simple, I assure you).<br /><br />This is what you should have by now (code snippet):<br /><pre title='C Source' class='brush:c'>int main() {
  65.  
  66.    HWND hwnd;       // Holding the window title
  67.    HANDLE handle;   // Holding the handle to the process
  68.    DWORD pid;       // Holding the PID of the process
  69.  
  70.    hwnd = FindWindow(0, "ABCD");
  71.    GetWindowThreadProcessId(hwnd, &pid);
  72.    handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
  73.  
  74.    return 0;
  75. }</pre><br />There are ways to make this better, but that's up to you to find (one is very unapparent).<br />With this small snippet of code, you now have all the tools necessary to modify the games variable (age)! :)<br />As I've said before: <em class='bbc'>This address may not be the same for you, but bare with me, and know that I'm only<br />referencing what I personally see, and use, on my own machine, and it will most likely change from CPU to CPU.</em><br /><br />To modify (at this point) specifically the age variable, we could go about it something like this:<br /><pre title='C Source' class='brush:c'>BYTE NewAge = 99; // New age to be assigned
  76.  
  77.    if (!WriteProcessMemory(handle, (void *)0x012FF7C, &NewAge, sizeof(NewAge), NULL)) { // If it fails
  78.        printf("Failed to write to memory!"); // Let the person know, but if it works, nothing pops up!
  79.    }</pre><br />This might/might not come in handy, but you could also check to see if a variable changed a value, just by<br />using the opposite function (I know, 'retarded', but whatever): ReadProcessMemory! It stores a value<br />from a process memory, into a variable, <em class='bbc'>of your own program</em>, so you could if statement it, and<br />potentially warn a user, that their resource is getting low? or just have it auto-increase their resource?<br /><br /><span style='font-size: 14px;'><strong class='bbc'><span style='color: Red'>Section 3</span></strong></span><br /><span style='color: Cyan'>ADVANTAGES TO CODE INJECTION</span>:<br />There is clearly! Always <em class='bbc'>advantages</em>, and <em class='bbc'><strong class='bbc'>dis</strong>advantages</em> to code injection.<br />The ability to 'detect' that you're hacking will differ very little (if none at all) whether<br />you're injecting a *.dll, or using native API library calls such as WriteProcessMemory!<br /><br />By loading a new library ('injecting' a *.dll) into the game's process, you meld yourself<br />together with the process (game), unifying yourself into one! Which allows you to <em class='bbc'>easily</em><br />modify registers (eax, esi, edx, ETC), and see their values, copy them, or execute functions...<br />Without much effort at all! You can even <em class='bbc'>jump</em> to your <em class='bbc'>own</em> *.dll file by modifying<br />the game's process (this is what is called a "hook" or "jump patch"). This would allow you to<br />significantly modify stuff within the game without much overhead, or confusion... except game<br />patch updates modify the offsets, updating them isn't very hard (just do what you did the first<br />time, to get the offsets back again), and presto! It should be good (unless they drastically<br />changed stuff, like the arguments/function it calls/etc). But anyways, back to the topic!<br /><br /><span style='color: Cyan'>HOW TO CREATE A BASIC DLL</span>:<br />As you know, the entire "dll injection" method revolves around a dynamic link library (*.dll),<br />and you're probably wondering how to create one, or perhaps you're wondering <em class='bbc'>what it is</em>.<br /><br />In a nutshell, a *.dll is a file, that's full of precompiled functions, that you can access<br />with an executable program - the idea is that you make a very generic, or useful function,<br />that gets called tons of times (such as SendMessage, or WriteProcessMemory), and compile it<br />into a tiny 512 KB (probably less) *.dll file (with tons of other functions), and presto!<br />Now you only have <em class='bbc'>one</em> function precompiled, that's simply called by 30,000 programs<br />rather than 30,000 programs recreating the <em class='bbc'>same function</em> over and over! This can also<br />save on compilation time, because it's one less thing that must be translated, instead it's<br />just a simple, plain call to the dynamic link library (although you have to link to it). :P<br /><br />An extremely basic (the <em class='bbc'>MOST</em> basic) DLL you can possibly compile would look like this:<br /><pre title='C Source' class='brush:c'>BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved) {
  80.  
  81.    return true;
  82. }</pre><br />APIENTRY is actually #defined as, "FAR PASCAL"<br />- FAR is #defined as, "FAR __far"<br />- PASCAL is #defined as, "PASCAL __pascal"<br />You may find the definitions in WinDef.h for yourself! :)<br /><br />However! As extremely simple as this very compilable *.dll file is, it's rather useless like this!<br />It can be loaded into any given executable program, but it won't <em class='bbc'>do</em> anything, so to fix that...<br />Well, before I continue, you should know what the actual arguments passed to DllMain are/are for.<br />The only valid, and useful one to us is "reason," and that is, 'the reason' the DLL is being called.<br />There are four potential values it could be, but probably the most important one is: <em class='bbc'>DLL_PROCESS_ATTACH</em><br /><br />To be more clear, the four possible values that 'reason' could be, are:<br />- DLL_PROCESS_ATTACH (0x01)<br />- DLL_PROCESS_DETACH (0x00)<br />- DLL_THREAD_ATTACH  (0x02)<br />- DLL_THREAD_DETACH  (0x03)<br /><br />If you'd like, feel free to refer to appendix c and follow the MSDN link that explains more in-depth.<br />But for the sake of explaining how to write a DLL, and how to get it to 'do stuff,' I won't explain it.<br /><br /><span style='color: #00ffff'>DLL FILES -&gt; MORE IN DEPTH</span>:<br />OK! A *.dll is pretty much no different than any runnable program (command, or executable)...<br />It can execute instructions to the machine, and do anything, and everything else, so at this point,<br />if you haven't figured it out yet, I shall explain it even more for you! <em class='bbc'>Add functions to your *.dll</em>!<br /><br /><pre title='C Source' class='brush:c'>void __declspec(naked) FindMe() {
  83.    __asm {
  84.        pushad
  85.        pushfd
  86.  
  87.        test eax, eax
  88.        test eax, eax
  89.        test eax, eax
  90.        test eax, eax
  91.        test eax, eax
  92.        test eax, eax
  93.        test eax, eax
  94.        test eax, eax
  95.        test eax, eax
  96.        test eax, eax
  97.  
  98.        popfd
  99.        popad
  100.        ret
  101.    }
  102. }
  103.  
  104. void MyFunction() {
  105.  
  106.    FindMe();
  107.  
  108.    return;
  109. }
  110.  
  111. bool APIENTRY DllMain(HANDLE hModule, DWORD  reason, LPVOID lpReserved) {
  112.  
  113.    if (reason == DLL_PROCESS_ATTACH) {
  114.        MyFunction();
  115.    }
  116.  
  117.    return true;
  118. }</pre><br />There isn't much more to say about *.dlls in this sense, as you can clearly see, you can add functions!<br />The next step honestly, is to modify the target (game!) program, and inject your *.dll (even though<br />there isn't any 'code patching' occuring yet, it'll allow you to use a debugger to 'see inside').<br /><br />You may refer to appendix F to aquire the DLL Injector; If you don't know how it works, worry not!<br />Know that it'll inject your *.dll into the target process (you must recompile it with your *.dll/*.exe).<br />Now, run the game, run the DLL injector (to inject your DLL into a process), open up OllyDbg, and<br />attach it to the DLL! (Alt + E is to "Open executables") From here, you should be able to find your<br />function, "MyFunction" and a lot easier, "FindMe," and if you did, you <em class='bbc'>SHOULD</em> see all the<br />"test eax, eax" statements, and at this point, you should feel happy, proud, and give yourself a pat<br />on your own back, for having such a huge accomplishment! You found your own function, in your DLL file! :P<br /><br /><span style='color: #00ffff'>FINDING MEMORY ADDRESSES (OllyDbg)</span>:<br />I surely do hope you're familiar enough with OllyDbg <em class='bbc'>now</em> that you'll be able to follow along...<br />If you're using another debugger, other than OllyDbg, I sincerely apologize, because I do not 'support,'<br />or use any other debuggers in this tutorial for beginners, but if you are/do using/use OllyDbg, 'grats! ^_^<br /><br />Crack open OllyDbg, run the game, and attach the debugger (OllyDbg!) to the game, and here's where the<br />magic really begins, and it all starts falling together (hopefully)! You know that the age is 21, right?<br />You know where <em class='bbc'>that</em> address specifically is (for me, it is 0x012FF7C), and what you can do,<br />is go to the "hex dump" in OllyDbg, hold CTRL + G (enter expression in dump), and enter the memory address.<br />This will take you to the actual address that the "21" (0x15 in hex) value is being stored, and from there<br />you can place a <strong class='bbc'>memory access</strong> breakpoint on it (meaning the program will STOP ("Paused") if it<br />is read from, or written, or whatever). For me, this popped on the offset: 0x0401006<br /><br />If you press CTRL + F9 (execute 'til return) twice, then F8 (Step over) once, you'll land upon a<br />"ADD ESP, 8h" Assembly command, and here, you can clearly see as bright as day, that you have exited<br />the function that prints the number "21," you'll also notice you've entered the main loop of the game! :)<br /><br /><span style='color: #00ffff'>HOW 'JUMP PATCHING' WORKS</span>:<br />Let's pause on creating that *.dll, and finding memory addresses (since we've aquired the main game loop,<br />and another potentially useful function address), and step back a bit, and think about it from a new light.<br />We have the addresses, but how do we put these to use? We can't without redirecting the game's main code!<br /><br />To redirect the games code to our *.dll, sort of like a detour on the road... we need to have it 'jump'<br />accross the lane, and veer into our little cubby hole of code! We need it to obey us, but before we can<br />even do that, we need to find a location that's suitable, and since there's a million and one things I<br />need to explain, I'd better quit blabbering and start explaining!<br /><br />To quote somebody, who helped me extremely in understanding: "(ebx - ecx) == (source - (destination + 5h))" "ebx" is 'your function' and "ecx" is a memory offset from the game, if that helps explain it any.<br /><br />I honestly just use this function, which I take NO credit for writing (although I was writing my own):<br /><pre title='C Source' class='brush:c'>void JmpPatch(void *pDest, void *pSrc, int nNops = 0) {
  119.  
  120. DWORD OldProt;
  121.  
  122. VirtualProtect(pSrc, 5 + nNops, PAGE_EXECUTE_READWRITE, &OldProt);
  123.  
  124. *(char*)pSrc = (char)0xE9;
  125. *(DWORD*)((DWORD)pSrc + 1) = (DWORD)pDest - (DWORD)pSrc - 5;
  126.  
  127. for (int i = 0; i &lt; nNops; ++i) { *(BYTE*)((DWORD)pSrc + 5 + i) = 0x90; }
  128.  
  129. VirtualProtect(pSrc, 5 + nNops, OldProt, &OldProt);
  130. }</pre><br />An example of use:<br /><br /><pre title='C Source' class='brush:c'>
  131.    if (reason == DLL_PROCESS_ATTACH) {
  132.        JmpPatch(&FindMe, (PBYTE)0x0401006, 0);
  133.    }</pre><br />This will cause a "jmp" command to be placed in the "Hack me.exe" game's actual code, and that's it! :) I sincerely apologize for the extremely poor, and lacking explanation, I am not that good at explaining it. As I've said before: I honestly do <em class='bbc'>not</em> think about it a lot, and personally just use the function.<br /><br />You would probably like to find an op-code that will hold <em class='bbc'>just</em> enough room for the jump.<br />If there's any extra spaces, just nop (no operation) them. Remember: <em class='bbc'>The program does not know that it is being taken away from its "normal" cycle of instructions</em>, the op-code you over write must be "replaced" right before you jump BACK to the location in the game (you must jump back to where you had left off, except one instruction infront of the "jump" command, so it doesn't just jump back).<br /><br /><span style='color: Cyan'>CALLING A FUNCTION FROM WITHIN</span>:<br />Like with any language, all functions require <em class='bbc'>arguments</em> to be passed to them, and in C, this is rather simple! But when you translate from C to Assembly, it may seem a little weird at first, especially based on the different calling conventions (__naked is as it sounds: <em class='bbc'>it does nothing</em>). You can look 'em up on MSDN's site, or Wikipedia, or probably even google around on your own (remember: GOOGLE IS YOUR FRIEND).<br /><br />If you would please, open up your favorite debugger (I will be using OllyDbg), and attach it to "Hack me.exe." If you hold "CTRL + A," after you've attached it to the process, and opened up the executable module, you will see that it shows the "analyases code" from the debugger - this helps from time to time, especially when you're trying to find something as simple as a native GetAsyncKeyState function call!<br /><br />If you look around for a bit, you'll notice that the "<em class='bbc'>Sleep(500);</em>" function call you wrote in C,<br />is actually translated to, "<em class='bbc'>PUSH 1F4, CALL &lt;sleep offset&gt;</em>" but that might not be very clear to you.<br /><br />Now let's say you created a jump patch, and you wanted to make the program display some text else-where... What you'd want to do, is find the function that displays text, and call upon it! But you must realize, it has to take some sort of <em class='bbc'>arguments</em>, and you must match these arguments (if it's text, it will differ obviously)! Lucky for us, there's a function created specifically for this purpose, just to learn.<br /><br />PrintTextXY takes a character pointer, and two integers, and it will do the rest for you (placing/displaying). I'll assume you've already found a location (somewhere) in the game, and created your own jump patch, so continuing on from that point (actually, I will be using the "DLL" from earlier as an example, and add on):<br /><br /><pre title='C Source' class='brush:c'>void PrintText(int X, int Y, char *szText) {
  134.  
  135.    static int PrintXY_Offset = 0x04011D3;
  136.  
  137.    __asm {
  138.        pushad
  139.        pushfd
  140.  
  141.        push X
  142.        push Y
  143.        push szText
  144.        call DWORD PTR DS:&#91;PrintXY_Offset&#93;
  145.  
  146.        popfd
  147.        popad
  148.        ret
  149.    }
  150.    return;
  151. }
  152.  
  153. void __declspec(naked) FindMe() {
  154.  
  155.    __asm {
  156.        pushad
  157.        pushfd
  158.    }
  159.  
  160.    PrintText("Hello World!");
  161.  
  162.    __asm {
  163.        popfd
  164.        popad
  165.        &lt;replace op-code&gt;
  166.        jmp &lt;one op-code above jump patch&gt;
  167.    }
  168. }</pre>]]></description>
  169. <pubDate>Sun, 11 Jun 2023 12:46:06 +0000</pubDate>
  170. <guid>http://www.rohitab.com/discuss/topic/35537-cc-reverse-engineering-tutorial-for-newbies/</guid>
  171. </item>
  172. <item>
  173. <title>Win32 - Increased CPU usage when using multiple buffers</title>
  174. <link>http://www.rohitab.com/discuss/topic/51073-win32-increased-cpu-usage-when-using-multiple-buffers/</link>
  175. <description><![CDATA[<p>First post here. Can someone take a look at my code? I have created a bunch of sine distortion graphic effects, but I've noticed that the two effects which distort the x and y axis at the same time use more CPU. I am using two buffers to get those working. The gameloop is by EternalWindows with some changes. Also, I may be wrong, but I get the impression that the animation isn't as smooth as It should be. Any corrections are welcome. Thanks!</p>
  176. <pre title='C Source' class='brush:c'>
  177. #include &lt;windows.h&gt;
  178. #include &lt;math.h&gt;
  179.  
  180. #define WINDOW_CLASS_NAME "DEMOCLASS"
  181. #define WINDOW_TITLE "GDI Demo"
  182. #define WINDOW_WIDTH 405
  183. #define WINDOW_HEIGHT 290
  184.  
  185. struct BACKBUFFER {
  186. HWND     hwnd;
  187. HDC        hdc;
  188. HDC        hdc2;
  189. HBITMAP hbmp;
  190. HBITMAP hbmp2;
  191. HBITMAP hbmpPrev;
  192. HBITMAP hbmpPrev2;
  193. HBRUSH  hbr;
  194. int     cx;
  195. int     cy;
  196. };
  197. typedef struct BACKBUFFER BACKBUFFER;
  198.  
  199. struct OBJECT {
  200. HDC     hdc;
  201. HBITMAP hbmp;
  202. HBITMAP hbmpPrev;
  203. float amplitude;
  204. float frequency;
  205. float offset;
  206. int     x;
  207. int     y;
  208. int     cx;
  209. int     cy;
  210. };
  211. typedef struct OBJECT OBJECT;
  212.  
  213. BOOL       g_bPause = FALSE;
  214. BOOL       g_bLostFocus = FALSE;
  215. BOOL       g_bRunning = FALSE;
  216. BACKBUFFER g_backBuffer = {0};
  217. OBJECT g_background = {0};
  218.  
  219. int  Run(void);
  220. BOOL CreateBackbuffer(HWND hwnd);
  221. void DestroyBackbuffer();
  222. BOOL CreateObjects(HWND hwnd);
  223. void DestroyObjects();
  224.  
  225. void Update(void);
  226. void Render(void);
  227. void Show(void);
  228.  
  229. void Distort_Bitmap(void);
  230.  
  231. LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  232.  
  233. int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpszCmdLine, int nCmdShow)
  234. {
  235. TCHAR      szAppName&#91;] = TEXT("sample");
  236. HWND       hwnd;
  237. WNDCLASSEX wc;
  238. RECT       rc;
  239. DWORD      dwStyle;
  240.  
  241. wc.cbSize        = sizeof(WNDCLASSEX);
  242. wc.style         = 0;
  243. wc.lpfnWndProc   = WindowProc;
  244. wc.cbClsExtra    = 0;
  245. wc.cbWndExtra    = 0;
  246. wc.hInstance     = hinst;
  247. wc.hIcon         = (HICON)LoadImage(NULL, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_SHARED);
  248. wc.hCursor       = (HCURSOR)LoadImage(NULL, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_SHARED);
  249. wc.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH);
  250. wc.lpszMenuName  = NULL;
  251. wc.lpszClassName = szAppName;
  252. wc.hIconSm       = (HICON)LoadImage(NULL, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_SHARED);
  253.  
  254. if (RegisterClassEx(&wc) == 0) return 0;
  255.  
  256. dwStyle = WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX;
  257. SetRect(&rc, 0, 0, 640, 480);
  258. AdjustWindowRect(&rc, dwStyle, FALSE);
  259.  
  260. hwnd = CreateWindowEx(0, szAppName, WINDOW_TITLE, dwStyle, CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hinst, NULL);
  261. if (hwnd == NULL)
  262. return 0;
  263.  
  264. ShowWindow(hwnd, nCmdShow);
  265. UpdateWindow(hwnd);
  266.  
  267. return Run();
  268. }
  269.  
  270. LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  271. {
  272. switch (uMsg) {
  273.  
  274. case WM_CREATE:
  275.  
  276. if (!CreateBackbuffer(hwnd))
  277. return -1;
  278. if (!CreateObjects(hwnd))
  279. return -1;
  280.  
  281. case WM_KEYDOWN:
  282. if (wParam == VK_PAUSE) {
  283. g_bPause = !g_bPause;
  284. if (g_bPause)
  285. Show();
  286. }
  287. return 0;
  288.  
  289. case WM_PAINT:
  290. Show();
  291. break;
  292.  
  293. case WM_NCLBUTTONDOWN:
  294. Show();
  295. break;
  296.  
  297. case WM_ERASEBKGND:
  298. return 0;
  299.  
  300. case WM_SETFOCUS:
  301. g_bLostFocus = FALSE;
  302. return 0;
  303.  
  304. case WM_KILLFOCUS:
  305. g_bLostFocus = TRUE;
  306. return 0;
  307.  
  308. case WM_DESTROY:
  309. DestroyBackbuffer();
  310. DestroyObjects();
  311. PostQuitMessage(0);
  312. return 0;
  313.  
  314. default:
  315. break;
  316.  
  317. }
  318.  
  319. return DefWindowProc(hwnd, uMsg, wParam, lParam);
  320. }
  321.  
  322. int Run(void)
  323. {
  324. MSG   msg;
  325. BOOL  bMove;
  326. DWORD dwInterval = 15;
  327. DWORD dwCurTime, dwNextTime;
  328.  
  329. g_bRunning = TRUE;
  330. bMove         = TRUE;
  331. dwNextTime = timeGetTime();
  332.  
  333. while (g_bRunning) {
  334. if (g_bPause || g_bLostFocus || PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
  335. if (GetMessage(&msg, NULL, 0, 0) &gt; 0)
  336. DispatchMessage(&msg);
  337. else
  338. break;
  339. }
  340. else {
  341. if (bMove) {
  342. Update();
  343. Render();
  344. bMove = FALSE;
  345. }
  346.  
  347. dwCurTime = timeGetTime();
  348.  
  349. if (dwCurTime &gt; dwNextTime) {
  350. Show();
  351.  
  352. dwNextTime += dwInterval;
  353.  
  354. if (dwNextTime &lt; dwCurTime)
  355. dwNextTime = dwCurTime + dwInterval;
  356.  
  357. bMove = TRUE;
  358. }
  359. else
  360. Sleep(dwNextTime - dwCurTime);
  361. }
  362. }
  363.  
  364. return (int)msg.wParam;
  365. }
  366.  
  367. BOOL CreateBackbuffer(HWND hwnd)
  368. {
  369. HDC hdc;
  370. hdc = GetDC(hwnd);
  371.  
  372. g_backBuffer.hdc = CreateCompatibleDC(hdc);
  373. g_backBuffer.hbmp = CreateCompatibleBitmap(hdc, 640, 480);
  374.  
  375. g_backBuffer.hdc2 = CreateCompatibleDC(hdc);
  376. g_backBuffer.hbmp2 = CreateCompatibleBitmap(hdc, 640, 480);
  377.  
  378. if (g_backBuffer.hbmp == NULL) {
  379. ReleaseDC(hwnd, hdc);
  380. return FALSE;
  381. }
  382.  
  383. g_backBuffer.hbmpPrev = (HBITMAP)SelectObject(g_backBuffer.hdc, g_backBuffer.hbmp);
  384. g_backBuffer.hbmpPrev2 = (HBITMAP)SelectObject(g_backBuffer.hdc2, g_backBuffer.hbmp2);
  385.  
  386. ReleaseDC(hwnd, hdc);
  387.  
  388. g_backBuffer.hwnd = hwnd;
  389. g_backBuffer.hbr  = (HBRUSH)GetStockObject(BLACK_BRUSH);
  390. g_backBuffer.cx   = 640;
  391. g_backBuffer.cy   = 480;
  392.  
  393. return TRUE;
  394. }
  395.  
  396. void DestroyBackbuffer()
  397. {
  398. if (g_backBuffer.hdc || g_backBuffer.hdc2 != NULL) {
  399. if (g_backBuffer.hbmp || g_backBuffer.hbmp2 != NULL) {
  400.  
  401.            SelectObject(g_backBuffer.hdc2, g_backBuffer.hbmpPrev2);
  402. DeleteObject(g_backBuffer.hbmp2);
  403.  
  404. SelectObject(g_backBuffer.hdc, g_backBuffer.hbmpPrev);
  405. DeleteObject(g_backBuffer.hbmp);
  406. }
  407. DeleteDC(g_backBuffer.hdc2);
  408. DeleteDC(g_backBuffer.hdc);
  409. }
  410. }
  411.  
  412. BOOL CreateObjects(HWND hwnd)
  413. {
  414.  
  415.    HDC hdc;
  416.    BITMAP bm;
  417.  
  418.    hdc = GetDC ( hwnd );
  419.  
  420.    g_background.hdc = CreateCompatibleDC(hdc);
  421.    g_background.hbmp = (HBITMAP)LoadImage(NULL, "pic.bmp", IMAGE_BITMAP,0,0,LR_LOADFROMFILE | LR_DEFAULTSIZE);
  422.  
  423.    if (g_background.hbmp == NULL) {
  424.        ReleaseDC(hwnd, hdc);
  425.        return FALSE;
  426.    }
  427.  
  428.    g_background.hbmpPrev = (HBITMAP)SelectObject(g_background.hdc, g_background.hbmp);
  429.  
  430.    g_background.amplitude = 10.0;
  431.    g_background.frequency = 1 * ((3.14 * 2)/320);
  432.  
  433.    GetObject(g_background.hbmp, sizeof(BITMAP), &bm);
  434.    g_background.x = 0;
  435.    g_background.y = 0;
  436.    g_background.cx = bm.bmWidth+320;
  437.    g_background.cy = bm.bmHeight;
  438.  
  439.    ReleaseDC(hwnd, hdc);
  440.  
  441.    return TRUE;
  442.  
  443. }
  444.  
  445. void DestroyObjects()
  446. {
  447.  
  448.    if (g_background.hdc != NULL){
  449.        if (g_background.hbmp != NULL){
  450.  
  451.            SelectObject(g_background.hdc, g_background.hbmpPrev);
  452.            DeleteObject(g_background.hbmp);
  453.        }
  454.        DeleteDC(g_background.hdc);
  455.    }
  456. }
  457.  
  458.  
  459. void Update(void)
  460. {
  461.  
  462. Distort_Bitmap();
  463.  
  464. }
  465.  
  466.  
  467. void Render(void)
  468. {
  469. RECT rc;
  470.  
  471. SetRect(&rc, 0, 0, g_backBuffer.cx, g_backBuffer.cy);
  472. FillRect(g_backBuffer.hdc, &rc, g_backBuffer.hbr);
  473.    FillRect(g_backBuffer.hdc2, &rc, g_backBuffer.hbr); //added
  474.  
  475.  Update();
  476. }
  477.  
  478. void Show(void)
  479. {
  480. HDC hdc;
  481.  
  482. hdc = GetDC(g_backBuffer.hwnd);
  483.  
  484. BitBlt(hdc, 0, 0, g_backBuffer.cx, g_backBuffer.cy, g_backBuffer.hdc2, 0, 0, SRCCOPY);
  485.  
  486. ReleaseDC(g_backBuffer.hwnd, hdc);
  487. }
  488.  
  489. void Distort_Bitmap(void)
  490. {
  491.  
  492.    for (int i=0; i &lt; g_background.cy; i++) {
  493.  
  494.      int stretchFactor = g_background.amplitude*(sin(g_background.frequency*(i+g_background.offset)));
  495.      BitBlt(g_backBuffer.hdc,g_background.frequency*sin(3.14)+80,i+(stretchFactor)+80, 320, 2, g_background.hdc, 0, i, SRCCOPY);
  496.    g_background.offset+=0.2;
  497.    if (g_background.offset &gt;=g_background.cx) g_background.offset =0;
  498.    }
  499.  
  500.    for (int i=0; i &lt; g_background.cx; i++) {
  501.  
  502.      int stretchFactor = g_background.amplitude*(sin(g_background.frequency*(i+g_background.offset)));
  503.    
  504.        BitBlt(g_backBuffer.hdc2,g_background.x+(i+stretchFactor)+80,g_background.y+80, 2,255, g_backBuffer.hdc, i, 0, SRCCOPY);
  505.        g_background.offset+=0.2;
  506.    if (g_background.offset &gt;=g_background.cx) g_background.offset =0;
  507.    }
  508.  
  509. }
  510.  
  511. </pre>
  512. <p>
  513. &nbsp;</p>
  514. ]]></description>
  515. <pubDate>Sun, 15 Jan 2023 16:22:40 +0000</pubDate>
  516. <guid>http://www.rohitab.com/discuss/topic/51073-win32-increased-cpu-usage-when-using-multiple-buffers/</guid>
  517. </item>
  518. <item>
  519. <title>Wireless Wep Key Cracking</title>
  520. <link>http://www.rohitab.com/discuss/topic/29793-wireless-wep-key-cracking/</link>
  521. <description><![CDATA[WEP Cracking by %ebx<br /><br /><span style='color: #ff0000'>DISCLAIMER: I DO NOT encourage cracking others wireless protection!. This is illegal! The AP I'm cracking belongs to me and I wrote this as a proof of concept. There's a reason they have a key, they don't want you stealing their bandwidth!</span><br /><br />That beeing said:<br />Why would you want to crack WEP protected wireless networks?<br />1. Because you don't have a internet connection and that bastard neighbor of yours has the money to get one<br />2. Your dad pulls your ethernet cable out every night at 10 so you don't stay up all night talking to some bimbo<br />3. Because you can and you want to!<br /><br />What do you need?<br />1. A wireless network card(obviouslly) with drivers up and running. Your need your driver to be able to inject packets, otherwise you're gonna spend days gathering enough packets for a successful crack. I had to recompile my kernel module because I use a damn Broadcom card, and injection wouldn't work..not sure why.<br />2. Linux (Ubuntu Gutsy in this case), though you can do this from Windows and MacOS too, with the appropriate software.<br />3. The aircrack-ng suite <pre title='C Source' class='brush:c'>$sudo apt-get install aircrack-ng</pre><br />Ok..off we go<br /><br />[NOTE] I color coded the "sensitive" information: AP MAC address, AP Name, miscelaneous MAC addresses and my MAC address. There's a legend on the bottom with the colours and what they correspond to<br /><br />So..how do we crack WEP? Well basically...whenever a wireless card "talks" to a access point (AP from now on), it sends/receives some interesting info along with the packets, info that can be used to get the actual WEP key(using the aircrack utility).<br />What we need is to gather enough packets so that aircrack can do it's job<br /><br />[NOTE] eth0 is our wireless card for the remaining of this tutorial<br /><br /><strong class='bbc'><span style='color: #006400'>STEP 1:</span></strong><br /><br />We must put the wireless card in monitor mode. A wireless card in monitor mode basically allows us to sniff all the wireless traffic around us<br />We do this by issuing the following command: [check screenshot 1]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo airmon-ng start eth0</pre>You should see "monitor mode enabled" in there. That means we're good and can proceed to the next step<br /><br /><strong class='bbc'><span style='color: #006400'>Step 2:</span></strong><br /><br />In this step we need to get the MAC address of the AP we're after, the AP name and the channel it's on. To do this we first sniff all the traffic so we can see what AP we're gonna focus on(the one with more beacons/data usually, if we want a random crack, or a specific one if you're set on someone "special")<br /><br />We do this by running: [check screenshot 1]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo airodump-ng eth0</pre>You should get a screen similar to the one in screenshot 2<br /><br />I grayed out everything I don't need. The important part is the line with the AP I got my eyes on, the one with red. We just make a note of the MAC address, the AP name and the channel the AP is on. <br /><br /><strong class='bbc'><span style='color: #006400'>Step 3:</span></strong><br /><br />This is the step where we actually start capturing packets for use in the cracking<br />We do this by running: [check screenshot 3]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo airodump-ng -c 1 --bssid &#91;THE AP MAC ADDRESS&#93; -w capture eth0</pre>This starts the actual capture of packets. It captures all traffic on channel 1 (the channel the AP was on), but only the traffic going to our AP, and saves the packets in a file called capture-01.cap (airodump-ng adds the -01.cap)<br /><br />You should get something similar to screenshot 4. The "#Data" field is what were's interested in getting high enough. We need thousands of packets to have a successful crack.<br /><br />This is all fine and dandy, and we could just leave this for...hmmm...days 'till it gathers enough packets...Or we could speed the process QUITE A LOT! by using aireplay-ng <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/smile.gif' class='bbc_emoticon' alt=':)' /></span> <br /><br /><strong class='bbc'><span style='color: #006400'>Step 4:</span></strong><br /><br />In this step we speed things up by sending a lot of packets to the AP, so we get responses from it (responses that contain that interesting data we're after <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/wink.gif' class='bbc_emoticon' alt=';)' /></span> <br />This is done in 2 steps<br />I'm not going to explain the options I use, just trust me <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/smile.gif' class='bbc_emoticon' alt=':)' /></span> . Or run aireplay-ng with no options so you can see the available options<br /><br />A. First we need to associate out wireless card with the AP so it accepts packets from us [check screenshot 5]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo aireplay-ng -1 0 -e &#91;AP NAME&#93; -a &#91;AP MAC ADDRESS&#93; -h &#91;MY MAC ADDRESS&#93; eth0</pre><br />If we get "Association successful :-)" then we can proceed to the next step of the packet sending speed up, otherwise something is wrong, eiter you're to far away from the AP, or it has MAC filtering enabled.<br />If we have a successful association, then we can see our MAC address appears as associated to the AP (check screenshot 5 - the left terminal)<br /><br />B. Now we need to start sending packets. Again I'm not going to explain the options used, just RTFM! <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/tongue.gif' class='bbc_emoticon' alt=':P' /></span> [check screenshot 6]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo aireplay-ng -3 -b &#91;AP MAC ADDRESS&#93; -h &#91;MY MAC ADDRESS&#93; -x 100 eth0</pre><br />After a bit of packet reading you should see the sent packets run like crazy, wich also makes our "#Data" field go up like there's no tomorrow!. This is good news. If this step fails, your card/driver probably doesn't have injection capabilities..wich is bad news. But not entirely, just means that you're gonna spend a whole lot more time in cracking because packets come in A LOT slower!<br /><br />This is it...now we just need to sit and wait for enough packets so we can begin our crack. You can just wait and try running the next step from time to time, or do it like I do, run the next step now as it updates the reading realtime.<br /><br /><strong class='bbc'><span style='color: #006400'>Step 5:</span></strong><br /><br />In this step we start cracking the WEP using aircrack-ng [check screenshot 7]<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo aircrack-ng -n 64 -f 4 capture-01.cap</pre>"-n 64" tells aircrack-ng to crack a  64 bit WEP (I already know the key is 64 bit as I have cracked it before <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/tongue.gif' class='bbc_emoticon' alt=':P' /></span> ). If not sure test with "-n 64" of with no "-n" at all if that fails.<br />"-f" is the fudge factor. If cracking doesn't work, try raising this to some other value(below 32)<br />If enough packets were gathered, you WILL have a successfull crack.<br />With 250.000 packets I (well aircrack-ng) cracked the key in 3 seconds! [check screenshot 8]<br /><br />We get the key in HEX and ASCII. We will be using the ASCII one.<br />This is it. We have the key, now all there's left is to use it!<br />Now we can just stop capturing (CTRL+C in the other 2 terminals, then close them).<br />After packet capturing is over, we need to take our card OUT of monitor mode<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo airmon-ng stop eth0</pre><br /><strong class='bbc'><span style='color: #006400'>Step 6:</span></strong><br /><br />This is optional. You could use any GUI manager to set things up, but I prefer doing it manually<br /><pre title='C Source' class='brush:c'>ebx@skynet&#58;-$ sudo iwconfig eth0 essid &#91;AP NAME&#93;
  522. ebx@skynet&#58;-$ sudo iwconfig eth0 ap &#91;AP MAC ADDRESS&#93;
  523. ebx@skynet&#58;-$ sudo iwconfig eth0 key on
  524. ebx@skynet&#58;-$ sudo iwconfig eth0 key s&#58;&#91;THE ASCII KEY&#93;
  525. ebx@skynet&#58;-$ sudo dhclient eth0</pre><br />Enjoy <span rel='lightbox'><img class='bbc_img' src='http://www.rohitab.com/discuss/public/style_emoticons/default/smile.gif' class='bbc_emoticon' alt=':)' /></span><div id='attach_wrap' class='clearfix'>
  526. <h4>Attached Thumbnails</h4>
  527. <ul>
  528. <li class=''>
  529. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1907-0-12390200-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026136.jpg" title="1.jpg - Size: 477.98KB, Downloads: 1039"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026136_thumb.jpg" id='ipb-attach-img-1907-0-12390200-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="1.jpg" /></a>
  530.  
  531.  
  532. </li>
  533.  
  534. <li class=''>
  535. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1908-0-12397700-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026147.jpg" title="2.jpg - Size: 500.89KB, Downloads: 853"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026147_thumb.jpg" id='ipb-attach-img-1908-0-12397700-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="2.jpg" /></a>
  536.  
  537.  
  538. </li>
  539.  
  540. <li class=''>
  541. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1909-0-12401500-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026157.jpg" title="3.jpg - Size: 512.07KB, Downloads: 640"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026157_thumb.jpg" id='ipb-attach-img-1909-0-12401500-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="3.jpg" /></a>
  542.  
  543.  
  544. </li>
  545.  
  546. <li class=''>
  547. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1910-0-12405000-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026166.jpg" title="4.jpg - Size: 492.87KB, Downloads: 572"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026166_thumb.jpg" id='ipb-attach-img-1910-0-12405000-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="4.jpg" /></a>
  548.  
  549.  
  550. </li>
  551.  
  552. <li class=''>
  553. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1911-0-12408200-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026176.jpg" title="5.jpg - Size: 479.45KB, Downloads: 569"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026176_thumb.jpg" id='ipb-attach-img-1911-0-12408200-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="5.jpg" /></a>
  554.  
  555.  
  556. </li>
  557.  
  558. <li class=''>
  559. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1912-0-12411400-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026185.jpg" title="6.jpg - Size: 519.63KB, Downloads: 550"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026185_thumb.jpg" id='ipb-attach-img-1912-0-12411400-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="6.jpg" /></a>
  560.  
  561.  
  562. </li>
  563.  
  564. <li class=''>
  565. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1913-0-12414600-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026197.jpg" title="7.jpg - Size: 537.09KB, Downloads: 561"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026197_thumb.jpg" id='ipb-attach-img-1913-0-12414600-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="7.jpg" /></a>
  566.  
  567.  
  568. </li>
  569.  
  570. <li class=''>
  571. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1914-0-12418700-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026209.jpg" title="8.jpg - Size: 593.21KB, Downloads: 713"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026209_thumb.jpg" id='ipb-attach-img-1914-0-12418700-1716144437' style='width:100;height:63' class='attach' width="100" height="63" alt="8.jpg" /></a>
  572.  
  573.  
  574. </li>
  575.  
  576. <li class=''>
  577. <a class='resized_img' rel='lightbox[10036155]' id='ipb-attach-url-1915-0-12423700-1716144437' href="/discuss/uploads/monthly_03_2008/post-9807-1206026215.jpg" title="legend.jpg - Size: 54.04KB, Downloads: 650"><img itemprop="image" src="/discuss/uploads/monthly_03_2008/post-9807-1206026215_thumb.jpg" id='ipb-attach-img-1915-0-12423700-1716144437' style='width:100;height:36' class='attach' width="100" height="36" alt="legend.jpg" /></a>
  578.  
  579.  
  580. </li>
  581. </ul>
  582. </div>]]></description>
  583. <pubDate>Sat, 14 Jan 2023 08:43:03 +0000</pubDate>
  584. <guid>http://www.rohitab.com/discuss/topic/29793-wireless-wep-key-cracking/</guid>
  585. </item>
  586. <item>
  587. <title>A small gfx engine with fireworks</title>
  588. <link>http://www.rohitab.com/discuss/topic/55614-a-small-gfx-engine-with-fireworks/</link>
  589. <description><![CDATA[<p>Hello!<br><br>
  590. It's been a long time my friends but hopefully some of you old-timer's still lurking around here.&nbsp; <img src='http://www.rohitab.com/discuss/public/style_emoticons/default/thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' /></p>
  591. <p>Just recently I browsed through this forum, re-read some of my old posts and topics and figured I might as well post something for old times sake.</p>
  592. <p>&nbsp;</p>
  593. <p>Attached to this post is a small and simple graphics engine for software rendering I wrote a long time ago, there's some fireworks and some very basic reflections to look at.</p>
  594. <p>For those interested in getting into some graphics development, it could be a useful resource.</p>
  595. <p>&nbsp;</p>
  596. <p>Happy coding!</p>
  597. <p>&nbsp;</p>
  598. <p>Screenshot</p>
  599. <p><a class='resized_img' rel='lightbox[10182447]' id='ipb-attach-url-5191-0-13123800-1716144437' href="/discuss/uploads/monthly_10_2022/post-19354-0-47479600-1665510092.png" title="gfxeEngine.png - Size: 218.17KB, Downloads: 95"><img itemprop="image" src="/discuss/uploads/monthly_10_2022/post-19354-0-47479600-1665510092_thumb.png" id='ipb-attach-img-5191-0-13123800-1716144437' style='width:100;height:73' class='attach' width="100" height="73" alt="gfxeEngine.png" /></a>
  600.  
  601. </p>
  602. <p>&nbsp;</p>
  603. <p><a href="http://www.rohitab.com/discuss/index.php?app=core&module=attach&section=attach&attach_id=5193" title="Download attachment"><img src="http://www.rohitab.com/discuss/public/style_extra/mime_types/zip.gif" alt="Attached File" /></a>
  604. &nbsp;<a href="http://www.rohitab.com/discuss/index.php?app=core&module=attach&section=attach&attach_id=5193" title="Download attachment"><strong>gfxEngine.zip</strong></a> &nbsp;&nbsp;<span class='desc'><strong>206.3KB</strong></span>
  605. &nbsp;&nbsp;<span class="desc lighter">395 downloads</span></p>
  606. <div id='attach_wrap' class='clearfix'>
  607. <h4>Attached Files</h4>
  608. <ul>
  609. <li class='attachment'>
  610. <a href="http://www.rohitab.com/discuss/index.php?app=core&module=attach&section=attach&attach_id=5192" title="Download attachment"><img src="http://www.rohitab.com/discuss/public/style_extra/mime_types/zip.gif" alt="Attached File" /></a>
  611. &nbsp;<a href="http://www.rohitab.com/discuss/index.php?app=core&module=attach&section=attach&attach_id=5192" title="Download attachment"><strong>gfxEngine.zip</strong></a> &nbsp;&nbsp;<span class='desc'><strong>195.21KB</strong></span>
  612. &nbsp;&nbsp;<span class="desc lighter">419 downloads</span>
  613. </li>
  614. </ul>
  615. </div>]]></description>
  616. <pubDate>Sat, 12 Nov 2022 01:46:09 +0000</pubDate>
  617. <guid>http://www.rohitab.com/discuss/topic/55614-a-small-gfx-engine-with-fireworks/</guid>
  618. </item>
  619. <item>
  620. <title>What you Listened today, Megathread</title>
  621. <link>http://www.rohitab.com/discuss/topic/42296-what-you-listened-today-megathread/</link>
  622. <description><![CDATA[<p>Let's start a thread for posting our daily picks of music.</p>
  623. <p>&nbsp;</p>
  624. <p>&nbsp;</p>
  625. <p>I'll start it off with some</p>
  626. <p>&nbsp;</p>
  627. <p>Vials of Wrath</p>
  628. <p>&nbsp;</p>
  629. <p><iframe id="ytplayer" class="EmbeddedVideo" type="text/html" width="640" height="390" src="http://youtube.com/embed/B7pkYFwZcD8?html5=1&fs=1" frameborder="0" allowfullscreen webkitallowfullscreen /></iframe></p>
  630. ]]></description>
  631. <pubDate>Thu, 21 Apr 2022 15:56:12 +0000</pubDate>
  632. <guid>http://www.rohitab.com/discuss/topic/42296-what-you-listened-today-megathread/</guid>
  633. </item>
  634. <item>
  635. <title><![CDATA[Can't Post?]]></title>
  636. <link>http://www.rohitab.com/discuss/topic/8249-cant-post/</link>
  637. <description><![CDATA[Some members seem to not be able to post, they can post in the "BOSS" Section but cant post/topic any where else, if you have this problem this SHOULD work:<br /><br />Clear all your cookies and temp files<br /><br />I believe there is some thing wrong with the cookie script, if you have this problem and still isnt fixed, email <a href='mailto:bunny@dumbtech.com' class='bbc_url' title='External link' rel='nofollow external'>bunny@dumbtech.com</a> or <a href='mailto:mott@secure-security.com' class='bbc_url' title='External link' rel='nofollow external'>mott@secure-security.com</a>]]></description>
  638. <pubDate>Thu, 13 Jan 2022 14:20:28 +0000</pubDate>
  639. <guid>http://www.rohitab.com/discuss/topic/8249-cant-post/</guid>
  640. </item>
  641. <item>
  642. <title>hello</title>
  643. <link>http://www.rohitab.com/discuss/topic/44224-hello/</link>
  644. <description><![CDATA[<div>Hello Everyone.</div>
  645. <div>I am here to introduce myself.</div>
  646. <div>I am from India.I love exploring about new things,gaining knowledge,Uhani I am the explorer of Knowledge.</div>
  647. <div>Waiting for someone to welcome me.</div>
  648. <div>&nbsp;</div>
  649. <div>&nbsp;</div>
  650. <div>Regards,</div>
  651. <div>Ohani</div>
  652. <div>&nbsp;</div>
  653. <div>&nbsp;</div>
  654. <div><span style="font-size:8px;"><a href='http://www.admissioninfo.co.in/bms-college-of-engineering.html' class='bbc_url' title='External link' rel='nofollow external'>bms college of engineering management quota admission</a><a href='http://www.admissioninfo.co.in/bms-college-of-engineering.html' class='bbc_url' title='External link' rel='nofollow external'>bms college of engineering direct admission</a><a href='http://www.admissioninfo.co.in/new-horizon-college-of-engineering.html' class='bbc_url' title='External link' rel='nofollow external'>New Horizon college of Engineering&nbsp; Admission</a><a href='http://www.admissioninfo.co.in/sir-mvit-m-visvesvaraya-institute-of-technology-bangalore-b-e-mba-mca-m-tech.html' class='bbc_url' title='External link' rel='nofollow external'>Sir M Visvesvaraya Institute of Technology Admission</a><a href='http://www.admissioninfo.co.in/rv-college-of-engineering.html' class='bbc_url' title='External link' rel='nofollow external'>RV College of Engineering Direct Admission</a></span></div>]]></description>
  655. <pubDate>Tue, 11 Jan 2022 07:39:16 +0000</pubDate>
  656. <guid>http://www.rohitab.com/discuss/topic/44224-hello/</guid>
  657. </item>
  658. <item>
  659. <title><![CDATA[I've waited weeks for my post to show up]]></title>
  660. <link>http://www.rohitab.com/discuss/topic/44591-ive-waited-weeks-for-my-post-to-show-up/</link>
  661. <description><![CDATA[<p>Like for real, weeks. if you dont have any moderators to approve the posts, at least remove the restriction. This is a good way to make your forum die.</p>
  662. ]]></description>
  663. <pubDate>Sat, 08 Jan 2022 18:55:45 +0000</pubDate>
  664. <guid>http://www.rohitab.com/discuss/topic/44591-ive-waited-weeks-for-my-post-to-show-up/</guid>
  665. </item>
  666. <item>
  667. <title>How to play with virtual memory? write to randomized places?</title>
  668. <link>http://www.rohitab.com/discuss/topic/42575-how-to-play-with-virtual-memory-write-to-randomized-places/</link>
  669. <description><![CDATA[<p>Hello rohitabs,</p>
  670. <p>&nbsp;</p>
  671. <p>I am very interested in playing with windows processes' memory but I don't know enough about the windows API. Firstly I would like to know how to map virtual memory, I don't know if this is really useful, but I would like to use that knowledge to map the memory and create memory dumps (Even I know of the existence of minidumps) probably using ReadProcessMemory() ?</p>
  672. <p>&nbsp;</p>
  673. <p>Also, there's something I can't understand completely. If I found the address of a value which changes in every boot (because of ASLR) how would I do to change it from my program? Thanks <img src='http://www.rohitab.com/discuss/public/style_emoticons/default/thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' /></p>
  674. <p>&nbsp;</p>
  675. <p>Regards,</p>
  676. <p>Pedro.</p>
  677. ]]></description>
  678. <pubDate>Sat, 08 Jan 2022 18:54:47 +0000</pubDate>
  679. <guid>http://www.rohitab.com/discuss/topic/42575-how-to-play-with-virtual-memory-write-to-randomized-places/</guid>
  680. </item>
  681. </channel>
  682. </rss>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//www.rohitab.com/discuss/rss/forums/1-new-topics/

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda