Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Reverse Engineering
Mastering Reverse Engineering

Mastering Reverse Engineering: Re-engineer your ethical hacking skills

eBook
€26.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering Reverse Engineering

Identification and Extraction of Hidden Components

Today, the most common use for reverse engineering is in targeting malware. Like any other software, malware has its installation process. The difference is that it does not ask for the user's permission to install. Malware does not even install in the Program files folder where other legitimate applications are installed. Rather, it tends to install its malware file in folders that are not commonly entered by the user, making it hidden from being noticed. However, some malware shows up noticed and generates copies of itself in almost all noticeable folders such as the desktop. Its purpose is to get its copies executed by users, be it by accidental double-click or by curiosity. This is what we usually call malware persistence.

Persistence is when malware consistently runs in the background. In this chapter, we will be pointing...

Technical requirements

The operating system environment

Doing reverse engineering requires the analyst to understand where the software being reversed is being run. The major parts that software requires in order to work in an operating system are the memory and the filesystem. In Windows operating systems, besides the memory and the filesystem, Microsoft introduced the registry system, which is actually stored in protected files called registry hives.

The filesystem

The filesystem is where data is stored directly to the physical disk drive. These filesystems manage how files and directories are stored in the disk. Various disk filesystems have their own variation of efficiently reading and writing data. 

There are different disk filesystems...

Typical malware behavior

Malware is simply defined as malicious software. You'd expect bad things to happen to your system environment once malware has entered. Once typical malware enters the system, it does two basic things: installs itself and does its evil work. With the intent of forcing itself to be installed in the system malware does not need to notify the user at all. Instead, it directly makes changes to the system.  

Persistence

One of the changes malware makes in the system is to make itself resident.  Malware persistence means that the malware will still be running in background and, as much as possible, all the time. For example, malware gets executed after every boot-up of the system...

Tools

Identifying the registry entry, files dropped, and running processes that are related to the malware requires tools. There are existing tools that we can use to extract these objects. There are two analysis events we should consider: analysis after the malware has been executed and analysis before the malware executes. Since our aim for this chapter is to extract components, we will discuss the tools that can help us find suspected files. Analysis tools that are used after we have extracted our suspected malware will be discussed in further chapters.

When a system has already been compromised, the analyst would need to use tools that can identify suspected files. Each suspected file will be analysed further. To start off, we can identify it based on persistence.

  1. List down all processes and their respective file information
  2. From the list of known registry persistence paths...

Summary

In the first chapter, we learned about reverse engineering and its importance when analyzing malware. To begin with our reverse engineering adventures, we have to learn the system we are analyzing. We discussed the three main areas in the Windows operating system environment: memory, disk, and the registry.  In this chapter, we aimed to find malware from a compromised Windows system by extracting suspected files. To do that, we listed common startup areas in the system that we can search into. These areas include the registry, task schedules, and startup folder.  

We learned that typical malware behaves by installing itself and runnng code that harms the system. Malware installs itself basically for persistence which results in the malware file triggering most of the time the system is online. We then listed a few behaviors as to why malware was called malicious...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Analyze and improvise software and hardware with real-world examples
  • Learn advanced debugging and patching techniques with tools such as IDA Pro, x86dbg, and Radare2.
  • Explore modern security techniques to identify, exploit, and avoid cyber threats

Description

If you want to analyze software in order to exploit its weaknesses and strengthen its defenses, then you should explore reverse engineering. Reverse Engineering is a hackerfriendly tool used to expose security flaws and questionable privacy practices.In this book, you will learn how to analyse software even without having access to its source code or design documents. You will start off by learning the low-level language used to communicate with the computer and then move on to covering reverse engineering techniques. Next, you will explore analysis techniques using real-world tools such as IDA Pro and x86dbg. As you progress through the chapters, you will walk through use cases encountered in reverse engineering, such as encryption and compression, used to obfuscate code, and how to to identify and overcome anti-debugging and anti-analysis tricks. Lastly, you will learn how to analyse other types of files that contain code. By the end of this book, you will have the confidence to perform reverse engineering.

Who is this book for?

If you are a security engineer or analyst or a system programmer and want to use reverse engineering to improve your software and hardware, this is the book for you. You will also find this book useful if you are a developer who wants to explore and learn reverse engineering. Having some programming/shell scripting knowledge is an added advantage.

What you will learn

  • Learn core reverse engineering
  • Identify and extract malware components
  • Explore the tools used for reverse engineering
  • Run programs under non-native operating systems
  • Understand binary obfuscation techniques
  • Identify and analyze anti-debugging and anti-analysis tricks

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2018
Length: 436 pages
Edition : 1st
Language : English
ISBN-13 : 9781788838849
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 31, 2018
Length: 436 pages
Edition : 1st
Language : English
ISBN-13 : 9781788838849
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
Learning Malware Analysis
€41.99
Hands-On System Programming with Linux
€41.99
Mastering Reverse Engineering
€36.99
Total 120.97 Stars icon

Table of Contents

