Answer
stringlengths
38
29k
Id
stringlengths
1
5
CreationDate
stringlengths
23
23
Body
stringlengths
55
28.6k
Title
stringlengths
15
145
Tags
stringlengths
3
68
<h2>Direct Detection</h2> <p>At the lowest level you can just have copies of the libraries and check if they are the one used. </p> <h2>Signature based Detection</h2> <p>At a higher level than that is <a href="https://www.hex-rays.com/products/ida/tech/flirt/index.shtml">IDA FLIRT</a> which stores just enough inform...
1
2013-03-19T19:05:55.320
<p>When we're doing reverse engineering, we have a few levels of models. One of them is the instruction semantics model, which tells us what every native instruction does to modify instruction state. We're making progress there. However, another problem is that of platform semantics, which is at a higher level. </p> <...
What is the current state of the art for platform modeling?
|code-modeling|
<p>As others have said, I usually look for a function call where a reference is passed - but I also look for instances where a malloc'ed buffer is returned (this is how you know/confirm the size of the structure) - and various members of the 'buffer' are set/initialized.</p>
4
2013-03-19T19:24:53.760
<p>I took a basic 40-hr Reverse Engineering course a few summers ago. While teaching us to use IDAPro, the instructor demonstrated, rather quickly and without explaining much, how to label certain variables in the ASM as members of a structure, basically equivalent to a good old fashioned <code>struct</code> in C/C++, ...
How is a structure located within a disassembled program?
|ida|assembly|struct|
<blockquote> <p>There are many great resources to learn assembly but none of them seem to go into much detail on how assembly mnemonics get turned into raw binary instructions.</p> </blockquote> <p>The mnemonics aren't 'turned in' to raw binary instructions, they are the raw binary instructions. It is a human readable ...
5
2013-03-19T19:30:22.060
<p>I'm writing a small utility library for hooking functions at run time. I need to find out the length of the first few instructions because I don't want to assume anything or require the developer to manually input the amount of bytes to relocate and overwrite.</p> <p>There are many great resources to learn assembly...
How are x86 CPU instructions encoded?
|assembly|x86|
<p>I guess the first thing you should do to determine the compiler version unless you literally mean the compiler version instead of linker version, is inspect the "MajorLinkerVersion" and "MinorLinkerVersion" fields of the PE header of the executable, be it EXE, DLL, or SYS. See list below.</p> <p>Major Minor</...
11
2013-03-19T20:01:48.563
<p>When I am looking at the machine code of an application, are there hints and patterns I can discern from the generated machine code which would indicate which compiler (and possibly version) was used to generate it?</p> <p>Does knowing the compiler used to generate an application help me to more effectively reverse...
What hints in machine code can point me to the compiler which was used to generate it?
|assembly|compilers|object-code|hll-mapping|
<p>Literally, for a first look on malware, you won't need anything special locally installed. There are enough online sandboxes you may use:</p> <ul> <li><a href="https://www.virustotal.com/" rel="noreferrer">virustotal.com</a> have their sandbox implemented using <a href="http://www.cuckoosandbox.org/" rel="noreferre...
23
2013-03-19T21:27:57.400
<p>I've recently managed to isolate and archive a few files that managed to wreak havoc on one of my client's systems. So I was wondering what software and techniques make the best sandbox for isolating the code and digging into it to find out how it works.</p> <p>Usually, up to this point in time I would just fire up...
How can I analyze a potentially harmful binary safely?
|virtual-machines|malware|sandbox|security|
<p>Well, since it's a Solaris driver, first you need to find up some docs on how Solaris drivers communicate with the kernel (or kernel with them). A quick search turned up <a href="http://docs.oracle.com/cd/E19455-01/806-0638/6j9vrvct2/index.html" rel="nofollow">this</a>:</p> <blockquote> <p><code>_init()</code> in...
27
2013-03-19T22:51:02.077
<p>I have several Solaris 2.6 era drivers I would like to reverse engineer.</p> <p>I have a Sparc disassembler which provides some info but it isn't maintained anymore so I think it may not give me all the information possible.</p> <p>The drivers are for an Sbus graphics accelerator I own. Namely the <a href="http://...
Reverse engineering a Solaris driver
|sparc|solaris|driver|sbus|
<p>You can simply grep the file for "<code>javaw.exe</code>" or <code>java.exe</code>... This will usually be a pretty good indicator whether or not the program is a Java wrapper or not.</p> <pre><code>archenoth@Hathor ~/apps/Minecraft $ grep javaw.exe /host/Windows/notepad.exe archenoth@Hathor ~/apps/Minecraft $ gre...
34
2013-03-20T01:43:12.077
<p>Let's say I have a .jar file and wrap it into a .exe using any number of free utilities out there, like <a href="http://jsmooth.sourceforge.net/">JSmooth</a>.</p> <p>Would it be possible to tell, given just the .exe, if it was generated using one such utility from a .jar file?</p>
Checking if an .exe is actually a .jar wrapped in an .exe
|decompilation|java|jar|pe|
<p>Another tool is <strong>Bytecode Viewer</strong>: </p> <p><a href="https://github.com/Konloch/bytecode-viewer" rel="nofollow">https://github.com/Konloch/bytecode-viewer</a></p> <blockquote> <p>Bytecode Viewer is an Advanced Lightweight Java Bytecode Viewer, GUI Java Decompiler, GUI Bytecode Editor, GUI Smali, ...
42
2013-03-20T09:02:41.433
<p>The Android java code is compiled into Dalvik byte code, which is quite readable. I wonder, is it possible in theory and in practice to write a decompilation software for Dalvik byte code?</p>
Decompiling Android application
|decompilation|java|android|byte-code|
<p>They aren't any, do not try to do the mathematically impossible.</p> <blockquote> <p>For now, all the techniques I found on Internet were easily worked around as soon as the anti-debug technique has been understood. So, I wonder if there are stronger ones.</p> </blockquote> <p>Yes, because there is no way of detecti...
43
2013-03-20T09:13:52.113
<p>I am trying to scan all possible techniques to disrupt the usage of a debugger on a Unix platform (ie POSIX and a bit more).</p> <p>I am thinking about techniques such as the <code>PTRACE</code> test at the beginning of a program (or at various points of its execution), the insertion of fake breakpoints (eg <code>i...
Anti-debug techniques on Unix platforms?
|assembly|obfuscation|anti-debugging|
<p>What is functional encryption for all circuits and indistinguishability obfuscation for all circuits ?</p> <ol> <li>A proposed <strong>indistinguishability obfuscation</strong> for NC1 circuits where the security is based on the so called Multilinear Jigsaw Puzzles (a simplified variant of multilinear maps).</li> <...
45
2013-03-20T09:35:01.860
<p>FHE (Fully Homomorphic Encryption) is a cryptographic encryption schema in which it is possible to perform arithmetic operations on the ciphered text without deciphering it.</p> <p>Though there is no really efficient crypto-system with this property at this time, several proofs of concepts show that this kind of cr...
Usage of FHE in obfuscation?
|obfuscation|cryptography|
<p>While it's not possible to obfuscate object files, it is possible to obfuscate the underlying assembly file. There is no such thing as name obfuscation in C++ since references are by address, not by name. Using full optimization (-O3 -Ob2 -flto) can also make it hard to reverse engineer your code. Also, you can also...
47
2013-03-20T09:43:11.807
<p>Is it possible to create an object file using <code>gcc</code> that cannot be reverse engineered to its source code ?</p>
Can I create an object file using gcc that cannot be reverse engineered?
|c|object-code|
<p>This <a href="http://jsbeautifier.org/" rel="noreferrer">also breaks some beautifers</a> (but <a href="http://www.javascriptbeautifier.com/" rel="noreferrer">not all</a>). For example, running your code through JS Beautifier:</p> <pre><code> var ab = "Hello, world!", a‍ b = "Completely different string!", ...
53
2013-03-20T12:06:39.137
<p>This comes from comments on a question on StackOverflow about JavaScript Variables: <a href="https://stackoverflow.com/a/7451569/1317805">Why aren't ◎ܫ◎ and ☺ valid JavaScript variable names?</a></p> <p>JavaScript accepts zero-width characters as valid variable names, for example all three of these variables have d...
Obfuscating JavaScript with zero-width characters - pros and cons?
|obfuscation|javascript|
<p>I'd like to add <a href="http://www.idabook.com/collabreate" rel="nofollow">collabREate</a> - plugin, which allow to do reverse engineering in the small team, all share the same IDA session.</p>
59
2013-03-20T12:57:53.483
<p>I'm a bit of a novice with IDA Pro, and have been discovering some of the excellent plugins available from the RE community as well as its vendors. My small list of plugins that I have found extremely valuable to me are:</p> <ul> <li><a href="https://www.hex-rays.com/products/decompiler/index.shtml">Hex-Rays Decomp...
What are the essential IDA Plugins or IDA Python scripts that you use?
|tools|ida|idapython|
<p>I think questions beginning with the clause "Is it legal to..." can only ever be correctly answered with certainty in a court of law. And as @0xC0000022L mentioned, you'd need to start by specifying which country you're asking about.</p> <p>Short of going to court, I think such questions can only ever be answered c...
60
2013-03-20T13:14:09.463
<p>Is it legal to reverse engineer certain features of a closed source application and then integrate those features into a closed or open source application that may be either a commercial or non-commercial application ?</p> <hr> <p>Brownie points for an answer covering the situation in India.</p>
Is reverse engineering and using parts of a closed source application legal?
|law|
<p>Blackstorm portal has a huge collection of Unpacking tutorials <a href="http://portal.b-at-s.net/news.php" rel="noreferrer">Blackstorm portal tutorials</a></p> <p>Tuts4You has another large collection of unpacking tutorials <a href="https://tuts4you.com/download.php?list.19" rel="noreferrer">Tuts4You</a></p> <p>It...
72
2013-03-20T15:25:47.117
<p>I find that more and more often binaries are being packed with exe protectors such as upx, aspack etc. I tried to follow a few tutorials on how to unpack them but the examples are often quite easy while my targets are not.</p> <p>I am looking for good resources and any hints/tips on how to unpack targets.</p>
Unpacking binaries in a generic way
|decompilation|unpacking|pe|
<p>The <a href="http://radare.org" rel="nofollow">radare2</a> project uses an extensive <a href="https://github.com/radare/radare2-regressions/tree/master/t.asm" rel="nofollow">test-suite</a> for each of its disassembler engine, along with more specific tests, like <a href="https://github.com/radare/radare2-regressions...
74
2013-03-20T15:56:57.997
<p>A key tool in reverse engineering is a good disassembler, so to ensure that a disassembler is performing properly, are there any good test suites available for use to test the correctness of a disassembler? Are these architecture specific, or can they be configured to work across multiple object architectures? A g...
Are there any open source test suites for testing how well a disassembler performs?
|tools|disassembly|
<p>.NET assemblies (.exe and .dll) can be decompiled online at <a href="http://decompiler.com" rel="nofollow noreferrer">Decompiler.com</a></p> <p>The author is affiliated with the mentioned website it appears (username: <a href="http://www.Decompiler.com" rel="nofollow noreferrer">www.Decompiler.com</a>).</p>
77
2013-03-20T16:18:40.027
<p>Are there any tools available to take an already compiled .dll or .exe file that you know was compiled from C# or Visual Basic and obtain the original source code from it?</p>
Is there any way to decompile a .NET assembly or program?
|decompilation|dll|.net|pe|
<p>RapidSmith does that for you. <a href="http://rapidsmith.sourceforge.net/" rel="nofollow noreferrer">http://rapidsmith.sourceforge.net/</a></p> <p>There is also a paper that you can read as the starting point: "Recent Advances in FPGA Reverse Engineering" Hoyoung Yu, Hansol Lee, Sangil Lee , Youngmin Kim and Hyung...
85
2013-03-20T17:27:34.680
<p>Let's assume I have a device with an FPGA on it, and I managed to extract the bitstream from its flash. How would I go about recovering its behavior?</p> <p>One simple case is if it implements a soft processor - in that case there should be firmware for that processor somewhere and I can just disassemble that. But ...
Reversing an FPGA circuit
|hardware|fpga|
<p>I gave a talk at Recon in 2011 ("Practical C++ Decompilation") on this exact topic. <a href="http://www.hexblog.com/wp-content/uploads/2011/08/Recon-2011-Skochinsky.pdf" rel="nofollow noreferrer">Slides</a> and <a href="https://www.youtube.com/watch?v=efkLG8-G3J0" rel="nofollow noreferrer">video</a> (<a href="https:...
87
2013-03-20T18:09:54.637
<p>When reverse engineering binaries compiled from C++, it is common to see many indirect calls to function pointers in <a href="http://en.wikipedia.org/wiki/Virtual_method_table">vtables</a>. To determine where these calls lead, one must always be aware of the object types expected by the <code>this</code> pointer in...
Static analysis of C++ binaries
|static-analysis|ida|c++|vtables|virtual-functions|
<p>I used <a href="https://noraesae.github.io/perfect-scrollbar/" rel="nofollow noreferrer">https://noraesae.github.io/perfect-scrollbar/</a> that is very similar and easy to use</p>
90
2013-03-20T18:51:19.000
<p>I want to know what jQuery plugins Facebook uses for their special scrollbar, like the two on the left, not the normal one on the right:</p> <p><img src="https://i.stack.imgur.com/odVcU.png" alt="enter image description here"></p> <p>(<a href="http://www.pcworld.com/article/240475/two_important_facebook_hover_tric...
Get used jQuery plugins from website
|javascript|websites|
<p>It is very simple in some architectures, and not very obvious in others. I'll describe a few I'm familiar with.</p> <h2>SystemV x86_64 (Linux, OS X, BSD)</h2> <p>Probably the easiest to recognize. Because of the boneheaded decision to specify the number of used XMM registers in <code>al</code>, most vararg functio...
95
2013-03-20T20:34:26.300
<p>How would a C variable argument function such as <code>printf(char* format, ...)</code> look like when disassembled?</p> <p>Is it always identified by calling convention, or are there more ways to identify it?</p>
Identifying variable args function
|disassembly|calling-conventions|c|
<p>Using ptrace-based dynamic analysis tools on suid binaries makes them run without privileges. Because of this, a copy of the file running as your user is probably sufficient for analysis purposes.</p> <p>When I have had to do this, I used the <a href="http://reverse.lostrealm.com/tools/xocopy.html">xocopy tool</a>,...
98
2013-03-20T21:22:29.067
<p>I have a binary on a Linux (Kernel 2.6) which I can execute, but can't read (chmod 0711). Therefore no static analysis is possible.</p> <pre><code>user1: $ ls -l bin -r-s--x--- user2 user1 bin user1: $ file bin setuid executable, regular file, no read permission </code></pre> <p>I'm looking for different dynamic ...
How can I analyse an executable with no read permission?
|linux|dynamic-analysis|
<p>several possible ways:</p> <ol> <li><p>identify the packer</p> <ul> <li>get standard packers of your platform (<a href="http://upx.sourceforge.net/" rel="nofollow">UPX</a> for example), check if it's not the one used.</li> <li>If it's a standard packer, then maybe you've already won, as it might be documented, or ...
113
2013-03-21T04:24:08.590
<p>Say I have a binary that I'm not able to execute (for example it runs on some device that I don't have one of), but I can disassemble it. I can get the docs on the architecture. (It's MIPS little endian in my case.) But the binary has very few imports, very few strings, etc., so it really seems like it's packed.</p>...
Unpacking binary statically
|obfuscation|unpacking|executable|
<p><strong>Compiler</strong></p> <p>The choice of a compiler has minimal effects on the difficulty to reverse engineer your code. The important things to minimize are all related to information leaks from your code. You want to at least disable any runtime type information (RTTI). The leakage of type information and th...
118
2013-03-21T11:05:10.740
<p>If I am building a C++ application and I want to make it more difficult to reverse engineer, what steps can I take to do this?</p> <ul> <li>Does the choice of compiler affect this?</li> <li>What about compiler flags, presumably a high optimization level would help, what about other flags?</li> <li>Does stripping sy...
What kinds of steps can I take to make my C++ application harder to reverse engineer?
|obfuscation|compilers|c++|symbols|strings|
<p>I think there's a couple of approaches to get where you want. Given your scenario where you have the KB patch on your fully updated system. To get back to the previous version, uninstall that patch.</p> <p>The Metasploit Unleashed class used (still does?) has this command for XP that uninstalls all the patches:</...
120
2013-03-21T12:53:55.163
<p>For the purpose of learning about the complexities involved in writing PoC's (and gaining experience in) one could do patch diffing and have real world vulnerable examples to practice on. For now please disregard the idea of making your own vulnerable programs.</p> <p>For patch diffing I see 3 states an OS can be in...
How to manage/revert to specific OS versions for effective patch diffing?
|windows|operating-systems|
<p>There is a way to recompile with this opensource app, called RetDec:</p> <p><a href="https://github.com/avast-tl/retdec" rel="nofollow noreferrer">https://github.com/avast-tl/retdec</a></p>
125
2013-03-21T14:30:15.477
<p>I have an Arduino Uno Rev3. I would like to extract and find out what code is burned on the ROM of the micro-controller board. </p> <ol> <li>How do I extract the code from the board?</li> <li>How do I figure out the original source code that went into the hex file? </li> </ol>
How do I figure out what is burned on an Arduino ROM?
|decompilation|rom|dumping|
<p>In the paper <a href="http://www.openpcd.org/images/HID-iCLASS-security.pdf">Heart of Darkness - exploring the uncharted backwaters of HID iCLASS TM security </a> is a technique described (section III.C) that might work,but it does require a working device which might not be at hand in your situation.</p> <p>In sho...
128
2013-03-21T15:29:33.923
<p>I have a <a href="http://ww1.microchip.com/downloads/en/devicedoc/39632c.pdf">PIC18F4550</a> from an old device and I need to see the code. I tried reading it using my ICD3 programmer, but the chip seems to have its code protected. How can I get the code anyway?</p>
Get code from protected PIC
|hardware|pic|security|dumping|
<p>I don't think I disassembled any microkernels, but "message passing" is common in at least two categories of programs: Win32 GUI (both raw Win32 and MFC-based), and Objective-C executables.</p> <p>In both cases you have some kind of a central <em>dispatcher routine</em> (or routines) that accept messages and forwar...
143
2013-03-22T02:12:29.987
<p>In a microkernel, much of the interesting functionality happens not with traditional function calls, but instead through message passing between separate entities.</p> <p>Is there a structure that OS architectures like this generally use to implement message passing? And is there a methodical way to label this whil...
Tracing message passing instead of a call stack
|disassembly|static-analysis|operating-systems|
<p>The one stop solution for all pyinstaller exe things. Use this program to reverse engineer a pyinstaller generated exe file. </p> <p><a href="https://sourceforge.net/projects/pyinstallerexerebuilder/" rel="nofollow">https://sourceforge.net/projects/pyinstallerexerebuilder/</a></p>
160
2013-03-22T14:01:31.240
<p>Having recently watched/read a presentation <a href="http://www.trustedsec.com/files/Owning_One_Rule_All_v2.pdf">given by Dave Kennedy at DEF CON 20 [PDF]</a>, I'd like to know how to decompile a Python script compiled with <a href="http://www.pyinstaller.org/">PyInstaller</a>.</p> <p>In his presentation, he is cre...
How do you reverse engineer an EXE "compiled" with PyInstaller
|python|pe|
<ol> <li>get <a href="http://upx.sourceforge.net/" rel="noreferrer">UPX</a></li> <li>make your own UPX-packed ELFs, with different options (LZMA, NRV,...)</li> <li>As UPX is easy to modify, and very often modified, patched or even faked, comparing the code starts will make it easy to check if your target is indeed UPX-...
168
2013-03-22T23:31:46.983
<p>I have an ELF file and want to know if it is UPX packed. How can I detect UPX compression in GNU/Linux?</p>
How to check if an ELF file is UPX packed?
|linux|upx|
<p>There is nothing wrong with using <a href="http://wiki.wireshark.org/Protocols/tds" rel="nofollow">the TDS protocol decoder that comes with WireShark</a>, assuming the connection is established via something that can be sniffed by WireShark. This is <strong>a specialized protocol decoder for <a href="http://msdn.mic...
171
2013-03-23T06:43:39.273
<p>I am reversing a closed-source legacy application that uses Microsoft SQL Server (2005) and I would like to find out precisely what queries are being executed in the background. </p> <p>I understand that it may be possible to use Wireshark to view the network traffic, but it feels quite clumsy so I am looking for s...
Viewing MSSQL transactions between closed-source application and server
|windows|mssql|
<p>Clearly Peter has addressed the main points of proper implementation. Given that I have - without publishing the results - "cracked" two different dongle systems in the past, I'd like to share my insights as well. user276 already hints, in part, at what the problem is.</p> <p>Many software vendors think that they p...
174
2013-03-23T08:39:25.617
<p>Various software companies distribute their software with hardware security, usually a dongle which must be mounted in order for the software to operate.</p> <p>I don't have experience with them, but I wonder, do they really work?</p> <p>What is it that the dongle actually does? I think that the only way to enfor...
Are hardware dongles able to protect your software?
|hardware|security|dongle|
<p>FLIRT stands for <strong>Fast Library Identification and Recognition Technology</strong>.</p> <p>Peter explained the basics, but here's a white paper about how it's implemented:</p> <p><a href="https://www.hex-rays.com/products/ida/tech/flirt/in_depth.shtml">https://www.hex-rays.com/products/ida/tech/flirt/in_dept...
175
2013-03-23T08:48:10.120
<p>I've seen this referenced in a couple of other questions on this site. But what's a FLIRT signature in IDA Pro? And when would I create my own for use?</p>
What is a FLIRT signature?
|ida|flirt-signatures|
<p>&quot;ptrace()&quot; was casually mentioned by Giles. But I think it deserved a whole section by itself. &quot;ptrace()&quot; is a system call API provided by OS (Linux and all UNIX have it, and so do Windows) to exert debug control over another process. When you used PTRACE_ATTACH (as part of ptrace()) to att...
185
2013-03-23T13:55:12.740
<p>I want to add some functionality to an existing binary file. The binary file was created using <code>gcc</code>. </p> <ul> <li>Do I need to decompile the binary first, even though I sufficiently understand the functioning of the program ? </li> <li>How should I go about adding the necessary code ?</li> <li>Do I nee...
How do I add functionality to an existing binary executable?
|linux|c|executable|hll-mapping|
<p>There are various techniques used and I'll list some.</p> <ol> <li><p><strong>Probing while operating</strong> - if you have a probe station you can operate the device and probe intermediate signals within the die. This requires that the encapsulations (usually Si#N4 -or sometimes Polyimide) needs to also have been...
187
2013-03-23T14:05:44.343
<p>I've seen numerous examples of people essentially <a href="http://www.youtube.com/watch?v=mT1FStxAVz4">dissolving away the resin</a> from integrated circuits in boiling high strength acid in order to expose the raw silicon chip underneath. My general understanding is that this has, from time to time, allowed for att...
What kind of information can i get from reverse engineering an integrated circuit package
|hardware|integrated-circuit|
<p>Yep, the answer depends on what exactly you are trying to achieve.</p> <p>In terms of analyzing the .NET app itself, you can get a complete source code by using, e.g. DotPeek written by JetBrains. You can even export it into a fully-functional Visual Studio Project, build it and debug. However, some apps may be obf...
197
2013-03-23T18:38:09.513
<p>A lot of code I encounter today has a considerable amount of code generated at runtime, making analysis extremely laborious and time consuming.</p> <p>Is there any way I can create symbolic names for the various functions introduced by the JIT compiler that keep cropping up, or for the various artifacts (such as ty...
How can I analyze a program that uses a JIT compiled code?
|debuggers|
<p>First, let's see UPX structure.</p> <h1>UPX Structure</h1> <ol> <li><p>Prologue</p> <ol> <li><p>CMP / JNZ for DLLs parameter checks</p></li> <li><p>Pushad, set registers</p></li> <li><p>optional NOP alignment</p></li> </ol></li> <li><p>Decompression algorithm</p> <ul> <li>whether it's NRV or LZMA</li> </ul></li>...
198
2013-03-23T20:12:39.453
<p>Recently I asked a <a href="https://reverseengineering.stackexchange.com/q/168/214"> question about detecting UPX compression</a>. <a href="https://reverseengineering.stackexchange.com/users/245/0xc0000022l">0xC0000022L</a> wanted to know if it was plain UPX. However until that point I only was aware of <a href="htt...
What different UPX formats exist and how do they differ?
|upx|
<p><strong>theZoo</strong><br> theZoo is a project created to make the possibility of malware analysis open and available to the public. Since we have found out that almost all versions of malware are very hard to come by in a way which will allow analysis we have decided to gather all of them for you in an available a...
206
2013-03-23T21:36:15.177
<p>It seems that a popular use of software reverse engineering skills is to reverse malicious code in an effort to build better protection for users.</p> <p>The bottleneck here for people aspiring to break into the security industry through this path seems to be easy access to new malicious code samples to practice on...
Where can I, as an individual, get malware samples to analyze?
|malware|
<p>SetWindowsHookEx isn't really used for this sort of hooking as far as I'm aware. </p> <p>You could hook NtSetInformationThread in the import of the binary you want to analyze and make it always return success on ThreadHideFromDebugger but not forward the call to the actual function. This would be weak since GetProc...
209
2013-03-23T22:18:53.200
<p>I'm sure many of you are familiar with this classic antidebug trick accomplished by calling <code>ZwSetInformationThread</code> with <code>ThreadInformationClass</code> set to 0x11. Although many OllyDbg modules exist for the purposes of revealing the existence of threads hidden with this method, I haven't been able...
Canonical method to circumvent the ZwSetInformationThread antidebugging technique
|windows|anti-debugging|
<p>Most probably Windows 8 is using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa385483%28v=vs.85%29.aspx" rel="nofollow">WinINet</a> to connect with the App Store. If this is the case, you can see the unencrypted streams hooking into the wininet.dll instead of using a proxy. <a href="https://code...
211
2013-03-23T23:42:30.040
<p>In Windows Store application development for Windows 8, there is a class called remoteSettings that lets a developer store batches of data so that the user will have access to it across several machines, as long as they are logged in with the same account. </p> <p>I hooked up WireShark and discovered that the packe...
Decryping TLS packets between Windows 8 apps and Azure
|decryption|windows-8|
<p>Given you have a 14 pin package it could be almost anything from a op-amp(s) to 74XX series logic.</p> <p>Start with a continuity tester and see if there are any pins that are obviously shorted together. If so that would be a big hint that they maybe power rails. Also look for common pinouts (Vcc, Vss on corners ...
230
2013-03-24T13:41:43.673
<p>I found a 14 pin integrated circuit with no visible markings. I have no information about its functioning. How should I go about trying to explore its functionality without <a href="https://reverseengineering.stackexchange.com/questions/187/what-kind-of-information-can-i-get-from-reverse-engineering-an-integrated-ci...
How should I go about investigating an IC's functionality without destroying it?
|hardware|integrated-circuit|
<p>(Answer converted from comment)</p> <p>Recovering the toolchain provenance of the binary code you've specified, at the very least, requires comparing the results of various PIC compilers, I don't know PIC assembly but the last two instructions look interesting for identifying the compiler (Provided your disassemble...
234
2013-03-24T14:59:36.647
<p>I extracted a .hex file from a PIC16F88. For example:</p> <pre><code>:020000040000FA :100000008F3083160F0570388F009B0183129F017C :1000100083169F0107309C0005108312051483127C :1000200003131730A0006730A1002930A2000A1284 :100030008A11A20B17280A128A11A10B15280A127D :100040008A11A00B13280510831203131730A00088 :1000500067...
How to see what compiler made PIC ASM code?
|disassembly|compilers|pic|hex|
<p>The feature is described in a bit more detail on <a href="http://sourceware.org/gdb/wiki/ProcessRecord" rel="noreferrer">GDB wiki</a>:</p> <blockquote> <h2>How it works</h2> <p>Process record and replay works by logging the execution of each machine instruction in the child process (the program being debugged), toge...
243
2013-03-24T17:46:39.220
<p>A curious and useful feature of GDB is <a href="http://sourceware.org/gdb/current/onlinedocs/gdb/Process-Record-and-Replay.html#Process-Record-and-Replay">process recording</a>, allowing an analyst to step forwards and backwards through execution, writing a continuous log of the changes to program state that allow f...
How does GDB's process recording work?
|gdb|debuggers|
<p>courtsey <strong>Hotpatching and the Rise of Third-Party Patches</strong> presentation at BlackHat USA 2006 by <strong>Alexander Sotirov</strong></p> <p><strong>What Is Hotpatching?</strong> Hotpatching is a method for modifying the behavior of an application by modifying its binary code at runtime. It is a common...
250
2013-03-25T09:56:00.087
<p>I see this instruction in the beginning of several Windows programs. It's copying a register to itself, so basically, this acts as a <code>nop</code>. What's the purpose of this instruction?</p>
What is the purpose of 'mov edi, edi'?
|disassembly|windows|
<p>There are several tools that I have used:</p> <ol> <li><a href="http://tuts4you.com/download.php?view.398">PEiD</a> (PE iDentifier)</li> <li>I've also followed <a href="https://code.google.com/p/pefile/wiki/PEiDSignatures">this guide</a> and converted PEiD signatures to YARA signatures and simply used <a href="http...
252
2013-03-25T14:41:09.427
<p>I have an executable file and I would like to figure out which programming language was the source code written in. The first step would be to use a disassembler. </p> <p>What should be done after that ?</p> <p>Also, I read that determining which libraries are used during runtime would be a good indicator of the p...
How should I go about trying to figure out the programming language that was used?
|linux|executable|
<p>I'm the author of <a href="http://rainbowsandpwnies.com/rdis/">rdis</a> and have put a bit of thought into this problem. I recommend taking a look at my <a href="http://rainbowsandpwnies.com/~endeavor/blog/">blog</a> if you have more questions after this.</p> <p>I would also refer you to Andrew Ruef's blog post <a ...
255
2013-03-25T17:02:44.300
<p>A disassembler is supposed to produce a human readable representation of the binary program. But the most well known techniques: <em>linear sweep</em> and <em>recursive traversal</em> (see this <a href="https://reverseengineering.stackexchange.com/questions/139/what-are-the-techniques-disassemblers-use-to-process-a-...
What is a correct disassembler?
|obfuscation|disassembly|static-analysis|
<p>Well, obviously the particulars will very much depend on the particulars of the file format and what you expect to achieve in general. However, some steps will largely be the same. One thing you could do is:</p> <ol> <li>try hard to find all kinds of clues about the format. This can be a small note in some bulletin...
261
2013-03-25T21:45:01.723
<p>How should I begin trying to reverse engineer this file format? The only thing I can think of is saving a simple file, and then dig in with a hex editor. But since the file format may be some kind of archive, that seems like the wrong approach. I've always been a little interested in the idea of reverse-engineering ...
How to reverse engineer a proprietary data file format (e.g. Smartboard Notebook)?
|file-format|
<p>The Legend of R4ndom has a long series on a variety of reversing topics. <strike><a href="http://thelegendofrandom.com/blog/sample-page" rel="nofollow noreferrer">http://thelegendofrandom.com/blog/sample-page</a></strike><br> <a href="http://octopuslabs.io/legend/blog/sample-page.html" rel="nofollow noreferrer">http...
265
2013-03-25T23:14:30.373
<p>Can someone give a list of websites with good (and free) reverse engineering training exercises ?</p>
Where to find (free) training in reverse engineering?
|obfuscation|cryptography|
<p>(I was planning to make it a comment but it turned out rather long and it makes an answer on its own)</p> <p>Some of the comments mentioned the Hex-Rays decompiler. Its basic ideas are not a trade secret and are in fact described in the <a href="https://www.hex-rays.com/products/ida/support/ppt/decompilers_and_beyo...
287
2013-03-26T16:31:58.307
<p>Assuming we have an assembly code, what are the known techniques that could be used to recover the variables used in the original high-level code ?</p> <p><strong>Edit</strong>: By <em>recovering variables</em>, I do not mean <em>recovering variable names</em>, but trying to identify memory locations that are used ...
How to recover variables from an assembly code?
|decompilation|disassembly|static-analysis|
<p>A simple logic analyzer, such as the <a href="http://www.saleae.com/">Saleae</a> is invaluable for finding simple transmit serial pins. Receive serial pins are harder due to them being silent. </p> <p>Are you sure that this is <a href="http://en.wikipedia.org/wiki/RS232">RS232</a> and not just serial? It's pretty r...
291
2013-03-26T16:48:45.367
<p>I have a device with two chips without part numbers. It looks like their using RS232 for serial communication (proper setup, right voltage), but I do not know the bus settings (speed, parity, etc.). Is there any way to determine the bus settings without brute force (trying everything)? </p> <p>I have a multimeter a...
Determining RS232 bus settings
|communication|serial-communication|
<p>My guess is that the protocol is standard, using a non standard protocol between two devices involves using bitbanging which is not very useful. Let's assume then that the protocol is standard. It's not SPI, SPI needs 4 lines To work. I2C needs two, RS232 needs only two. I don't know what the third line job is, mayb...
298
2013-03-26T18:11:01.840
<p>I have two chips that are connected using two lines. One appears to be the clock line (50% duty cycle), but it doesn't have to be (sometimes constant high). The other line appears to be totally random, but still digital. It might be data.</p> <p>There is a third line between the chips, but it appears to be for some...
Determining communication protocol
|communication|pcb|
<p><strong>Non Destructive</strong></p> <p>Highly unlikely to be successful unless you have intimate knowledge of how the pacakges were epoxied together. If you did go this route it might be possible to break down the glue that binds the chips together a REing effort in its own right. Once you did that it might not be...
299
2013-03-26T18:51:06.220
<p>To analyze the communication protocol between two chips running unknown firmware, we eavesdrop into the communication bus between the chips. In the ideal case, this is “just” a matter of matching exposed paths on a PCB with the contacts of a logic analyzer.</p> <p>What if the chips are stacked in a <a href="http://...
Exposing the connectors in a package on package
|integrated-circuit|communication|
<p>It sounds like what you need is node groups. Since the very first implementation (5.0) IDA's graph view allowed to group several nodes into one "super-node" with a custom title. Just select the nodes you want to group with Ctrl-click and choose "Group nodes" from the context menu.</p> <p>For more info, see "Graph n...
302
2013-03-27T00:13:18.707
<p>When reverse engineering programs, I often find functions like the one below. This function in particular has a set of nested if/else blocks (pink boxes) which would typically be fairly easy to follow. When code executes at the blue box however, the code becomes messy and can take either of two independent code pat...
Treating independent code as a function in IDA Pro
|ida|
<p>Somebody at XKCD fora pasted a link to this <a href="https://gist.github.com/cincodenada/5246094">gist</a> which contains a deobfuscated and annotated source along with some explanations: </p> <blockquote> <p>The main part of Javascript that drives xkcd's "Time" comic (<a href="http://xkcd.com/1190/">http://xkcd....
306
2013-03-27T01:16:39.540
<p>The latest (as of now) comic is titled <a href="http://xkcd.com/1190/">"Time"</a>. It's a standard-looking comic though without much action, but the picture's alt title says "Wait for it.". I waited but nothing happened (tried in Opera and IE9) so I took a look at the page source.</p> <p>Next to the picture's <code...
Reverse engineering XKCD 1190
|javascript|websites|
<p>Since you already have the source file, I believe that there is a simpler and easier approach (as compared to rerouting network traffic on low levels would be to intercept the methods being called.)</p> <p>Firstly, identify and replace methods in your php file (remember to make a copy!). For example, if you want to...
310
2013-03-27T08:23:11.430
<p>I have a very messy PHP script of which I need to determine the function. I can't quite understand the code, it's <em>really</em> messy. Now I thought that I perhaps could reverse engineer this script.</p> <p>What I want to do is to run this script (eventually with specific parts commented) to gain a better underst...
Secure RE-ing a PHP script
|tools|php|
<p>Java and .NET both include a feature called &quot;reflection&quot;, which makes it possible to access inner workings of a class and instances thereof, using runtime-generated strings that hold the names of those features. In C code, if one includes a structure definition:</p> <pre><code>struct foo { int x,y,z,super...
311
2013-03-27T10:12:23.533
<p>Java and .NET decompilers can (usually) produce an almost perfect source code, often very close to the original.</p> <p>Why can't the same be done for the native code? I tried a few but they either don't work or produce a mess of gotos and casts with pointers.</p>
Why are machine code decompilers less capable than for example those for the CLR and JVM?
|decompilation|x86-64|x86|arm|
<p>In addition to the fine suggestions in the other answers, here are some suggestions specific to audio:</p> <ul> <li>If you know how long the playtime of the audio is (roughly), calculate the approximate bitrate of the audio file. This will tell you whether it is compressed or not, and the compression ratio can tell...
324
2013-03-27T14:20:54.423
<p>I have an audio file in an unknown format. How should I try to determine its format ?</p> <p>Also, is it possible to do this by manual observation and not using any automated tool ?</p>
How should I determine the format of this audio file?
|file-format|
<p>At the moment, there is no way to debug a dylib. I know that it is a real problem, and I plan to add such a feature in a future update.</p> <p>Another thing that will be added to Hopper is the ability to load multiple file in the same document, in order to disassemble things like kext for instance.</p>
1327
2013-03-27T16:15:00.803
<p>Can external libraries be used in Hopper scripts? I'd like to add PDB support to <a href="http://www.hopperapp.com/">Hopper</a> using <a href="https://code.google.com/p/pdbparse/">pdbparse</a>, but I haven't been able to get it to use external libraries.</p> <p>Alternatively, I suppose one could just dump the debug...
Importing external libraries in Hopper scripts?
|disassembly|python|hopper|pdb|
<p>You're looking for this on the command line (for a class called MyClass):</p> <p>On Unix/Linux:</p> <pre><code>javap -verbose MyClass | grep "major" </code></pre> <p>On Windows:</p> <pre><code>javap -verbose MyClass | findstr "major" </code></pre> <p>You want the major version from the results. Here are some ex...
1328
2013-03-27T16:24:44.427
<p>I have a java class file. How do I find out the version of the compiler used to compile this file? I'm on Ubuntu Server 12.04.</p>
Find out a Java class file's compiler version
|compilers|java|
<p>Your best bet is to contact Adam Roben directly for the symbol files. He seems to be the person who put these out 5 years ago.</p> <p>You can find his email and some more information regarding symbol server at the following links. <a href="http://trac.webkit.org/changeset/35512" rel="nofollow">http://trac.webkit.or...
1346
2013-03-28T09:26:54.353
<p>Apple developer network site has a small guide about <a href="https://developer.apple.com/internet/safari/windows_symbols_instructions.html" rel="nofollow">setting up debugging symbols server for Safari browser on Windows</a>. But it doesn't work. First, the link to actual symbols server gets redirected from http ...
Safari windows debugging symbols
|debugging-symbols|safari|
<p>I don't see <a href="https://ghidra-sre.org" rel="nofollow noreferrer">Ghidra</a> in the lists in the other answers, probably because this question was asked in 2013, and Ghidra has only more recently been made available to the public.</p> <p>Ghidra comes with built-in cooperative working tools. Each user who wishe...
1347
2013-03-28T09:39:52.443
<p>What's a working tool/methodology to work cooperatively on the same binary (if possible in parallel), that is proven to work?</p> <hr> <p>I used various methods long ago to share information with others, but not in parallel:</p> <ul> <li>sending IDB back &amp; forth</li> <li>sharing TXT notes on a repository</li>...
Tools to work cooperatively on the same binary
|tools|disassembly|static-analysis|ida|
<p>A potential tool would be QuarkLabs' <a href="http://www.quarkslab.com/fr-blog+list+1024" rel="nofollow">qb-sync</a>, which advertises:</p> <ul> <li>Synchronization between IDA and WinDbg, OllyDbg2, GDB</li> <li>Source code available (GNU GPL 3)</li> </ul>
1349
2013-03-28T10:05:06.293
<p>It's really a productivity bottleneck when various analysis tools can't share information.</p> <p>What's an efficient way to store symbols+comments+structures, so that they can be easily imported into other reversing tools?</p> <hr> <p>I used to rely on SoftIce's IceDump extension to load/save IDA symbols, or loa...
Which format/tool to store 'basic' informations?
|disassembly|tools|debuggers|
<p>Some options which may or may not be applicable depending on your needs:</p> <ol> <li><p><strong>Avoid</strong> using strings to leak out interesting information when possible. For example if you are using strings to display error information or logging information, this can give any reverse engineer valuable detai...
1356
2013-03-28T16:55:16.840
<p>Text strings are usually easily read in a binary file using any editor that supports ASCII encoding of hexadecimal values. These text snippets can be easily studied and altered by a reverse engineer.</p> <p>What options does a developer have to encrypt these text snippets, and decrypt them, in runtime ?</p>
Encrypting text in binary files
|obfuscation|c|c++|
<p>I am not exactly a Java expert but a while ago I researched the firmware of a car navigation system. For the java bits of it I used the <a href="http://java.decompiler.free.fr/" rel="nofollow">“Java Decompiler project”</a> and it seemed to work well for decompilation.</p> <blockquote> <p>The “Java Decompiler proj...
1361
2013-03-28T20:28:48.750
<p>What tools or methodology do you use to de-obfuscate Java classes?</p> <hr> <ul> <li>I know you can theoretically decompile, modify and recompile, but that's only you fully trust a Java decompiler (and none is regularly updated).</li> <li>One might also edit java bytecode directly with <a href="http://rejava.sourc...
How do you deobfuscate Java classes?
|tools|java|deobfuscation|
<p>I'm using <a href="https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine" rel="nofollow noreferrer">https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine</a> It's the decompiler from IntelliJ, it decompile codes where JD-GUI fail.</p> <p>It's...
1370
2013-03-29T15:44:07.180
<p>I am using <a href="http://jd.benow.ca/">JD-GUI</a> to decompile Java JAR files, but the problem is that it leaves many errors, such as duplicate variables which I have to fix myself and check to see if the program still works (if I fixed the errors correctly).</p> <p>I also tried Fernflower, but that leaves blank ...
What is a good Java decompiler and deobfuscator?
|decompilation|tools|java|deobfuscation|jar|
<p>For figuring out JTAG pinout, there are many hits on google for "JTAG Finder". I also have my own implementation:</p> <p><a href="http://mbed.org/users/igorsk/code/JTAG_Search/" rel="noreferrer">http://mbed.org/users/igorsk/code/JTAG_Search/</a></p> <p>It's for mbed but I tried to make it easily portable (original...
1374
2013-03-29T18:32:04.087
<p>I'm a software guy through and through. But periodically when I'm taking apart hardware I know to look for JTAG ports and RS232 ports. So far I've always been lucky and have been able to solder on pins to the RS232 port and get a serial connection.</p> <p>For the times in the future that I am unlucky, can someone...
How do I identify and use JTAG?
|hardware|jtag|
<p>Don't know about the state of the art , but some advances have been in the direction of combining symbolic execution as with <a href="https://web.archive.org/web/20160311223607/http://research.microsoft.com/en-us/um/people/pg/public_psfiles/cacm2012.pdf" rel="nofollow noreferrer">SAGE</a> from MS Research (there sho...
1375
2013-03-29T18:37:25.567
<p>I've previously rolled my own Fuzzing Framework, and tried a few others like Peach Fuzzer. It's been awhile since I've looked at vulnerability hunting, what is the state of the art with regard to fuzzing? That is, if I were to start fuzzing Acme Corp's PDF Reader today, what toolset should I look into? </p>
State of the Art Fuzzing Framework
|fuzzing|
<p>The implementation of AppInit DLL in windows 7 is as follows:</p> <p>In <code>user32.dll!ClientThreadSetup</code> the <code>LoadAppInitDlls</code> export from kernel32.dll is being called for any process except the LogonProcess.</p> <p><code>kernel32.dll!LoadAppInitDlls</code> checks the <code>LoadAppInit_DLLs</co...
1376
2013-03-29T18:58:10.950
<p>I have a malware sample that adds a DLL to the registry key <code>HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs</code>. There is malicious functionality in the DLL referenced by the registry key but this malware sample does not load or call the DLL, nor does it exhibit any other malicious b...
What happens when a DLL is added to AppInit_DLL
|windows|malware|dll|
<p><code>nt!IopLoadDriver</code> indirect call is used only for SERVICE_DEMAND start driver entry</p> <p>for boot loading drivers you would need to break on <code>nt!IopInitializeBuiltInDriver</code> indirect call as well</p> <p>you can see a short example on message #17 &amp; #18 in this link </p> <p><a href="http:...
1380
2013-03-29T20:43:20.327
<p>When you unpack manually a Windows user-mode executable, you can easily break at its EntryPoint (or TLS), then trace until you reach the original EntryPoint. However that's not possible with a packed driver.</p> <p>How can you reliably unpack a Windows driver manually?</p>
How can you reliably unpack a Windows driver manually?
|windows|unpacking|driver|
<ul> <li>Peter Ferrie's <a href="http://pferrie.host22.com/papers/antidebug.pdf">“Ultimate” Anti-Debugging Reference</a> (PDF, 147 pages) contains <strong>many</strong> anti-debugs, whether they're hardware or API based...</li> <li>Walied Assar's <a href="http://waleedassar.blogspot.com/">blog</a> shows his researches,...
1383
2013-03-29T21:46:40.973
<p>What are good anti-debug references for Windows which help with manual unpacking, emulating, or sandboxing?</p>
What are good Windows anti-debug references?
|windows|anti-debugging|
<p>Frankly speaking... Nothing can really compare to the GDB itself. Just take the newest version, start it with <code>gdb-multiarch</code> <em>(GDB now has support for all architectures and you don't need any kind of GDB branch anymore)</em>.</p> <p>When GDB runs just load a file:</p> <pre><code>file &lt;some_file_wit...
1392
2013-03-30T02:30:22.320
<p>Learning the GDB commands is on my bucket-list, but in the meantime is there a graphical debugger for *nix platforms that <strong>accepts</strong> Windbg commands, and has similar functionality? For example, the ability to bring out multiple editable memory windows, automatically disassemble around an area while st...
Decent GUI for GDB
|debuggers|gdb|
<p>There is possible padding, try adding the -nopad option, assuming that you are using the same compression method. </p>
1393
2013-03-30T02:34:20.290
<p>I love using <a href="https://code.google.com/p/firmware-mod-kit/" rel="noreferrer">firmware-mod-kid</a> to modify SoHo router firmware. The problem I encounter is that it often bloats the size of the image. It appears this happens during the <code>mksquashfs</code> step.</p> <p>If I'm just unsquashing a filesyst...
Firmware-Mod-Kit Increases Size
|firmware|
<p>If you are using IDA Pro, Ctrl-E (Windows shortcut <a href="https://www.hex-rays.com/products/ida/support/freefiles/IDA_Pro_Shortcuts.pdf" rel="nofollow">https://www.hex-rays.com/products/ida/support/freefiles/IDA_Pro_Shortcuts.pdf</a>) it will show you entry point. You can directly jump to Main/start function.</p>
1395
2013-03-30T03:08:00.460
<p>How do I debug an executable that uses TLS callbacks? It's my understanding that these run before my debugger will attach.</p>
Debugging EXE with TLS
|windows|dynamic-analysis|executable|
<p>This paper might be of interest: <a href="https://gmplib.org/~tege/divcnst-pldi94.pdf" rel="nofollow noreferrer">Division by invariant multiplication</a>.</p> <p>Bumped into this <a href="https://stackoverflow.com/questions/30790184/perform-integer-division-using-multiplication">here</a>.</p>
1397
2013-03-30T07:14:20.033
<p>When compiling a division or modulo by a constant, my compiler (LLVM GCC) generates a series of instructions that I don't understand.</p> <p>When I compile the following minimal examples:</p> <pre><code>int mod7(int x) { return x % 7; } int div7(int x) { return x / 7; } </code></pre> <p>The following cod...
How can I reverse optimized integer division/modulo by constant operations?
|disassembly|static-analysis|
<p>Also, we can exploit bugs in the editors themselves to prevent tampering with our resources. The interesting part here is that most Resource Editors have no idea how to parse non-typical (not very non-typical) PE files. For example, Some editors assume the resource section name must always be <code>.rsrc</code>. Exa...
1399
2013-03-30T08:03:51.863
<p>There are variety of tools that allow editing the resources of Windows executables. These tools allow a very easy interface for changing the programs look and feel. Replacing icons, text, menus can be easily done without any knowledge in reversing.</p> <p>My question is, what option I have to prevent the resources ...
How to prevent use of Resource editors
|windows|pe-resources|
<p>Not sure how it fares against application with JIT compiled code, but peach has a <a href="http://peachfuzzer.com/v3/minset.html">minset</a> utility to make a minimal set of files with highest code coverage:</p> <blockquote> <p>This tool will run each sample file through a target program and determine code covera...
1405
2013-03-30T19:58:10.487
<p>Let's say I'd like to begin fuzzing Acme Corp's PDF Reader. I'd like to try to follow what Miller <a href="http://fuzzinginfo.files.wordpress.com/2012/05/cmiller-csw-2010.pdf">did</a> by downloading a bunch of benign PDFs and mutate them. </p> <p>Miller began by reducing his corpus of PDF samples to a minimum by ...
How do I determine code coverage when fuzzing
|tools|fuzzing|
<p>You might find this useful -- I ended up writing a tutorial about this recently, since, as you note, documentation for this stuff is always so sketchy and often out of date.</p> <p><a href="http://soundly.me/osx-injection-override-tutorial-hello-world/" rel="nofollow">http://soundly.me/osx-injection-override-tutori...
1414
2013-03-31T01:32:02.497
<p>Much reverse engineering has been done on Windows over the years leading to great undocumented functionality, such as using <code>NtCreateThreadEx</code> to <a href="http://securityxploded.com/ntcreatethreadex.php">inject</a> threads across sessions. </p> <p>On OSX the topic of thread injection seems relatively un...
Thread Injection on OSX
|osx|
<p>I would suggest this as a solution <a href="http://accessroot.com/arteam/site/download.php?view.185">http://accessroot.com/arteam/site/download.php?view.185</a> as I had similar problem in one of crackmes. What I did was to write my own hooks for SoftICE to bypass ring0 hooks of int 3 and int 1. Could be useful for ...
1420
2013-03-31T02:48:00.997
<p>I understand that on x86, <code>INT 1</code> is used for single-stepping and <code>INT 3</code> is used for setting breakpoints, and some other interrupt (usually 0x80 for Linux and 0x2E for Windows) used to be used for system calls. </p> <p>If a piece of malware hooks the Interrupt Descriptor Table (IDT) and subs...
Malware Hooking INT 1 and INT 3
|malware|debuggers|dynamic-analysis|kernel-mode|
<p>A nice combination of findcrypt2 by HexRays and the work done by Felix Gröbert is <a href="https://bitbucket.org/daniel_plohmann/simplifire.idascope">IDAScope</a>. It's very useful for searching for and identifying encryption algorithms. For more information on IDAScope's Crypto Identification I'd recommend the foll...
1423
2013-03-31T03:12:12.127
<p>I'm analyzing some software that appears to encrypt its communications over the network, but it does not appear to be SSL. How can I easily determine what encryption algorithm its using, and maybe find the key?</p>
Determine Encryption Algorithm
|tools|cryptography|
<p>It's extremely easy to decompile. LLVM for a long time shipped with a CBackend that would convert LLVM into C. </p> <p>The LLVM that is created by todays frontends (clang) is very amenable to any kind of analysis and understanding that you can think of. So you can probably just use normal LLVM tools (opt, llc) to "...
1428
2013-03-31T08:27:00.800
<p>LLVM IR is a fairly high-level, typed bitcode which can be directly executed by LLVM and compiled to JIT on the fly. It would not surprise me if a new executable format or programming language was designed directly on top of LLVM, to be executed as if it were an interpreted language.</p> <p>In this regard, I am cur...
What is the state of art in LLVM IR decompilation?
|decompilation|llvm|
<p>There are <a href="http://www.pcbreverseengineering.com/" rel="nofollow">comprehensive tools</a> that can do precisely this. Part of the software that comes with them allows you to place part numbers between pads and have the circuit diagram automatically generated for you. Unfortunately, they're likely to set you b...
1440
2013-04-01T13:14:19.190
<p>I have found a multilayer PCB of which I need to draw the circuit. At first, I tried to find the circuit on the internet using part numbers, but I did not get any result. The PCB is from a very old alarm installation.</p> <p>Are there any tools or techniques I can use to get to know the structure of the layers I ca...
Draw circuit of a multilayer PCB
|tools|pcb|
<p>After buying NuMega technologies in 1997, Compuware seemed to feel that SoftICE was a liability, both technically and legally (as the #1 hacker tool of the time), and that may have played into why they discontinued support. SoftICE required constant updates in order to continue working against the various updates o...
1445
2013-04-01T17:53:15.223
<p>I have seen mentions of SoftICE on various questions throughout this site. However, the <a href="http://en.wikipedia.org/wiki/SoftICE">Wikipedia article</a> on SoftICE implies that the tool is abandoned. Searching google, I see many links claiming to be downloads for SoftICE, but they seem to have questionable orig...
How do I acquire SoftICE?
|tools|debuggers|softice|
<p>You would probably need some <a href="http://www.pcbreverseengineering.com/" rel="noreferrer">expensive scanning equipment</a>. It is possible you could get old equipment that is being discarded but that would be rather difficult. Then you would probably need to write software to handle the output of the equipment ...
1460
2013-04-01T21:24:22.093
<p>I'm trying to reverse engineer some boards that have multiple layers, but can't figure out any way of discovering which layer certain vias go to. Unfortunately I can't destroy the board with corrosives, since it's my only one. How can I find out how deep they go?</p>
How can I work out which PCB layer a via goes to, without destroying the board?
|hardware|pcb|
<p>No <em>absolutely reliable</em> way, no.</p> <p>Either way you'll need a full dump, but the problem is that malware could even hook the responsible functions inside the kernel and modify <em>what</em> gets dumped. There are several things that have to be considered here.</p> <p>You <em>can</em> detect it if the ma...
1461
2013-04-01T21:56:28.287
<p>The <a href="http://en.wikipedia.org/wiki/System_Service_Dispatch_Table">SSDT</a> is a dispatch table inside the Windows NT kernel, and it is used for handling calls to various internal kernel APIs. Often malware will change addresses in the SSDT in order to hook certain kernel functions. Spotting this kind of thing...
Is there an easy way to detect if the SSDT has been patched from a memory dump?
|windows|malware|
<p>If a binary uses deflate or gzip (which uses deflate), the code is generally linked in as a library and thus easy to detect based on string artifacts. This can certainly be automated, e.g., you could simply search for the respective strings. Manually matching functions against the source code is a somewhat tedious p...
1463
2013-04-01T22:49:19.713
<p>I know there are tools for identifying common ciphers and hash algorithms in code, but are there any similar scripts / tools / plugins for common compression algorithms such as gzip, deflate, etc? Primarily aimed at x86 and Windows, but answers for other platforms are welcomed too.</p> <p>Note that I'm looking to f...
Are there any tools or scripts for identifying compression algorithms in executables?
|tools|windows|x86|
<p>By default, IDA generates graphs in GDL (WinGraph) format, but you can switch it to DOT which is supported by GraphViz and some other tools. It seems <a href="http://gephi.org/2010/new-graphviz-dot-csv-and-ucinet-formats/">Gephi</a> can do 3D.</p> <p>See <code>GRAPH_FORMAT</code> and <code>GRAPH_VISUALIZER</code> i...
1471
2013-04-02T05:31:36.057
<p>Is there any way to leave 2D flow chart graphs and go to 3D model? I mean something like that:</p> <p>Usual 2D graph: <img src="https://i.stack.imgur.com/uHTxH.png" alt="2D graph"> </p> <p>3D graph: <img src="https://i.stack.imgur.com/qMhs1.png" alt="3D graph"></p> <p>The only one solution I've seen is using UbiG...
3D control-flow graphs in IDA
|disassembly|ida|
<p>In general, BinDiff in its current version as of this writing (4.x) works by matching attributes on the function level. Basically, matching is divided into two phases: first initial matches are generated which are then refined in the drill down phase.</p> <h2>Initial Matches</h2> <p>First of all BinDiff associate...
1475
2013-04-02T09:35:57.497
<p>I would like to know what are the basic principles (and maybe a few things about the optimizations and heuristics) of the <a href="http://www.zynamics.com/bindiff.html">BinDiff software</a>. Does anyone have a nice and pedagogic explanation of it?</p>
How does BinDiff work?
|tools|tool-bindiff|
<p>I can support the presented view of the other responders. You will rarely encounter code virtualization when looking at in the wild samples.</p> <p>Just to add, here is a recent <a href="http://linuxch.org/poc2012/Tora,%20Devirtualizing%20FinSpy.pdf">case-study by Tora</a> looking at the custom virtualization used ...
1478
2013-04-02T12:14:23.807
<p>I'm just getting into the RE field, and I learned about virtualized packers (like VMProtect or Themida) in a class about a year ago. How often is malware in the wild really packed with virtualized packers, and what is the state of the art in unpacking them for static analysis?</p>
How common are virtualized packers in the wild?
|obfuscation|static-analysis|malware|unpacking|virtualizers|
<p>While there is no GUI, I believe it's worth mentioning command lines tools that will help with the <code>in an automated way</code> part of your question. I've personally used the <a href="https://mupdf.com/" rel="nofollow noreferrer"><code>mupdf</code></a> associated command line tool: <code>mutool</code>.</p> <p>...
1526
2013-04-03T03:09:07.193
<p>I've been looking for an open-source GUI tool to extract PDF's in an automated way on Windows systems. I've used Didier Steven's tools with great interest for a while, but cannot make sense of how to use his <a href="http://blog.didierstevens.com/programs/pdf-tools/">PDF decomposing</a>/<a href="http://blog.didierst...
Open source GUI tool for decomposing a PDF
|decompilation|tools|windows|
<p>Because x86 instructions can be any length and don't need to be aligned, one instruction's immediate value can be another instruction altogether. For example:</p> <pre><code>00000000 0531C0EB01 add eax,0x1ebc031 00000005 055090EB01 add eax,0x1eb9050 0000000A 05B010EB01 add eax,0x1eb10b0 0000...
1531
2013-04-03T08:11:29.310
<p>I analyzed some binaries in x86/x86-64 using some obfuscation tricks. One was called <em>overlapping instructions</em>. Can someone explain how does this obfuscation work and how to work around?</p>
What is "overlapping instructions" obfuscation?
|obfuscation|binary-analysis|deobfuscation|
<p>Here is a just closed reverse engineering challenge that was posted by Halvar Flake: <a href="http://addxorrol.blogspot.kr/2013/01/encouraging-female-reverse-engineers.html" rel="nofollow">http://addxorrol.blogspot.kr/2013/01/encouraging-female-reverse-engineers.html</a></p> <p>The winner and a link to her very det...
1539
2013-04-03T14:10:49.680
<p>I'd like to improve my skill as a reverse engineer. And thus I am looking for a location to find these.</p>
Where to find a hard crackme
|obfuscation|unpacking|crackme|
<blockquote> <p>The interrupt 0x2D is a special case. When it is executed, Windows uses the current EIP register value as <strong>the exception address</strong>, and then it increments by one <strong>the EIP register value</strong>. However, Windows also examines the value in the EAX register to determine how t...
1541
2013-04-03T14:42:49.297
<p>Inclusion of an <code>INT 2D</code> instruction appears to be a fairly common anti-debugging tactic used by Windows malware authors. From what I understand, it causes a process to act differently when a debugger is attached from when it is not attached.</p> <p>I have read that this is due in part to an asynchronous...
INT 2D Anti-Forensic Method
|windows|static-analysis|malware|anti-debugging|
<p>The majority of modern ELF binaries are protected using UPX or a variant thereof. <sup>1,2</sup> However, custom packers have been observed in the wild, including both UPX based- and non-UPX based-custom packers.</p> <ul> <li>The simplest variation of the UPX packer used out in the wild is the <a href="https://i.st...
1545
2013-04-03T16:28:42.250
<p>I know no one that works as of today (i.e., kernels not way too old) and I wonder if anybody found or knows any protector for Linux either commercial, open source, used in malware, etc...</p>
Linux protectors: any good one out there?
|linux|unpacking|
<p>This is the tool I have been using when I have needed to recognize a file format or files inside a (big) dump. It has a big signature BD file that you/people can contribute to.</p> <blockquote> <p><strong>Signsrch 0.2.4 (signsrch)</strong></p> <p>tool for searching signatures inside files, extremely useful i...
1560
2013-04-04T07:49:50.253
<p>Let's say I found 'some' file (might be an executable, might be data, or something else) and want to run or read it. I open this file in a text editor, but the format isn't readable. Examples include: Java class, Windows executable, SQLite database, DLL, ...</p> <p><em>I do know the file format, if we can trust the...
Where to find information about a file format?
|file-format|
<p>I think that the problem is a misunderstanding of how the Proximity Viewer works. It will not clear out all the other nodes in the graph when finding a path: it simply finds a path and adds the required nodes to the graph. If you want to view only the nodes between AllocateVolume and CompareVolumeComponents, do the ...
1572
2013-04-04T16:18:09.057
<p>Using IDA 6.2 (and also with IDA 6.4), I'm trying out the Proximity viewer to find the path between 2 functions as described at the <a href="http://www.hexblog.com/?p=468" rel="nofollow noreferrer">hexblog post here</a>.</p> <p>Using the <code>Xrefs From/To</code> (old option) it shows the clear path: <code>Allocat...
IDA Proximity viewer not finding obvious paths?
|ida|
<p>If you've never touched DBI before, I found <a href="http://rads.stackoverflow.com/amzn/click/1608454584">this book</a> to be a good use of $17. Written by a long-time researcher in the field, it describes the theory and practice behind DBI, including multiple DBI platforms, exotic DBI tools, etc.</p>
1584
2013-04-05T03:42:38.057
<p>Generally, it's a complex topic. There seems to be very little in the way of example or linear progression in to non-trivial examples. </p> <p>It's possible my google-fu is weak, but I can't seem to locate decent tutorials on using binary instrumentation frameworks (Pin, DynamoRIO, other). </p> <p>What resource...
Where can someone interested in the topic learn more about Dynamic binary instrumentation?
|dynamic-analysis|
<p><code>Rasticrac</code> can also automate the decryption (FairPlay DRM) of the iOS binary and is very easy to use!</p> <blockquote> <p><strong>Rasticrac</strong></p> <p>Rapid Advanced Secure Thorough Intelligent Gaulish Nuclear Acclaimed Cracker</p> <p>Rasticrac is a very powerful tool to decrypt the iOS...
1594
2013-04-05T10:55:56.913
<p>I browsed a lot, but can't find any resources for reverse engineering an IPA file (iPhone application). Is there any method to reverse engineer an IPA file to its source? I've tried to rename it to zip and open it via Winrar/Winzip to view its source, but it doesn't seem helpful.</p> <p>What are the possibilities to...
What are the possibilities for reverse engineering an IPA file to its source?
|decompilation|ios|
<p>Reverse Engineering is a broader term, of which, decompilation is simply one--albeit powerful--tool. Decompilation is a form of static analysis which is investigating a program by not running it. Don't forget that reverse engineering can also mean taking apart the device that's running a program. <a href="http://...
1596
2013-04-05T11:01:41.030
<p>Is reverse engineering an application the same as decompiling it?</p> <p>What is the core difference between reverse engineering an application and decompiling an application.</p>
Are reverse engineering and decompilation the same?
|decompilation|
<p>They are some tools can be useful in reversing p-code binary</p> <p><strong>vb-decompiler lite (free ver)</strong>: very good decompiler can be download from <a href="http://www.vb-decompiler.org/">vb-decompiler official site</a></p> <p><strong>P32Dasm</strong>: another p-code decompiler <a href="http://progress-t...
1597
2013-04-05T11:06:41.193
<p>p-code is the intermediate code that was used in Visual Basic (before .NET). I would like to know where I can find resources/tools related to analysis of these virtual machine codes. </p>
Reverse engineering a Visual Basic p-code binary
|decompilation|visual-basic|
<p>I'd recommend installing the <a href="http://msdn.microsoft.com/en-us/library/ms717422.aspx" rel="nofollow">Windows SDK</a> documentation and the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=11800" rel="nofollow">Driver Development Kit</a> if you don't have them already. It might seem like overki...
1603
2013-04-05T12:46:18.960
<p>There is an old help file containing Windows API I used few years ago with ollydebug, which can jump to the appropriate help page of function when double clicking on the function in the disassembly window.</p> <p>Is there a more recent reference like this which includes also Windows 7 library calls ?</p> <p>I mana...
Windows API reference for OllyDbg
|winapi|ollydbg|