# HawkEye

{% hint style="warning" %}
Always open malware in a secure environment like a VM.
{% endhint %}

{% hint style="info" %}
We will be using the [REMnux](https://remnux.org/) distribution which is specifically made for reverse engineering.
{% endhint %}

##

> Q1. How many packets does the capture have?

* In order to find the number of packets we have to go to the `Statistics > Capture File Properties` section.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F6LxGGYkQAq7gWJ6syPPZ%2Fhawkeye%201.png?alt=media&#x26;token=b86be320-efaa-4d08-aadd-5a6b4304c67e" alt=""><figcaption></figcaption></figure>

##

> Q2. At what time was the first packet captured?

* We have to set the format to UTC in the `View > Time Display Format` section.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F3449NHjcEzmAXXtu0vLF%2Fhawkeye%202.png?alt=media&#x26;token=80f65752-1300-4f1c-9da7-6c3c2671a280" alt=""><figcaption></figcaption></figure>

* Alternatively, we can also find the answer in the `Capture File Properties` section.!

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FzB1Jx4SvHQdHE4C3sk0s%2Fhawkeye%202.2.png?alt=media&#x26;token=60863e71-7c82-4047-823e-7f3649350c22" alt=""><figcaption></figcaption></figure>

##

> Q3. What is the duration of the capture?

* Again this answer can be found in the `Capture File Properties` section.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FXOYfBYxZnplMLAC7Bkrv%2Fhawkeye%203.png?alt=media&#x26;token=4fadad18-cd79-4ede-a39b-673b06ce1db3" alt=""><figcaption></figcaption></figure>

##

> Q4. What is the most active computer at the link level?

* If we go to the `Statistics > Endpoints` section, we can see information about all the devices in the packet transfer.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FxJwtMGadonJtfQQeMTQZ%2Fhawkeye%204.png?alt=media&#x26;token=2ab2fb64-e414-42ff-b20c-39ad27e22086" alt=""><figcaption></figcaption></figure>

##

> Q5. Manufacturer of the NIC of the most active system at the link level?

* We can use [A-Packets](https://apackets.com/), in order to find the answer easily.
* Open the `Ethernet` section of the file.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F0eWWGx4bm2970dwveUZ5%2Fhawkeye%205.png?alt=media&#x26;token=d5a309a4-1a76-41e1-b561-e5c5fd331207" alt=""><figcaption></figcaption></figure>

* Alternatively, we can also use Wireshark to find the NIC manufacturer.
* Put the following filter on in order to filter for relevant traffic.

```
eth.addr==00:08:02:1c:47:ae
```

* On applying the filter, we can see the following packet.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FSZ2D7Po5w93M6sgsaKFv%2Fhawkeye%205.3.png?alt=media&#x26;token=7a9a6ba6-14b7-4021-afc2-5494594ab334" alt=""><figcaption></figcaption></figure>

* The source address is `00:08:02:1c:47:ae`. Let's search this MAC address on [DNSChecker](https://dnschecker.org/).

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FUg9jRdXzB7rraZ31wzDg%2Fhawkeye%205.2.png?alt=media&#x26;token=761c15a5-07ac-4765-849e-3b30d65e6693" alt=""><figcaption></figcaption></figure>

* Same answer as the one we got from A-Packets.

##

> Q6. Where is the headquarter of the company that manufactured the NIC of the most active computer at the link level?

* A quick Google search tells us where the headquarters are located.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FgAPCqZWQZgzLcRWdH7Av%2Fhawkeye%206.png?alt=media&#x26;token=8ac02985-c6b9-4e52-93dc-b4bc3205556a" alt=""><figcaption></figcaption></figure>

##

> Q7. The organization works with private addressing and netmask /24. How many computers in the organization are involved in the capture?

* The `/24` subnet mask denotes that the first 24 bytes are part of the network and the last 8 bytes are part of the host.
* This means that every host within the `10.4.10.x/24` subnet is part of the organization.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FQv9x6b0hTY52wEBCyjCA%2Fhawkeye%207.png?alt=media&#x26;token=1b112b03-6bba-4054-826b-e9b0fe3e9a80" alt=""><figcaption></figcaption></figure>

* We can see that the first 3 devices are part of the same subnet thus the same organization. Note that the broadcast address is not counted.

##

> Q8. What is the name of the most active computer at the network level?

* Since we already know the MAC address of the most active host, we can set a filter for that address and `dhcp` to find the host name.

```
eth.addr==00:08:02:1c:47:ae && dhcp
```

* Let's look at the `Host Name` option.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FWDdVXTGYxf3q9kcWBqg7%2Fhawkeye%208.png?alt=media&#x26;token=10a4cec7-11fd-46f8-b76e-c66b5a6d880a" alt=""><figcaption></figcaption></figure>

##

> Q9. What is the IP of the organization's DNS server?

* In the `DNS` section of A-Packets, we can see the IP of the organization.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FluAihJmGlso6xFNAB5Mb%2Fhawkeye%209.png?alt=media&#x26;token=dd1839c9-514e-48df-bb92-36c7f513856b" alt=""><figcaption></figcaption></figure>

* We can also filter for `dns` packets in Wireshark.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FEiX4OV6KMl2RnKlTMeJ2%2Fhawkeye%209.2.png?alt=media&#x26;token=61eca831-0cdb-4406-9dba-f824383b6d20" alt=""><figcaption></figcaption></figure>

##

> Q10. What domain is the victim asking about in packet 204?

* Let's analyze the 204th packet.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F5MhLV0tq8Ee9B10ayUq3%2Fhawkeye%2010.png?alt=media&#x26;token=e9674bca-0a3b-463d-9f82-80b0fdcce383" alt=""><figcaption></figcaption></figure>

##

> Q11. What is the IP of the domain in the previous question?

* Let's look through the `Connections` section in A-Packets.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FKfbhSxI8mGZ6H5STO12k%2Fhawkeye%2011.png?alt=media&#x26;token=60665cca-002b-4927-a17e-b564108575f2" alt=""><figcaption></figcaption></figure>

* In order to find the answer in Wireshark, we have to set the following filter:

```
frame contains proforma-invoices.com
```

* Look in the destination IP address field.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FVfziypAPko0PbD7hUkYx%2Fhawkeye%2011.2.png?alt=media&#x26;token=913cdf47-1ade-4ddd-b36e-6aca203b111e" alt=""><figcaption></figcaption></figure>

##

> Q12. Indicate the country to which the IP in the previous section belongs.

* We can use the `IP Lookup` tool in DNSChecker.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2Fmhp38SErUUo8XtNQb41C%2Fhawkeye%2012.png?alt=media&#x26;token=ada0b6b5-210d-47a7-8f19-71f1f93ec705" alt=""><figcaption></figcaption></figure>

##

> Q13. What operating system does the victim's computer run?

* Let's filter the http requests using the following filter:

```
eth.addr==00:08:02:1c:47:ae && http.request
```

* Go to `Follow > TCP Stream` in order to see the entire message.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FlNp5CVQvQR1qsFMLaVnd%2Fhawkeye%2013.png?alt=media&#x26;token=4ae9a217-bb90-4620-921a-5ab11de4f3ff" alt=""><figcaption></figcaption></figure>

* We can also find the OS in the `HTTP` section of A-Packets.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FH8Alj45t4Xz3zmHJsDWY%2Fhawkeye%2013.2.png?alt=media&#x26;token=419d9add-f56a-4bcd-be3d-7dc15f5f3e49" alt=""><figcaption></figcaption></figure>

##

> Q14. What is the name of the malicious file downloaded by the accountant?

* In the `HTTP Headers` section of A-Packets, we can find the file that is being downloaded. !

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FU4Uj46mGyGOYTOXzUCKE%2Fhawkeye%2014.png?alt=media&#x26;token=8b33a794-c0d2-4304-8a06-2a2407b2b756" alt=""><figcaption></figcaption></figure>

* Alternatively, in Wireshark we can filter for `GET` request using the following filter:

```
http.request.method == GET
```

* Only the 210th packet is accessing a file.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FvRSxGJ2TURChXGKj3KYM%2Fhawkeye%2014.2.png?alt=media&#x26;token=525a01d1-1ff1-467b-bb56-8517665eb91f" alt=""><figcaption></figcaption></figure>

##

> Q15. What is the md5 hash of the downloaded file?

* Let's extract the file via `File > EXport Objects > HTTP`.
* We can now use `md5sum` command in order to obtain the file hash.

```
$ md5sum tkraw_Protected99.exe 
71826ba081e303866ce2a2534491a2f7  tkraw_Protected99.exe
```

* We can also upload the file to [VirusTotal](https://www.virustotal.com/gui/home/search) in order to find the file hash.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F35stI8J8kU58ONZMU6M1%2Fhawkeye%2015.png?alt=media&#x26;token=b5bfba91-570c-4859-af47-a3984b5ce2ec" alt=""><figcaption></figcaption></figure>

##

> Q17. What software runs the webserver that hosts the malware?

* In Wireshark, we can again follow the TCP Stream in order to find the server.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FGywqwHxefFLjIgXDAoPW%2Fhawkeye%2017.png?alt=media&#x26;token=1c1994b0-6a8a-4161-adc9-7bf1005fb0ef" alt=""><figcaption></figcaption></figure>

##

> Q18. What is the public IP of the victim's computer?

* Let's filter for all HTTP requests:

```
http.request
```

* If we follow TCP Stream, we can find the public IP.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FtK9jdJxkZ71nMcFCMKXz%2Fhawkeye%2018.png?alt=media&#x26;token=1c15fd1c-37a7-4516-9494-9a20ba13d177" alt=""><figcaption></figcaption></figure>

##

> Q19. In which country is the email server to which the stolen information is sent?

* We can use the `IP Lookup` tool in DNSChecker.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FggzIgUchcGwqaNONcVXw%2Fhawkeye%2019.png?alt=media&#x26;token=de7e30ad-a883-47ad-ae2b-342a2c4c8259" alt=""><figcaption></figcaption></figure>

##

> Q20. Analyzing the first extraction of information. What software runs the email server to which the stolen data is sent?

* Put on the following filter:

```
ip.addr == 10.4.10.132 && smtp.req
```

* We can follow the TCP stream.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FrI6g2jd7G9Hv54yGMtcV%2Fhawkeye%2020.png?alt=media&#x26;token=5ca5db94-dcd3-4886-8074-f81dd8570327" alt=""><figcaption></figcaption></figure>

##

> Q21. To which email account is the stolen information sent?

* Further down in the TCP stream we can see the email that the information is sent to. !

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2Fa607gFuCb6UbaMm176LG%2Fhawkeye%2021.png?alt=media&#x26;token=8542d2c3-15d2-4aae-b291-e96cc171b9a5" alt=""><figcaption></figcaption></figure>

##

> Q22. What is the password used by the malware to send the email?

* We will use the same filter as before:

```
ip.addr == 10.4.10.132 && smtp.req
```

* We can see a password. However, it seems to be base64 encoded.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FduSwu00E62pqH6YlVsKm%2Fhawkeye%2022.2.png?alt=media&#x26;token=b635def0-2200-448a-b8a5-c2686f3e94ca" alt=""><figcaption></figcaption></figure>

* Let's use CyberChef to decode the password.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F3kNn2nCL6vUDRU7poLxG%2Fhawkeye%2022.png?alt=media&#x26;token=97831b24-151b-4b50-82b2-f9e4c5c8cc48" alt=""><figcaption></figcaption></figure>

##

> Q23. Which malware variant exfiltrated the data?

* If we follow the same TCP stream, we can see a huge blob of data.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FrKl7Y6eraxfVCP88C92R%2Fhawkeye%2023.2.png?alt=media&#x26;token=2bf6f340-9593-4d35-9450-fd68952cd0f2" alt=""><figcaption></figcaption></figure>

* This has been base64 encoded. We have to again use CyberChef to decode it.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FsxmzBqXIsJJGAwB96RT8%2Fhawkeye%2023.png?alt=media&#x26;token=bb7e2007-a0f1-4133-93aa-959a1e5cc91d" alt=""><figcaption></figcaption></figure>

##

> Q24. What are the bankofamerica access credentials? (username:password)

* This information is available in the output for the previous question.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FCx87y70g1SVvN8KmuYKi%2Fhawkeye%2024.png?alt=media&#x26;token=c59dd61a-faa9-407a-be98-c7dc4e343e0b" alt=""><figcaption></figcaption></figure>

##

> Q25. Every how many minutes does the collected data get exfiltrated?

* If we look at the SMTP packets, we can see that the email is sent every 10 minutes.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F5WAXrDCvQeEcBXXmbP69%2Fhawkeye%2025.png?alt=media&#x26;token=86cd3bf9-c5d7-4891-852f-c19baa9d73e4" alt=""><figcaption></figcaption></figure>