14 Chapters
Preparing to Reverse Chevron down icon Chevron up icon
Identification and Extraction of Hidden Components Chevron down icon Chevron up icon
The Low-Level Language Chevron down icon Chevron up icon
Static and Dynamic Reversing Chevron down icon Chevron up icon
Tools of the Trade Chevron down icon Chevron up icon
RE in Linux Platforms Chevron down icon Chevron up icon
RE for Windows Platforms Chevron down icon Chevron up icon
Sandboxing - Virtualization as a Component for RE Chevron down icon Chevron up icon
Binary Obfuscation Techniques Chevron down icon Chevron up icon
Packing and Encryption Chevron down icon Chevron up icon
Anti-analysis Tricks Chevron down icon Chevron up icon
Practical Reverse Engineering of a Windows Executable Chevron down icon Chevron up icon
Reversing Various File Types Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(5 Ratings)
5 star 20%
4 star 40%
3 star 0%
2 star 0%
1 star 40%
Customer Feb 14, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Contained the information necessary to go from casual malware analyst to occasional hero. The crux of the matter is developed when the author hits on key points necessary to repackage executables while coding out the malicious logic -- especially logic intended to ruin early-stage and mid-stage analysis efforts that are focused by the adversary towards the amateur reverser. Other books in this vein do not necessarily cover the the necessary steps to champion repatching. In the future, a serious book might cover more advanced topics, such as hot patching, but I think this book covers most of the subject matter well.The book may not have a lot for an average exploit developer, or for reversers who are not subject to the cat-and mouse game of anti-debugging, anti-tampering, anti-emulation, and vm-detection techniques. For those who want to up their skills and abilities in critical areas that key cybersecurity countermeasures such as FireEye, Palo Alto Networks, McAfee ATD, and Microsoft ATP/Defender might miss -- this is the right book at the right time. This book also has the ability to foresee malware intelligence as a future decisive area where cybersecurity decisions are made. You have to read into it a little bit. It's not obvious, so maybe give it a few reads, embellish the ideas and concepts by practicing them, and spend a little effort beyond what the book provides.You will find no better modern resource on the in-the weeds methods (not just the tools, but the techniques!) of malicious logic reversing. If you intend to do battle with a disassembler, debugger, or other related weapon of choice -- look no further than this written material on this topic.
Amazon Verified review Amazon
Mansour Ahmed Oct 10, 2022
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Thank you
Amazon Verified review Amazon
Drakeor Nov 30, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
TLDR:The title is misleading. This book is an excellent primer for Malware Analysis and I highly recommend it if you're new to it. However, expect to quickly move onto other books/resources once you need any sort of depth into any of the tools/techniques.Summary:The title makes it seem like a more in-depth book for people already familiar with the basics of reverse engineering and thus are looking for new techniques or ways to improve their existing skillsets. Instead, this book is an introductory book into Malware Analysis. If it's treated like that, I do recommend this book for anyone wanting a good primer into Malware analysis. I understand that there's a lot to cover (Ex: static analysis have entire textbooks dedicated to them) so don't expect an in-depth guide on the tools/techniques.Pros:- Touches on a good number of techniques and tools used for Malware Analysis. There were a couple the author mentioned that I was not yet aware of.- Touches on a good number of topics such as anti-debugging / anti-vm / metamorphism- Pretty easy to follow and not overly bloated. Gives enough information that one would be able to look up areas they aren't familiar with and expand their knowledge.- Explanations were easy to follow.Cons:- The title is misleading. This is really the biggest con. It really should be called "A Primer on Malware Analysis".- This book is far from comprehensive. If you were looking for a comprehensive textbook on Malware Analysis with an appropriate amount of exercises, this isn't the book for you. This is less of a con if you approach this book as a primer.- It's $45 on Amazon. I read mine thru Packt Publishing's site since I have an account there, but $45 is way too steep a price for this book. I feel it's worth more like $25, $30 at most. The only way I would justify $45 is if it had more exercises.
Amazon Verified review Amazon
Amazon Customer Nov 04, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This would be the worst book I've read about reversing if it was about... reversing. Instead it is very brief peek into several available tools that aid in malware analysis. The chapter about MBR reversing with bochs is worst than one provided by IDA Pro authors available at Hex Blog site for free. IDA capabilities are not even scratched, all the code is targeting x86 32 bit platforms (with brief exception of tips how to run ARM base linux distro in QEMU). The book doesn't even explain how disassembler works hence the chapter about code obfuscation are a bit useless, especially considering the fact that there are very few examples being discussed. Anti debugging and anti emulation tricks are also very briefly discussed. x64 architecture is not discussed, just like ARM (with single exception above). Don't buy this book, there are many others great publication on this topic available today.
Amazon Verified review Amazon
PC Jul 14, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Der Text wird richtig gezeigt: es kann problemlos vergrößert werden aber die Bilder bleiben leider extrem klein: es ist schwer zu erkenne, was sie zeigen sollten.Das zweite Bild zeigt das Hauptfenster von Ollidbg: Ich habe es erkannt, nur weil Ich es regelmäßig benutze.Dazu, die Quelltexte werden mit einer Schriftart gezeigt, die extrem dünn ist, praktisch unleserlich (drittes Bild).Man fragt sich, warum solche Probleme niemandem aufgefallen sind.Komisch ist auch, dass „Blick ins Buch“ eine mackellose Darstellung der Seiten zeigt, auch derjenigen, die bei Kindle Windows die Darstellungsprobleme zeigen, die Ich beschrieben habe.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.