mirror of
https://github.com/aljazceru/securedorg.github.io.git
synced 2025-12-19 15:14:18 +01:00
updating all
This commit is contained in:
@@ -41,10 +41,14 @@ The executable code has designated regions that require a different memory prote
|
|||||||
- Execute
|
- Execute
|
||||||
|
|
||||||
This diagram shows how this header is broken up.
|
This diagram shows how this header is broken up.
|
||||||

|
|
||||||
|
*Click to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/PE32.png)
|
||||||
|
|
||||||
Here is a hexcode dump of a PE header we will be working with.
|
Here is a hexcode dump of a PE header we will be working with.
|
||||||

|
|
||||||
|
*Click to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/PEHeader.gif)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -113,18 +113,20 @@ The **EIP** register contains the address of the next instruction to be executed
|
|||||||
|
|
||||||
## Hello World ##
|
## Hello World ##
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/helloworld.gif)
|
||||||
|
|
||||||
## Calling a Function ##
|
## Calling a Function ##
|
||||||
|
|
||||||
### Arguments on the Stack ###
|
### Arguments on the Stack ###
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/FunctionCall.gif)
|
||||||
|
|
||||||
### Local Variables on the Stack ###
|
### Local Variables on the Stack ###
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/FunctionCall2.gif)
|
||||||
|
|
||||||
[1]: https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture
|
[1]: https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 554 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
4
intro.md
4
intro.md
@@ -11,7 +11,7 @@ title: Intro
|
|||||||
|
|
||||||
# Reverse Engineering #
|
# Reverse Engineering #
|
||||||
|
|
||||||
"is the processes of extracting knowledge or design information from anything man-made and re-producing it or re-producing anything based on the extracted information"[1](https://en.wikipedia.org/wiki/Reverse_engineering)
|
"is the processes of extracting knowledge or design information from anything man-made and re-producing it or re-producing anything based on the extracted information" [[1]][1]
|
||||||
|
|
||||||
## What does it mean to be a reverse engineer? ##
|
## What does it mean to be a reverse engineer? ##
|
||||||
|
|
||||||
@@ -54,5 +54,7 @@ title: Intro
|
|||||||
|
|
||||||
* Manual Debugging - Stepping through the program to navigate to your goals
|
* Manual Debugging - Stepping through the program to navigate to your goals
|
||||||
|
|
||||||
|
[1]: https://en.wikipedia.org/wiki/Reverse_engineering
|
||||||
|
|
||||||
[Next -> Section 1](https://securedorg.github.io/RE101/section1)
|
[Next -> Section 1](https://securedorg.github.io/RE101/section1)
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ title: RE Tools
|
|||||||
## Information Gathering
|
## Information Gathering
|
||||||
|
|
||||||
* [CFF Explorer](http://www.ntcore.com/exsuite.php) - PE header parser (Used in this worksop)
|
* [CFF Explorer](http://www.ntcore.com/exsuite.php) - PE header parser (Used in this worksop)
|
||||||
|
* [PE Explorer](http://www.heaventools.com/overview.htm) - PE inspection tool (Used in this worksop)
|
||||||
* [BinText](https://www.mcafee.com/hk/downloads/free-tools/bintext.aspx) - Extract string from a binary
|
* [BinText](https://www.mcafee.com/hk/downloads/free-tools/bintext.aspx) - Extract string from a binary
|
||||||
* [Sysinternals Suite](https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx) (Used in this worksop)
|
* [Sysinternals Suite](https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx) (Used in this worksop)
|
||||||
* procmon
|
* procmon
|
||||||
|
|||||||
15
static.md
15
static.md
@@ -98,21 +98,25 @@ Right before the first **push 0** there is a **mov esi,eax** which means esi = e
|
|||||||
|
|
||||||
When a function returns, the return value is stored in **eax**. So let's look into the function that is being called. It takes a string as the first argument (that is a wicked string), while the second argument might be the string length. Press Enter to jump to the function.
|
When a function returns, the return value is stored in **eax**. So let's look into the function that is being called. It takes a string as the first argument (that is a wicked string), while the second argument might be the string length. Press Enter to jump to the function.
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/static3.png)
|
||||||
|
|
||||||
Scroll down until you find **xor al, 5Ah**. Eventually you will be able to recognize when a string loop is being processed in assembly. In this case, it is **xor** a byte with **5Ah** which is **Z** in [ascii](http://www.asciitable.com/).
|
Scroll down until you find **xor al, 5Ah**. Eventually you will be able to recognize when a string loop is being processed in assembly. In this case, it is **xor** a byte with **5Ah** which is **Z** in [ascii](http://www.asciitable.com/).
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/static4.png)
|
||||||
|
|
||||||
We can assume that this function is doing some kind of Xor encoding. So let's rename this function as XorDecode. We will need this information later when we debug in Section 6.
|
We can assume that this function is doing some kind of Xor encoding. So let's rename this function as XorDecode. We will need this information later when we debug in Section 6.
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/static5.png)
|
||||||
|
|
||||||
Let's use the tool **XORSearch** to see if we can find some interesting xor decoded strings. Open the terminal **cmd.exe** from the start bar, and navigate to the XORSearch.exe
|
Let's use the tool **XORSearch** to see if we can find some interesting xor decoded strings. Open the terminal **cmd.exe** from the start bar, and navigate to the XORSearch.exe
|
||||||
|
|
||||||
```XORSearch.exe <Path to Unknown.exe> "A string to test"```
|
```XORSearch.exe <Path to Unknown.exe> "A string to test"```
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/static6.png)
|
||||||
|
|
||||||
**"Yo this is dope!"** How weird.
|
**"Yo this is dope!"** How weird.
|
||||||
|
|
||||||
@@ -128,7 +132,8 @@ It's easy to trace back through the program disassembly, but let's look at some
|
|||||||
|
|
||||||
**Jump Examples**
|
**Jump Examples**
|
||||||
|
|
||||||

|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/static9.gif)
|
||||||
|
|
||||||
```assembly
|
```assembly
|
||||||
jz loc_401962 ; jump too offset loc_401962 if the previous condition is zero
|
jz loc_401962 ; jump too offset loc_401962 if the previous condition is zero
|
||||||
|
|||||||
11
triage.md
11
triage.md
@@ -94,16 +94,21 @@ You can use the **Malware Analysis Report** template [HERE](https://securedorg.g
|
|||||||
7. Quick Detonation
|
7. Quick Detonation
|
||||||
|
|
||||||
The point of the quick detonation is to capture the filesystem, registry, and connection activity. The VMs are set up in such a way that the Victim VM's internet traffic is captured by the Sniffer VM.
|
The point of the quick detonation is to capture the filesystem, registry, and connection activity. The VMs are set up in such a way that the Victim VM's internet traffic is captured by the Sniffer VM.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
On the **Sniffer VM** open the terminal and run `sudo wireshark` to get Wireshark sniffing the traffic from the Victim VM. Be sure InetSim is still running, see the fundamentals Section 1 on how to start up InetSim.
|
On the **Sniffer VM** open the terminal and run `sudo wireshark` to get Wireshark sniffing the traffic from the Victim VM. Be sure InetSim is still running, see the fundamentals Section 1 on how to start up InetSim.
|
||||||
|
|
||||||
On the **Victim VM** open the SysInternals **procmon.exe** and **procexp.exe** so that we can monitor filesystem and process events.
|
On the **Victim VM** open the SysInternals **procmon.exe** and **procexp.exe** so that we can monitor filesystem and process events.
|
||||||

|
|
||||||
|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/triageVMs2.gif)
|
||||||
|
|
||||||
Go ahead and detonate the the malware.
|
Go ahead and detonate the the malware.
|
||||||
|
|
||||||
On the **Sniffer VM** look for an HTTP request. Right click and Follow->TCP Stream. I will display the HTTP get request that was sent by the malware.
|
On the **Sniffer VM** look for an **HTTP** request. Right click and **Follow->TCP Stream**. I will display the HTTP get request that was sent by the malware.
|
||||||

|
|
||||||
|
*Click Image to Enlarge*
|
||||||
|
[](https://securedorg.github.io/images/triageVMs3.gif)
|
||||||
|
|
||||||
[Section 3 <- Back](https://securedorg.github.io/RE101/section3) | [Next -> Section 5](https://securedorg.github.io/RE101/section5)
|
[Section 3 <- Back](https://securedorg.github.io/RE101/section3) | [Next -> Section 5](https://securedorg.github.io/RE101/section5)
|
||||||
|
|||||||
Reference in New Issue
Block a user