TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An opinionated guide on how to reverse engineer software

375 pointsby withzombiesover 3 years ago

9 comments

stirayover 3 years ago
I am still regularly cracking the banking app from my bank to be able to run it on telephone.<p>They have decided to rage war against their users by checking for root, safenet and if google spyware framework is installed on android phone, so suddenly I wasn&#x27;t able to get to my online banking and since one company software is handling all banks in my country (and I would rather stop using banks than start using google spyware ecosystem) they have forced me to remember of my youth and patch the .so in apks.<p>It was fun and I have to patch a new version every few releases but except from that, my online banking now works. :)
评论 #29096438 未加载
评论 #29098202 未加载
jc01480over 3 years ago
Are there any “start here” guides for beginning reversing? Like a break it down Barney style? I’ve done some self study and shadowing teams at work but I need to fill in the gaps. Thanks!
评论 #29092115 未加载
评论 #29091508 未加载
评论 #29091525 未加载
评论 #29091594 未加载
评论 #29092983 未加载
评论 #29094784 未加载
评论 #29095244 未加载
评论 #29098345 未加载
评论 #29091405 未加载
xvilkaover 3 years ago
Sad to see Cutter[1] (based on Rizin[2]) not mentioned in the list of RE tools.<p>[1] <a href="https:&#x2F;&#x2F;cutter.re" rel="nofollow">https:&#x2F;&#x2F;cutter.re</a><p>[2] <a href="https:&#x2F;&#x2F;rizin.re" rel="nofollow">https:&#x2F;&#x2F;rizin.re</a>
评论 #29098526 未加载
leohonexusover 3 years ago
Guides like these are gold - the advice inside also neatly applies to understanding open-source libraries, and massive codebases effectively.
评论 #29096632 未加载
kklisuraover 3 years ago
I had my fair share of reversing more than 10y ago. Such a fun times, learned a lot!<p>&gt; Ideally, readers will have acquired an interactive disassembler such as Binary Ninja, IDA Pro, or Ghidra<p>I&#x27;m guessing OllyDbg is no more an option
评论 #29092389 未加载
评论 #29092405 未加载
评论 #29093528 未加载
thriftwyover 3 years ago
Old games are really gaining new life with techniques like these. Games from 90s are still getting bug fixes and new content, such as &quot;Caster of Magic&quot; and &quot;HoMM3 Horn of the Abyss&quot;
csnoverover 3 years ago
This is a great guide. The “data is king” message is hard to overstate.<p>Some other bits and pieces not mentioned that could be helpful for beginners, from my own personal experience, that I hope show up in later parts:<p>• Know the calling convention[0] of the platform you are working on! If you don’t know where arguments come from or how values are returned from functions, you are not even going to be able to get started.<p>• In addition to working backwards from known system calls, embedded strings can also be a great place to start. They frequently contain filenames, error or debug messages, well-known magic values (PNG chunk identifiers, FourCC codes, file extensions, etc.), and other junk that can be used to identify potentially interesting functions. If you get really lucky and the binary uses some string-based message sending you will gain an enormous advantage this way.<p>• While I agree with the author that starting from `main` is mostly futile, it can still often be helpful to do a <i>little bit</i> there depending upon the kind of the binary you are reverse engineering. For example, GUI apps will generally have some initialisation code, then an event loop, then some teardown code. Identifying these sections is useful when you start looking at deeper functions to know if you are hitting a function that is called by init (more useful) or teardown (less useful) to make smarter choices on where to spend effort. The event loop will also use documented OS messages and types, so you can use those to get an idea of which system events map to which functions and what data they receive from the system, which again helps give useful context for deeper functions later on.<p>• Depending on the compiler or optimiser that was used, code within TUs may simply be emitted in sequence, so if you are disassembling some code and you can determine that a few functions next to each other are all member functions for the same C++ class, you can assume with high confidence that adjacent functions in other places also all operate on the same kind of object and create associations between groups of functions that way.<p>• Similar to the last point, looking for vtables in the data section of the binary can help to quickly learn about the size and fields of objects. If you see a sequence of function offsets, whatever function points to the start of that sequence is probably a constructor (and will likely use the offset like `mov [rax+0], offset &lt;list of functions&gt;`). The `malloc` call in the constructor or the constructor’s caller will tell the object size, and then reviewing all the vtable functions will let you fill out the object’s structure pretty easily.<p>• Notwithstanding “data is king”, knowing what code implementations of common data types look like can be very helpful. Once you know what it looks like to access a hash map, or traverse a linked list, or grow a vec, or get the length of a C-string, when you encounter that pattern, you immediately know what kind of object you’re working with.<p>• Understanding some of the optimisations that compilers use is also very helpful since they can look very weird, though this is more of a rote memorisation&#x2F;exposure thing. Tools like Assembly x86 Emulator[1] can be super helpful when encountering confusing stuff since you can just paste in there, step through, and mess with the data&#x2F;registers without needing to try to run a debugger on the original code.<p>• For whatever reason, the first few months I started reverse engineering I <i>could not</i> do it without using graph view. After that time, something shifted in my brain and now I can no longer work effectively without using a straight disassembly view most of the time. Pick what works for you, and just like an IDE, make sure to take time to configure your decompiler&#x2F;disassembler with the visibility options that feel like they give you the strongest orientation.<p>The basic approach and difficulty curve for reverse engineering a binary is essentially the same as solving a jigsaw puzzle. Finding the corner pieces is simple, finding the edge pieces is harder, and finding the first pieces to connect to the edges is the hardest part. As you start filling in the picture, though, it becomes exponentially easier, so just keep at it.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Calling_convention" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Calling_convention</a><p>[1] <a href="https:&#x2F;&#x2F;carlosrafaelgn.com.br&#x2F;Asm86&#x2F;" rel="nofollow">https:&#x2F;&#x2F;carlosrafaelgn.com.br&#x2F;Asm86&#x2F;</a>
nsomaruover 3 years ago
What type of paid work would a reverse engineer usually pick up?
评论 #29092166 未加载
评论 #29092374 未加载
评论 #29093039 未加载
评论 #29092428 未加载
评论 #29092122 未加载
评论 #29091944 未加载
franga2000over 3 years ago
I love the way this is written, can&#x27;t wait for part 2!
评论 #29091966 未加载