Reverse engineering guide for beginners: Methodology and tools
0x00sec.org
0x00sec.org
https://codebreaker.ltsnet.net/challenge
I think they're going to be keeping the 2016 version up for a while longer. They generally start a new one in September each year.
For example, we plug known data into the program, save it, then figure out how to extract that info from the save file.
Bonus if anyone knows the legal status for that kind of work. My impression is reversing file formats has been successfully defended in US courts but I haven't started researching fully and would appreciate any leads there, cases, etc. to review and potentially discuss with lawyer. (What kind of lawyer would know about that kind of thing?)
I guess at the end of the day the NSA want students in the US, who are likely US citizens and thus eligible for a job.
or you know, they could just open it for the public, given that there's such a wide gap in quality, cost, subsidy and affordability between higher education worldwide.
only after I stepped out the university bubble, I saw how unfair this "educational license" stuff really is. so many people who just can't afford to, so many people who don't have access to actual quality education (and don't want to throw money away just to get a piece of paper), so many smart people that spent years in "lower" (level) education (often family background not aiming high enough for their daughter/son) and then not qualifying for further funding (I'm seeing this a lot in the Netherlands, recently, it's really sad).
question is, what are you really selecting for by only accepting affiliation with an educational institution? who are you excluding and why?
(note: I put "lower" in quotes, because I feel everyone should in principle receive education to the best of their abilities. learning skills/knowledge/stuff is the goal and there's nothing wrong if that's not university-level. it's a wide world out there with so many beautiful different kinds of people)
Do you think there's much scope for abuse in terms of people using the licenses commercially without funding the company behind the product, though? As an example I'm considering JetBrains' IDEs, but I think the same concerns could be applied to a wide variety of products.
There's ISIC (International Student Identity Card) [1], but I don't imagine it's used widely.
It's not like this article teaches much about the general "reversing mindset" (similar to the "hacker mindset", but not quite exactly the same), or the "methodology" as promised in the title. Because yes there is some very interesting overlap in skill within the broad field of RE. Ask any pentester who also picks locks.
Not to discredit the article itself, btw, which is fine given what it actually covers. Which is about Linux binaries, and in particular with the object of solving a crackme puzzle.
Maybe "Reverse engineering a crackme for beginners" would be a bit more descriptive.
With that said there is nothing stopping people from starting with radare2 if they wish to, there is a lot of great tutorials for it available online. But in this case the recommendation of using Binary Ninja was one which the author (Nitrax) made because "due to its low cost .. compared to the functionalities provided", the author even further added "A demo version is available for free and should be enough for beginners."
I can understand the insistence on free and open-source software, but a lot of OSS tools in many fields have simply not caught up to their paid counterparts in all aspects. And to me, it feels much like calling someone a shill for saying "Make sure you use a good drill for this" instead of supplying references to a free & open 3D printable drill schematic.
And a lack of openness about that fact.
There was one thing in particular where I knew there was a jump somewhere (if some_length < some_width) that caused bad outputs. I was playing around looking at registers etc in gdb while following along with a disassembled version of the code, but it was impossible to get any idea where to start.
I wanted something that could give me a few seconds worth of samples of where the instruction register was spending its time as a starting point, but couldn't find any such tool (linux).
Within my control:
- giving input files to explicitly set unique numbers to watch out for
- giving inputs that would generate bad output numbers only in the bad code path
- giving inputs to force a load of jumps down the bad or good code paths
Does anyone have any advice on how you might approach such a situation?If you want to control the computer, you have options. Qemu can give you fine grained CPU level logging you want: http://moyix.blogspot.jp/2014/07/breaking-spotify-drm-with-p... -- this is an article that walks through logging them instructions. (https://github.com/panda-re/panda)
Finally there are RE frameworks where you can instrument (hook) function calls (Frida being a good cross platform option).
I would try AFL first. But playing with Panda can be really fun too.
(edit: and a colleague just pointed out -- https://github.com/angr, which will also let you work right at the level you want to, I think).
A hit tracer sets a breakpoint at the beginning of every basic block, and records and clears every breakpoint hit (so the performance hit is relatively low).
You'd use a hit tracer to record a "baseline" of your target program when it's not doing the thing you care about. Then you'd run the program again and trigger the behavior. Then you'd diff the traces.
AFL is doing something related when it explores states in targets.
There are a lot of free hit tracers, but they're also kind of a build-your-own-light-saber deal. If you have a Python debugger library and a disassembly, a hit tracer is close to "hello world".
You could write this with Pin [1], but I'd be surprised if there wasn't a profiling tool with instruction level analysis available. If there truly isn't, then there are Pin examples that can be pretty quickly modified to achieve this.
1. https://software.intel.com/en-us/articles/pin-a-dynamic-bina...
I honestly wish CMU would release the lectures and full class materials for 15-213 (the course most typically associated with the bomb lab mentioned here). The lectures combined with the accompanying text and labs form a masterpiece, and it's a shame the community at large can't take better advantage of it. It's like SICP for systems : that effing good.
The tests, however, are just awful. Those can safely be dumpstered.
Computer Systems: A Programmer's Perspective: https://www.amazon.com/Computer-Systems-Programmers-Perspect...
It's one of the best books ever written on this subject.
One of my courses at UQ (Australia) followed some of it and I'm glad that I took it. There's no better way to asses the skills involved in debugging/analyzing machine dumps than the binary bomb assignment.
That includes PDFs of the lectures and videos of said same. It looks similar to Berkeley's CS 61C.
The labs and text are already available online.
Website here: http://acrigs.com/FRAVIA/index-old.htm
+ORC ( https://en.wikipedia.org/wiki/Old_Red_Cracker ) always interested me. Like Satoshi Nakomoto, he has never been identified. Fravia's site has his tutorials here: http://acrigs.com/FRAVIA/orc1.htm
Some pretty serious old school hackers.
When I later moved to the PC +fravia's resources were very much a sight for sore eyes.
Though I admit it was only years later when it occurred to me that +orc was almost certainly +fravia in a weak disguise. I took it literally at the time..
http://www.woodmann.com/crackz/Orc.htm
Of course, without looking deeper he's the most obvious candidate
I remember MadWizard's assembly tutorial[0] being very helpful at the time.
My best challenge was Brazil (3ds render engine). It had all types of checks that would only show up when rendering.. But that was no match.. Good times
Also Google chooses to alias certain things for a reason.
1) what kind of response is this?
Does jsblocker completely wipe out noscript tags or something?
Assertion: Visiting a hacking website with Javascript disabled is a bad thing.
Hmmm...
Or just open the developer console and inspect the source, like a hacker/reverse engineer.