<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mihika</title>
    <description>The latest articles on DEV Community by Mihika (@mihika).</description>
    <link>https://dev.to/mihika</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1233649%2F7db84fd6-ea82-4950-8423-42527bf8b42b.jpg</url>
      <title>DEV Community: Mihika</title>
      <link>https://dev.to/mihika</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mihika"/>
    <language>en</language>
    <item>
      <title>Linux Log Analysis | Hammered Lab | CyberDefenders</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Thu, 05 Dec 2024 17:10:19 +0000</pubDate>
      <link>https://dev.to/mihika/linux-log-analysis-hammered-lab-cyberdefenders-eic</link>
      <guid>https://dev.to/mihika/linux-log-analysis-hammered-lab-cyberdefenders-eic</guid>
      <description>&lt;p&gt;Go to the CyberDefenders website, Open the lab &amp;amp; Download the challenge file &lt;a href="https://cyberdefenders.org/blueteam-ctf-challenges/hammered/" rel="noopener noreferrer"&gt;Hammered Lab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Logs given in the Challenge&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;kern.log:&lt;/strong&gt; Logs related to the Linux kernel, including hardware, driver messages, and kernel errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;auth.log:&lt;/strong&gt; Authentication-related logs like login attempts, sudo use, and SSH access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;daemon.log:&lt;/strong&gt; Logs from system daemons like cron, cupsd, and other services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dmesg:&lt;/strong&gt; Kernel ring buffer logs (boot info, hardware, drivers).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;apache2:&lt;/strong&gt; Apache web server logs (access and error logs for HTTP requests).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am Analyzing these logs with powershell.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Which service did the attackers use to gain access to the system?&lt;/strong&gt;&lt;br&gt;
powershell command: &lt;code&gt;Select-String -Path "auth.log" -Pattern "failed"&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;Select-String -Path "auth.log" -Pattern "accepted"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpl01p0jya384x364cvf0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpl01p0jya384x364cvf0.png" alt="ssh" width="800" height="381"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: SSH&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What is the operating system version of the targeted system?&lt;/strong&gt;&lt;br&gt;
check dmesg or messages file, Look for entries mentioning the OS version or kernel version, typically near boot logs.&lt;br&gt;
&lt;code&gt;Linux version 2.6.24-26-server (buildd@crested) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3))&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;answer: 4.2.4-1ubuntu3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What is the name of the compromised account?&lt;/strong&gt;&lt;br&gt;
filter: &lt;code&gt;Select-String -Path "auth.log" -Pattern "Accepted"&lt;/code&gt; or &lt;br&gt;
&lt;code&gt;Select-String -Path "auth.log" -Pattern "failed"&lt;/code&gt;&lt;br&gt;
users in log: &lt;br&gt;
user1, user2, user3, root, dhg, fido&lt;br&gt;
filter: &lt;code&gt;Select-String -Path "auth.log" -Pattern "failed password for root"&lt;/code&gt;&lt;br&gt;
the entries for failed password for root user is higher than other users.&lt;br&gt;
&lt;strong&gt;answer: root&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. How many attackers, represented by unique IP addresses, were able to successfully access the system after initial failed attempts?&lt;/strong&gt;&lt;br&gt;
filter to extract accespted password enteries for root user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Select-String -Path "auth.log" -Pattern "Accepted password for root" &amp;gt; AcceptedPass.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;filter to extract IP addresses from AccesptedPass.txt :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Select-String -Path "AcceptedPass.txt" -Pattern "from" | ForEach-Object { ($_ -match "from (\d{1,3}(\.\d{1,3}){3})") ; $matches[1] } | Sort-Object | Select-Object -Unique &amp;gt; IPAddress.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o6cc3jsqw37ooddfe6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o6cc3jsqw37ooddfe6r.png" alt="Ip addresses used by attacker" width="590" height="409"&gt;&lt;/a&gt;&lt;br&gt;
Total 18 IP address , 1 IP is private removing it, now total is 17. answer should be 17, but it is showing wrong, there is something wrong in the challenge question . the correct answer according to challenge is 6 because there are 6 users in the logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Which attacker's IP address successfully logged into the system the most number of times?&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtjitdaeibim56r6hagi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtjitdaeibim56r6hagi.png" alt="Attacker's IP and their Occurances" width="307" height="425"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: 219.150.161.20&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. How many requests were sent to the Apache Server?&lt;/strong&gt;&lt;br&gt;
navigate to folder apache2, open the terminal &lt;br&gt;
filter: &lt;code&gt;(Get-Content "www-access.log").Count&lt;/code&gt;&lt;br&gt;
It will count enteries in log file uniquely&lt;br&gt;
&lt;strong&gt;answer: 365&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. How many rules have been added to the firewall?&lt;/strong&gt;&lt;br&gt;
you have to find which firewall used in log file, it could be firewalld, ufw or iptables&lt;br&gt;
navigate to the challenge directory, open the terminal&lt;br&gt;
filter: &lt;code&gt;Get-ChildItem -Path . -Recurse | Select-String -Pattern "iptables"&lt;/code&gt;&lt;br&gt;
We found some references of iptables in auth.log file.  No enteries related to firewalld, and there are some enteries related to ufw blocking incoming traffic.&lt;/p&gt;

&lt;p&gt;You will see some entries for creating firewall rules using iptables&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1vioqmkzbm88dh8ixhh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1vioqmkzbm88dh8ixhh.png" alt="iptables rule creation" width="800" height="77"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: 6&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. One of the downloaded files to the target system is a scanning tool. Provide the tool name.&lt;/strong&gt;&lt;br&gt;
navigate to challenge directory filter:  &lt;code&gt;Select-String -Path "dpkg.log" -Pattern "install"&lt;/code&gt;&lt;br&gt;
Inspect the installed tools, you will find nmap, a scanning tool.&lt;br&gt;
&lt;strong&gt;answer: nmap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. When was the last login from the attacker with IP 219.150.161.20? Format: MM/DD/YYYY HH:MM:SS AM&lt;/strong&gt;&lt;br&gt;
filter: &lt;code&gt;Select-String -Path "auth.log" -Pattern "accepted" | Select-String -Pattern "219.150.161.20"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;answer: 04/19/2010 05:56:05 AM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. The database displayed two warning messages, provide the most important and dangerous one.&lt;/strong&gt;&lt;br&gt;
Navigate to the directory where all the log files of this challenge is stored. filter: &lt;code&gt;Get-ChildItem -Path . -Recurse | Select-String -Pattern "warning"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;answer:  mysql.user contains 2 root accounts without password!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Multiple accounts were created on the target system. Which one was created on Apr 26 04:43:15?&lt;/strong&gt;&lt;br&gt;
Navigate to challenge directory, and use filter, which will search for all occurances of "useradd" in the directory.&lt;br&gt;
filter:  &lt;code&gt;Get-ChildItem -Path . -Recurse | Select-String -Pattern "useradd"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;answer: wind3str0y&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Few attackers were using a proxy to run their scans. What is the corresponding user-agent used by this proxy?&lt;/strong&gt;&lt;br&gt;
useragent info is present in www-access.log file, in 12th column, use filter to extract the column:&lt;br&gt;
&lt;code&gt;Get-Content access.log | ForEach-Object { ($_ -split "\s+")[11] } | Sort-Object | Get-Unique | Out-File useragents.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;check the useragent, the one which is similiar to the proxy name.&lt;br&gt;
&lt;strong&gt;answer: pxyscand/2.1&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>loganalysis</category>
      <category>cyberdefenders</category>
      <category>endpoint</category>
    </item>
    <item>
      <title>Log Analysis | Compromised wordpress | Privilege Escalation | Blue team labs online</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 03 Dec 2024 19:55:56 +0000</pubDate>
      <link>https://dev.to/mihika/log-analysis-compromised-wordpress-privilege-escalation-blue-team-labs-online-20ic</link>
      <guid>https://dev.to/mihika/log-analysis-compromised-wordpress-privilege-escalation-blue-team-labs-online-20ic</guid>
      <description>&lt;p&gt;We are going to solve two labs in this blog. Go to Blue teams Labs online website, open our first lab &amp;amp; Download the file: &lt;a href="https://blueteamlabs.online/home/challenge/log-analysis-compromised-wordpress-ce000f5b59" rel="noopener noreferrer"&gt;Log Analysis - Compromised Wordpress&lt;/a&gt;&lt;br&gt;
Let me tell you I am using &lt;strong&gt;Splunk&lt;/strong&gt; here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Identify the URI of the admin login panel that the attacker gained access to (include the token)&lt;/strong&gt;&lt;br&gt;
Use filter: &lt;code&gt;source="access.log" | stats count by uri&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6drshm2xuhcoa6xr1ie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6drshm2xuhcoa6xr1ie.png" alt="admin login uri" width="633" height="311"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: /wp-login.php/?itsec-hb-token=adminlogin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Can you find two tools the attacker used?&lt;/strong&gt;&lt;br&gt;
Use filter: &lt;code&gt;source="access.log" | stats count by useragent&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9uagzubknhgzahgxam9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9uagzubknhgzahgxam9.png" alt="tools used by attacker to scan vulnerabilities" width="606" height="191"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: sqlmap WPScan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The attacker tried to exploit a vulnerability in ‘Contact Form 7’. What CVE was the plugin vulnerable to? (Do some research!)&lt;/strong&gt;&lt;br&gt;
You can search this online&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslq3cyy001dl1mj4kedz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslq3cyy001dl1mj4kedz.png" alt="contact from 7 vulnerability" width="800" height="120"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: CVE-2020-35489&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. What plugin was exploited to get access?&lt;/strong&gt;&lt;br&gt;
If you see requests to plugin directories that seem out of place, it could indicate an attempt to exploit a vulnerability in that plugin.&lt;br&gt;
syntax: /wp-content/plugins/plugin_name/...&lt;br&gt;
you can checkout this website and search specific plugin to find if it's associated with any vulnerability.&lt;br&gt;
Exploit-DB &lt;a href="https://www.exploit-db.com/" rel="noopener noreferrer"&gt;www.exploit-db.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;filter: &lt;code&gt;source="access.log" method=POST | stats count by uri&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjk17ah61fgv8z3kiytz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjk17ah61fgv8z3kiytz.png" alt="POST requests" width="635" height="138"&gt;&lt;/a&gt;&lt;br&gt;
ee-file-engine.php and ee-upload-engine.php, these files are part of the Simple File List plugin. Typically, the upload functionality within plugins can be targeted by attackers who want to upload malicious files.&lt;/p&gt;

&lt;p&gt;The fr34k.php file located in the /uploads directory is highly suspicious. Typically, files in the uploads directory should contain user-generated media (like images, PDFs, etc.), not PHP scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;answer: simple file list 4.2.2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. What is the name of the PHP web shell file?&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;answer: fr34k.php&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. What was the HTTP response code provided when the web shell was accessed for the final time?&lt;/strong&gt;&lt;br&gt;
filter: &lt;code&gt;source="access.log" "fr34k.php" | stats count by _time method uri status&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fdxvj1ybff2rfy0o4z0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fdxvj1ybff2rfy0o4z0.png" alt="status code when web shell was lastly accessed" width="800" height="44"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer : 404&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;2nd Lab, Open &amp;amp; Download the file &lt;a href="https://blueteamlabs.online/home/challenge/log-analysis-privilege-escalation-65ffe8df12" rel="noopener noreferrer"&gt;Log Analysis - Priviledge Escalation&lt;/a&gt; You can open the file in any Text Editor&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What user (other than ‘root’) is present on the server?&lt;/strong&gt;&lt;br&gt;
you can see the command used, "cd /home/daniel/" in the given file&lt;br&gt;
&lt;strong&gt;answer: daniel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What script did the attacker try to download to the server?&lt;/strong&gt; &lt;br&gt;
everything is pretty straight forward mentioned in the file&lt;br&gt;
&lt;strong&gt;answer: linux-exploit-suggester.sh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What packet analyzer tool did the attacker try to use?&lt;br&gt;
answer: tcpdump&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. What file extension did the attacker use to bypass the file upload filter implemented by the developer?&lt;/strong&gt;&lt;br&gt;
there is a mention of the removal of a file with .phtml extension. .phtml files are often treated as PHP scripts by web servers configured to recognize them as executable.&lt;br&gt;
If the file upload filter was set to block common PHP file extensions like .php, .php3, .php5, or .phps, the attacker might have used .phtml as an alternate extension to evade these filters. After uploading the .phtml file, the attacker could access it through the server, and the server would execute it as PHP code. This allows the attacker to run arbitrary commands or use it as a web shell. The attacker deleted the uploaded .phtml file at the end to clean up traces of their activities and reduce the risk of detection.&lt;br&gt;
&lt;strong&gt;answer: .phtml&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Based on the commands run by the attacker before removing the php shell, what misconfiguration was exploited in the ‘python’ binary to gain root-level access? 1- Reverse Shell ; 2- File Upload ; 3- File Write ; 4- SUID ; 5- Library load&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Commands like sudo -l and using Python to spawn a shell (./usr/bin/python -c ...) point toward attempts to elevate privileges.&lt;br&gt;
&lt;strong&gt;answer: 4&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>splunk</category>
      <category>loganalysis</category>
      <category>labs</category>
      <category>btlo</category>
    </item>
    <item>
      <title>Log Analysis | Sysmon | Blue Team Labs Online</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 03 Dec 2024 17:09:29 +0000</pubDate>
      <link>https://dev.to/mihika/log-analysis-sysmon-blue-team-labs-online-484k</link>
      <guid>https://dev.to/mihika/log-analysis-sysmon-blue-team-labs-online-484k</guid>
      <description>&lt;p&gt;Go to Blue team Labs online website and open the lab : &lt;a href="https://blueteamlabs.online/home/challenge/log-analysis-sysmon-fabcb83517" rel="noopener noreferrer"&gt;Log Analysis - Sysmon&lt;/a&gt;&lt;br&gt;
Download the file. We have to investigate the sysmon logs &amp;amp; answer some of the questions related to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What is the file that gave access to the attacker?&lt;/strong&gt;&lt;br&gt;
Inspect logs, see if you find any suspicious event, weird commands for this use the filter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source="sysmon-events.json" | stats count by Event.EventData.CommandLine 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will find alot of suspicious commands, some of them trying to establish connection to C2 server, some downloading malcious file from internet, some executing malicious code using powershell in hidden window. you will see powershell.exe, supply.exe , but we have to find who started this process, for this use the filter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source="sysmon-events.json"| stats count by Event.EventData.CommandLine Event.EventData.ProcessId Event.EventData.ParentProcessId
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the very first command we found suspicious is powershell.exe which running a code in hidden window, the Parent process ID is 2848, which is associated to updater.hta,  HTA files are essentially HTML files that are executed using the Microsoft HTML Application Host (mshta.exe). we can assume that updater.hta may have some malicious embedded hidden code in it which execute malicious command in powershell.&lt;br&gt;
&lt;strong&gt;answer : updater.hta&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What is the powershell cmdlet used to download the malware file and what is the port?&lt;/strong&gt;&lt;br&gt;
Use the same filter to find the command, you will see the powershell command the the cmdlet used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqdxtpmv25zxkpp30sui4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqdxtpmv25zxkpp30sui4.png" alt="powershell" width="800" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;answer: INvoke-WebRequest 6969&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What is the name of the environment variable set by the attacker?&lt;/strong&gt;&lt;br&gt;
filter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source="sysmon-events.json"| stats count by Event.EventData.CommandLine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygh6knac35v2kg332tga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygh6knac35v2kg332tga.png" alt="variable set" width="518" height="47"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: comspec=C:\windows\temp\supply.exe&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.What is the process used as a LOLBIN to execute malicious commands?&lt;/strong&gt;&lt;br&gt;
A LOLBIN (Living Off The Land Binary) refers to a legitimate, trusted executable or tool that is already present on the system. Attackers abuse these binaries to execute malicious commands or payloads, reducing the likelihood of detection by security software.&lt;br&gt;
Common examples of LOLBINs include PowerShell, cmd.exe, ftp.exe, and wscript.exe, which are integral to the operating system.&lt;br&gt;
In this case it could be powershell.exe or ftp.exe, because all malicious activity was started with powershell command it also downloads malicious file from internet like supply.exe, but in some instances of supply.exe the parent process is ftp.exe. &lt;br&gt;
&lt;strong&gt;the correct answer according to the lab is ftp.exe&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Malware executed multiple same commands at a time, what is the first command executed?&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vd76qjvqnqkzhsi73no.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vd76qjvqnqkzhsi73no.png" alt="malicious command" width="567" height="656"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer: ipconfig&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Looking at the dependency events around the malware, can you able to figure out the language, the malware is written.&lt;/strong&gt; &lt;br&gt;
filter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`source="sysmon-events.json" | stats count by Event.EventData.TargetFilename Event.EventData.Image`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbfcv9bd4p248cacfsh35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbfcv9bd4p248cacfsh35.png" alt="dependencies used by supply.exe" width="800" height="345"&gt;&lt;/a&gt;&lt;br&gt;
supply.exe targets 2 dynamic-linked libraries: Python27.dll &amp;amp; msvcr90.dll. Python27.dll indicating that the malware likely includes or relies on Python code. msvcr90.dll is microsoft visual C++ Runtime 9.0 library, It suggests that the Python interpreter or the malware itself was compiled or linked with Visual C++.&lt;br&gt;
&lt;strong&gt;answer: python&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Malware then downloads a new file, find out the full url of the file download.&lt;/strong&gt; &lt;br&gt;
filter: &lt;code&gt;source="sysmon-events.json" | stats count by Event.EventData.CommandLine&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F87wzu7in5xsrndmzc7ny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F87wzu7in5xsrndmzc7ny.png" alt="file download powershell command" width="800" height="57"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;answer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://github.com/ohpe/juicypotato/releases/download/v0.1/JuicyPotato.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8. What is the port the attacker attempts to get reverse shell?&lt;/strong&gt; &lt;br&gt;
Reverse shell mean when attacker establishes a backdoor connection from the infected system to the attacker's Command and Control (C2) server, enabling the attacker to execute commands on the infected machine and potentially exfiltrate sensitive information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxn7dgt0cd5az51137nm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxn7dgt0cd5az51137nm.png" alt="reverse shell command" width="800" height="51"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;supply.exe execute the command juicy.exe is likely a tool that exploits privilege escalation vulnerabilities, sets a local listner on port 9999. establish a connection to the attacker's machine at IP 192.168.1.11, port 9898. question is asking for the destination port (attacker's system port).&lt;br&gt;
&lt;strong&gt;answer: 9898&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>splunk</category>
      <category>sysmon</category>
      <category>loganalysis</category>
      <category>labs</category>
    </item>
    <item>
      <title>(Trickbot) Malware Analysis Report</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Sat, 16 Nov 2024 19:45:15 +0000</pubDate>
      <link>https://dev.to/mihika/trickbot-malware-analysis-report-5aok</link>
      <guid>https://dev.to/mihika/trickbot-malware-analysis-report-5aok</guid>
      <description>&lt;p&gt;This report provides a detailed analysis of malware.exe, Identified as the TrickBot Trojan. &lt;br&gt;
TrickBot is a banking Trojan known for stealing payment credentials by redirecting victims to phishing websites. The malware is typically distributed via spearphishing emails. Those are typically attached in the form of malicious Microsoft Word or Excel files. One way of its spreading is by exploiting vulnerabilities in SMB, a protocol that allows Windows computers to easily share and access files and folders on other systems on the same network. Trickbot can be distributed through other malware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trickbot Infection Chain
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayuz3p4fx4pi2l4kg2xw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayuz3p4fx4pi2l4kg2xw.png" alt="Flowchart from a Trickbot infection" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Target System for this Analysis is Windows 10 Virtual Machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File :&lt;/strong&gt; malware.exe , PE32 windows executable 32 bit GUI&lt;br&gt;
&lt;strong&gt;original filename :&lt;/strong&gt; MfcTTT.EXE&lt;br&gt;
&lt;strong&gt;File size:&lt;/strong&gt; 550 kb&lt;br&gt;
&lt;strong&gt;sha256 Hash :&lt;/strong&gt; 9FDEA40A9872A77335AE3B733A50F4D1E9F8EFF193AE84E36FB7E5802C481F72&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tagged as :&lt;/strong&gt; Trickbot, banker, emotet, dropper&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tools used during Analysis&lt;/th&gt;
&lt;th&gt;HitmanPro, Process monitor, Wireshark, sysmon, Unpackme, Virustotal &amp;amp; other malware lookup and sandbox platform&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6j1u1i1ti53nw7et5bg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6j1u1i1ti53nw7et5bg.png" alt="VirusTotal Scan of malware.exe" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;VirusTotal result for malware.exe file. When this malware.exe was run, It created multiple copies of itself on different location, also detected by malware detector HitmanPro as seen in the figure below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjejyt8lb2efqkzd41xl6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjejyt8lb2efqkzd41xl6.png" alt="multiple copies of malware.exe dropped in the system" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6t93xl0elksc3ois6sm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6t93xl0elksc3ois6sm6.png" alt="System scan with HitmanPro, detected copies of malware.exe " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;files were dropped at different location:&lt;br&gt;
C:\ProgramData\аНаоすは래별.exe &lt;br&gt;
C:\Users\Mihika\AppData\Roaming\NuiGet\аНаоすは래별.exe&lt;br&gt;
C:\Users\Mihika\AppData\Roaming\NuiGet\oanwate.exe&lt;/p&gt;

&lt;p&gt;As they are copies of same file malware.exe, hashes of these dropped files are exactly same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indicator of peristency:&lt;/strong&gt;&lt;br&gt;
Executable scheduled a task for command "C:\Users\Mihika\AppData\Roaming\NuiGet\аНаоすは래별.exe" to be triggered by boot &amp;amp; by time, one of the tactics by malware to stay persistent on the system or to conduct remote Execution as part of Lateral Movement, to gain system privileges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqf5k9df5zc959be91bus.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqf5k9df5zc959be91bus.png" alt="A task was schedule to run аНаоすは래별.exe file at system startup" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although no changes in registry was found. The main executable, malware.exe queried many registry keys to gather information about the system, configuration, and installed software, some of regKey gives info related to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It checks supported languages of target system.&lt;/li&gt;
&lt;li&gt;checks user profiles, computer name, and session states.&lt;/li&gt;
&lt;li&gt;checks regional and language configurations on the system.&lt;/li&gt;
&lt;li&gt;Reads security settings of Internet Explore.&lt;/li&gt;
&lt;li&gt;checks computer location settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;the malware is using these registry queries to assess the system security configurations, language settings, compatibility modes, and file system behaviors to ensure it can run effectively, evade detection, and operate without interference from security features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u47or8fo8evxdehn2mf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u47or8fo8evxdehn2mf.png" alt="Process chart" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dropped Files:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PID&lt;/th&gt;
&lt;th&gt;Process&lt;/th&gt;
&lt;th&gt;Filename&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;8648&lt;/td&gt;
&lt;td&gt;malware.exe&lt;/td&gt;
&lt;td&gt;C:\ProgramData\аНаоすは래별.exe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6400&lt;/td&gt;
&lt;td&gt;svchost.exe&lt;/td&gt;
&lt;td&gt;C:\Users\Mihika\AppData\Roaming\NuiGet\settings.ini&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1928&lt;/td&gt;
&lt;td&gt;svchost.exe&lt;/td&gt;
&lt;td&gt;C:\Users\Mihika\AppData\Roaming\NuiGet\аНаоすは래별.exe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2508&lt;/td&gt;
&lt;td&gt;аНаоすは래별.exe&lt;/td&gt;
&lt;td&gt;C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18\c12d0fde896f3644257b320067f915f0_305fb52e-58c2-4e89-9603-23058808ae91&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Connections:&lt;br&gt;
Several reconnection attempts by svchost.exe (PID: 6400) to &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;static-200-116-199-10.une.net.co:449&lt;/li&gt;
&lt;li&gt;185.222.202.76:https&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;IP address 185.222.202.76 is indicated as malicious on virustotal, and other online platforms, associated with trickbot. &lt;br&gt;
Another connection attempts to static-200-116-199-10.une.net.co at port 449, also raise suspicion. The domain une.net.co is associated with a Colombian telecommunications company, UNE EPM Telecomunicaciones.&lt;br&gt;
The IP 200.116.199.10 appears to belong to this network. Unusual connections to a non-standard port could indicate, Malicious activity like botnet communication or malware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IOC (Indicator of Compromise)&lt;/strong&gt;&lt;br&gt;
File: &lt;br&gt;
C:\ProgramData\аНаоすは래별.exe&lt;br&gt;
C:\Users\OqXZRaykm\AppData\Roaming\NuiGet\аНаоすは래별.exe&lt;br&gt;&lt;br&gt;
malware.exe&lt;br&gt;
IP: &lt;br&gt;
200.116.199.10 : port 449&lt;br&gt;
185.222.202.76&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mitigation Strategies&lt;/strong&gt;&lt;br&gt;
Block the IP 200.116.199.10 and port 449 in your firewall.&lt;br&gt;
Block the IP 185.222.202.76&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://unit42.paloaltonetworks.com/wireshark-tutorial-examining-trickbot-infections/" rel="noopener noreferrer"&gt;Trickbot Infection in Network Traffic&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=MaLz3B5rcYM" rel="noopener noreferrer"&gt;How Malware can detect your Virtualisation environment&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Email Analysis: A Simple Guide</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 08 Oct 2024 04:47:12 +0000</pubDate>
      <link>https://dev.to/mihika/understanding-email-analysis-a-simple-guide-18i7</link>
      <guid>https://dev.to/mihika/understanding-email-analysis-a-simple-guide-18i7</guid>
      <description>&lt;p&gt;Well, I assume everyone knows what email analysis or email forensics is. As the name suggests, it's exactly that—analyzing emails. But why should we learn this? Because it's important and, honestly, quite easy.&lt;/p&gt;

&lt;p&gt;Understanding email analysis is crucial to avoid mistakenly downloading malware that could completely destroy your system, install a keylogger, or give an attacker access to your computer. They could use your system in many ways, such as a C2 server. Even if you don't regularly check or read emails, consider working in an organization where everyone shares resources. What if one of the employees is an attacker—a friend during office hours but a black hat hacker at night? It's a real possibility, and that's why email analysis matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  Starting Out: Essential Gmail Security Features
&lt;/h2&gt;

&lt;p&gt;There are some important security features you should know about in Gmail. First, let's clarify what an email client is. It's the software or application you use to send and receive emails, examples include Microsoft Outlook, Gmail, and Apple Mail. Throughout this article, we'll focus on Gmail, but the general steps might vary slightly for other email clients.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checking Recent Activity:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your Gmail web app &amp;gt; Go to the Social tab at the top &amp;gt; there's a "detail" option at the bottom of the page &amp;gt; click on it, it will show you all last access of the account, last 24 hours duration, IP address, device, location(country).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcywc6yhbbpjt9j18m6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcywc6yhbbpjt9j18m6g.png" alt="Gmail &amp;gt; Social &amp;gt; detail, at bottom, right side" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to Gmail setting &amp;gt; see all setting &amp;gt; forwarding tab &amp;gt; see if any forwarding rule is set. These rules automatically send your emails to another address specified in the rule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to Gmail setting &amp;gt; see all setting &amp;gt; filter and block addresses tab, at the top &amp;gt; see any filter(rule) is set, Here you can see any filters (rules) that have been set. You can use filters to block specific email addresses or create custom rules for managing your inbox.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Understanding Email Logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Email logs record every action taken on your email client, such as sending, receiving, deleting, moving, or blocking emails. It's important to note that accessing detailed email logs is typically only available for organizational email software like Google Workspace, where admin access is required. Unfortunately, Gmail does not currently offer this functionality for individual users.&lt;/p&gt;

&lt;p&gt;Log in to your Gmail account &amp;gt; Click on your profile picture &amp;gt; Select "Manage your Google Account" &amp;gt; Go to the "Security" tab &amp;gt; Scroll down to "Your devices" and "Recent security events" .&lt;/p&gt;




&lt;h2&gt;
  
  
  Before analyzing email headers, let's examine the incident response steps taken when encountering a suspicious email:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I. Preparation&lt;/strong&gt;: Roles are determined, with the IT team, incident response team, and SOC team collaborating.&lt;br&gt;
&lt;strong&gt;II. Detection:&lt;/strong&gt; SIEM is configured by creating phishing alerts, utilizing threat intelligence, and implementing detection rules. The SOC team conducts initial triage, assigning priority levels to tasks and individuals. Incidents are escalated or forwarded to the IR team as needed.&lt;br&gt;
&lt;strong&gt;III. Investigation and Analysis:&lt;/strong&gt; Email headers are examined using the email gateway and log data. The email body, links, and attachments are investigated in a sandbox environment. The attack type, access method, distribution method, timeline, and indicators of compromise (IOCs) are identified. Findings are documented and reported to the IR team.&lt;br&gt;
&lt;strong&gt;IV. Containment and Eradication&lt;/strong&gt;: The email is deleted, the endpoint is isolated, IOCs are blocked, and password resets are performed.&lt;br&gt;
&lt;strong&gt;V. Recovery:&lt;/strong&gt; System restoration and network monitoring are implemented.&lt;br&gt;
&lt;strong&gt;VI. Lessons Learned:&lt;/strong&gt; Incident debriefings, reporting, and training are conducted.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Email Fields:
&lt;/h2&gt;

&lt;p&gt;Go to Gmail &amp;gt; open any email &amp;gt; can you see those 3 dots, at top-right, click it and select option " show original" this will take you to the email header and content info.&lt;/p&gt;

&lt;h2&gt;
  
  
  lets understand each field:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Return-Path: &lt;a href="mailto:email@gmail.com"&gt;email@gmail.com&lt;/a&gt;&lt;/strong&gt; undeliverables messages will be sent to this address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delivered-To: &lt;a href="mailto:email@gmail.com"&gt;email@gmail.com&lt;/a&gt;&lt;/strong&gt; where you want to send the email.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authentication-Results: mail.enemywatch.net; dkim=none; dmarc=none; spf=fail (mail.enemywatch.net: domain of &lt;a href="mailto:karen.marshall@olympus.co.uk"&gt;karen.marshall@olympus.co.uk&lt;/a&gt; does not designate 37.0.10.22 as permitted sender) smtp.mailfrom=&lt;a href="mailto:karen.marshall@olympus.co.uk"&gt;karen.marshall@olympus.co.uk&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
-What it is: gives you Details on how the email passed or failed authentication checks.&lt;br&gt;
-In this example: The email failed the SPF check, you can see "fail" value assigned to spf field, meaning the server sending the email (37.0.10.22) was not authorized by the domain’s settings. DKIM and DMARC checks were not performed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Received: from olympus.co.uk (unknown [37.0.10.22]) by mail.enemywatch.net (Postfix) with ESMTP id 4HZl1q6rCqz9sVx for &lt;a href="mailto:macrus.cobb@enemywatch.net"&gt;macrus.cobb@enemywatch.net&lt;/a&gt;; Thu, 21 Oct 2021 11:02:34 +0000 (UTC)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What it is: Shows the path the email took from the sender to the recipient.&lt;/li&gt;
&lt;li&gt;Simple Explanation: The email came from the IP address 37.0.10.22 at olympus.co.uk and was processed by the mail server at enemywatch.net.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;From: KAREN MARSHALL&lt;/strong&gt; - sender name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;To: &lt;a href="mailto:macrus.cobb@enemywatch.net"&gt;macrus.cobb@enemywatch.net&lt;/a&gt;&lt;/strong&gt; - receiver email address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Date: 21 Oct 2021 04:02:30 -0700&lt;/strong&gt; : date and time when send, with 0700 time zone(Pacific Time).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Message-ID: &lt;a href="mailto:20211021040230.7ED68DD78D4A19F2@olympus.co.uk"&gt;20211021040230.7ED68DD78D4A19F2@olympus.co.uk&lt;/a&gt;&lt;/strong&gt; - a unique code to identify this specific email. created by email client&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MIME-Version: 1.0&lt;/strong&gt; - This email uses MIME version 1.0, which is a standard for formatting emails.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content-Type: multipart/mixed; boundary="----=_NextPart_000_0012_D6D683E4.D392FCEB"&lt;/strong&gt; The email contains multiple parts (text and attachment), separated by the boundary "----=_NextPart_000_0012_D6D683E4.D392FCEB".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content-Type: text/html; charset="iso-8859-1"&lt;/strong&gt; -The main body of the email is HTML text encoded in ISO-8859-1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content-Transfer-Encoding: quoted-printable&lt;/strong&gt; - The email content is encoded in a way that makes it safe for transmission.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;X-Mailer&lt;/strong&gt; - is the email client that used to create email ex: Microsoft outlook 14.0 &lt;/p&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  In nutshell:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Header Field&lt;/strong&gt;   Description&lt;br&gt;
&lt;strong&gt;Return-Path&lt;/strong&gt;    Where undeliverables messages are sent back.&lt;br&gt;
&lt;strong&gt;Delivered-To&lt;/strong&gt;   The email address where the email was delivered.&lt;br&gt;
&lt;strong&gt;Authentication-Results&lt;/strong&gt;  Email authentication results (SPF failed, DKIM and DMARC not checked).&lt;br&gt;
&lt;strong&gt;Received&lt;/strong&gt;       The servers involved in delivering the email.&lt;br&gt;
&lt;strong&gt;From&lt;/strong&gt;           The sender’s name.&lt;br&gt;
&lt;strong&gt;To&lt;/strong&gt;             The recipient’s email address.&lt;br&gt;
&lt;strong&gt;Subject&lt;/strong&gt;    The topic of the email.&lt;br&gt;
&lt;strong&gt;Date&lt;/strong&gt;       When the email was sent.&lt;br&gt;
&lt;strong&gt;Message-ID&lt;/strong&gt;     A unique identifier for the email.&lt;br&gt;
&lt;strong&gt;MIME-Version&lt;/strong&gt;   Version of the MIME protocol used.&lt;br&gt;
&lt;strong&gt;Content-Type&lt;/strong&gt;The format of the email’s content(text &amp;amp; attachments).&lt;br&gt;
&lt;strong&gt;Content&lt;/strong&gt;    The actual message and attachment in the email.&lt;/p&gt;




&lt;h2&gt;
  
  
  Email Header Important Fields:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. SPF :&lt;/strong&gt; sender policy framework, A security measure to verify if an email is coming from an authorized server. It tells the mail server which IP addresses are allowed to send emails for a domain. If the IP address of the server sending the email is not on the list, the email is flagged as suspicious. If you get an email claiming to be from your bank, SPF helps check if it’s really from the bank’s email server or from a fake one. Use an SPF checker tool like &lt;a href="https://mxtoolbox.com/SPF.aspx" rel="noopener noreferrer"&gt;MXToolbox SPF Checker.&lt;/a&gt; If the IP address of the sender’s mail server is not listed in the SPF record, SPF fails, which might indicate the email is fake.&lt;/p&gt;

&lt;p&gt;you can also check spf record of a domain from your terminal : dig @8.8.8.8 twitter.com txt +short&lt;/p&gt;

&lt;p&gt;SPF records are DNS (Domain Name System) records specifically set by domain owners(hosting provider). They are published in the DNS records of the domain. These records specify which mail servers are allowed to send email on behalf of that domain. SPF is more relevant when emails are sent from domains where the domain owner has control over the SPF records, such as in the case of business email IDs using custom domains. When an organization or individual registers a domain name (e.g., twitter.com), they gain the ability to create custom email addresses using that domain.&lt;br&gt;
For example, if Twitter registers the domain twitter.com, they can create email addresses like &lt;a href="mailto:support@twitter.com"&gt;support@twitter.com&lt;/a&gt;, &lt;a href="mailto:info@twitter.com"&gt;info@twitter.com&lt;/a&gt;, etc., for their own use, for that the domain owner needs email hosting services.&lt;/p&gt;

&lt;p&gt;this is what failed spf looks like: Authentication-Results: mail.example.com; spf=fail (mail.example.com: domain of &lt;a href="mailto:sender@example.com"&gt;sender@example.com&lt;/a&gt; does not designate 203.0.113.1 as permitted sender) smtp.mailfrom=&lt;a href="mailto:sender@example.com"&gt;sender@example.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If SPF fails, it doesn’t always mean the email is fake, but it raises a red flag. You should consider other checks (like DKIM and DMARC).&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. DKIM (DomainKeys Identified Mail) :&lt;/strong&gt; DKIM is an email authentication method designed to verify that an email message has been sent and authorized by the domain it claims to be from and that the content of the email has not been tampered with during transit.&lt;br&gt;
A DKIM signature is created by the sender’s mail server using a private key and is included in the email’s headers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hashing in DKIM: DKIM uses hashing to create a digest of the email headers and, optionally, the email body. This digest is essentially a hashed version of the email content.&lt;/li&gt;
&lt;li&gt;Signing: The hash value (digest) is then encrypted using the sender's private key to create the DKIM signature.&lt;/li&gt;
&lt;li&gt;Verification: Upon receiving the email, the recipient's server retrieves the public key from the sender’s DNS records and uses it to decrypt the DKIM signature. This reveals the original hash value. The recipient’s server then hashes the email headers and body again and compares this newly generated hash with the decrypted hash. If they match, it confirms that the email has not been altered and is from the legitimate sender.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How They Work Together&lt;/strong&gt;&lt;br&gt;
Hashing:Used to create a fixed-size representation of the email’s headers and body. This process is part of the signature creation in DKIM.&lt;/p&gt;

&lt;p&gt;DKIM Signature:Involves hashing the email content, then encrypting this hash with the private key to produce the DKIM signature. The recipient uses the public key to decrypt and verify this signature against a newly computed hash of the email content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public Key&lt;/strong&gt;&lt;br&gt;
Publication in DNS: The public key is published in the DNS (Domain Name System) records of the sender's domain. It is stored as a TXT record under a specific subdomain, which is determined by the DKIM selector. For example, if the selector is selector1 and the domain is example.com, the public key would be found in a DNS record at selector1._domainkey.example.com.&lt;br&gt;
If you want to verify DKIM-signature, use site &lt;a href="https://mxtoolbox.com/dkim.aspx" rel="noopener noreferrer"&gt;MxToolbox DKIM verification&lt;/a&gt; from email header copy domain name of sender and selector value under DKIM-signature field, it may look something like this : s=20230601&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification of Signatures:&lt;/strong&gt;&lt;br&gt;
When an email is received, the recipient's email server retrieves the public key from the DNS record associated with the sender’s domain. The server uses this public key to verify the DKIM signature in the email header. This process involves checking if the signature, which was created using the sender's private key, matches the content of the email and the public key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private Key&lt;/strong&gt;&lt;br&gt;
Creation of Signatures: The private key is kept securely by the sender’s mail server. It is used to generate DKIM signatures for outgoing emails. When an email is sent, the sender’s mail server creates a DKIM signature by hashing the email's headers and body, then encrypting this hash with the private key. This signature is included in the email header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security and Confidentiality:&lt;/strong&gt;&lt;br&gt;
The private key must be kept confidential and secure, as its exposure could allow malicious actors to forge signatures or impersonate the domain. The strength and security of the DKIM system rely on the private key being protected and only used by the legitimate mail server of the sender’s domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;other sub-fields under DKIM-signature:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;v=&lt;/strong&gt; version of DKIM specification.&lt;br&gt;
&lt;strong&gt;a=&lt;/strong&gt; algorithm used to create DKIM signature.&lt;br&gt;
&lt;strong&gt;c=&lt;/strong&gt; Indicates the canonicalization algorithms that were used for the header and the body. c=relaxed/relaxed, makes the email's headers and body less sensitive to minor variations that are often introduced by mail servers or client software. This helps ensure that the DKIM signature remains valid even if there are slight, non-malicious changes to the email content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;bh=&lt;/strong&gt; This is the hash of the body of the message after it was canonicalized, in Base64 form. "canonicalize" means to convert something into a standard or normal form.&lt;br&gt;
&lt;strong&gt;h=&lt;/strong&gt; This tells us which header fields were included in the signature.&lt;br&gt;
&lt;strong&gt;b=&lt;/strong&gt;  The signature data in Base64 form.&lt;br&gt;
&lt;strong&gt;t=&lt;/strong&gt; timestamp in epoch format&lt;br&gt;
&lt;strong&gt;s=&lt;/strong&gt;selector: Selector to locate the public key in DNS record.&lt;br&gt;
&lt;strong&gt;d=&lt;/strong&gt; domain name&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;3. MIME (Multipurpose Internet Mail Extensions) :&lt;/strong&gt; A standard for formatting emails so they can include text, images, attachments, etc. It tells email programs how to mix and present different types of content (like text, images, and attachments) in one message. MIME allows you to send an email that has both a message and a photo attached. current version is 1.0&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;4. ISO-8859-1 :&lt;/strong&gt; A character encoding standard for Western languages. ISO-8859-1 is like a dictionary for how letters and symbols are stored in emails and web pages. It helps display characters correctly, especially for English and some other European languages. ISO-8859-1 helps make sure that the letters you see in your email look correct.  it is just like ASCII, but only difference is ISO-8859-1 has more character in it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;5. SMTP (Simple Mail Transfer Protocol):&lt;/strong&gt; A protocol for sending emails between servers. SMTP is like the mail carrier for the internet. It’s the set of rules that email servers use to send emails from one server to another until they reach the recipient. SMTP is what your email app uses to send your message to the email server, which then forwards it to the recipient’s email server.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;6. ESMTP (Extended Simple Mail Transfer Protocol) :&lt;/strong&gt; ESMTP is like a more advanced version of SMTP. It has additional features for handling things like attachments and larger messages. ESMTP is used to handle more complex email tasks that SMTP alone couldn’t handle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. ESMTP id:&lt;/strong&gt; A unique identifier for each email transaction in the ESMTP protocol. The ESMTP id is like a tracking number for the email’s journey from sender to receiver. It helps email servers manage and trace the email as it moves through the system. If there’s a problem with delivering an email, the ESMTP id helps tech support figure out what went wrong.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;9. CC (Carbon Copy):&lt;/strong&gt; When you send an email and want others to receive a copy for their information, you use the CC field. Everyone who receives the email can see who else received it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BCC (Blind Carbon Copy):&lt;/strong&gt; Similar to CC, but recipients added in the BCC field receive a copy of the email without other recipients knowing. It's a way to send the email discreetly to multiple people.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;10. MUA :&lt;/strong&gt; mail user agent, those client application running on a computer that receives and send email. example Apple mail, microsoft outlook, mozilla thunderbird, google Gmail&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. MTA :&lt;/strong&gt; accepts mail from the source and route them along to the destination. example sendmail, Microsoft exchange, postfix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. MDA :&lt;/strong&gt; mail delivery agent, The primary function of an MDA is to receive incoming emails from an MTA (Mail Transfer Agent) and then deliver them to the appropriate recipient's mailbox or mail storage location. MDAs are typically located on the recipient's mail server or within their email service provider's infrastructure. example: Dovecot, Courier Mail Server, and Cyrus IMAP. These are software programs or components that handle the final step of email delivery within the recipient's mail system.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;**You will also notice, many "Received" fields, the number of received fields depend on number of MTAs the email has crossed. the Received field at the top of the email header is the most recent one and closed to the destination or receiver. the Received field at the last of email header is closest to the source or sender.&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**If the "from" field and "reply-to" field are different, it may be suspicious, but other things should also considered.&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**The domain's SPF, DKIM, DMARC, and MX records can be obtained using tools such as &lt;a href="https://mxtoolbox.com/SuperTool.aspx" rel="noopener noreferrer"&gt;Mxtoolbox&lt;/a&gt; Comparing this information will tell you if the email is spoofed or not. you can check whether the SMTP address belongs to that institution or not by looking at the Whois records of the SMTP IP address.&lt;/em&gt;*&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;POP3 (Post Office Protocol version 3):&lt;/strong&gt;&lt;br&gt;
Operation: When an email client connects to a POP3 server, it typically downloads all emails from the server to the client's local storage. By default, emails are usually deleted from the server once downloaded, although most POP3 clients have an option to leave a copy on the server.&lt;br&gt;
Port: POP3 operates over port 110 (without encryption) or 995 (with SSL/TLS encryption)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IMAP (Internet Message Access Protocol):&lt;/strong&gt;&lt;br&gt;
Operation: When an email client connects to an IMAP server, it syncs with the server, allowing users to view, organize, and manage their emails without needing to download them. Changes made (like marking emails as read, moving them between folders) are reflected on the server.&lt;br&gt;
Port: IMAP operates over port 143 (without encryption) or 993 (with SSL/TLS encryption).&lt;/p&gt;

&lt;p&gt;Storage: POP3 downloads emails to the client's device, while IMAP keeps them stored on the server.&lt;br&gt;
Offline Access: POP3 requires a constant connection to the server to manage emails, whereas IMAP allows offline access to previously synced emails.&lt;br&gt;
Syncing: IMAP syncs actions across all devices accessing the same account, whereas POP3 actions are typically local to the device.&lt;br&gt;
Usage: POP3 is suitable for users who want to store emails locally and manage them from one device. IMAP is ideal for users who access their emails from multiple devices and need consistent email management across all devices&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;SMTP (Simple Mail Transfer Protocol):&lt;/strong&gt; Used for sending and receiving emails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POP3 (Post Office Protocol 3):&lt;/strong&gt; Used for retrieving and downloading emails from a server.&lt;/p&gt;




&lt;h2&gt;
  
  
  Labs you can Try:
&lt;/h2&gt;

&lt;p&gt;Lab 1 Phishing Analysis: &lt;a href="https://blueteamlabs.online/home/challenge/phishing-analysis-f92ef500ce" rel="noopener noreferrer"&gt;https://blueteamlabs.online/home/challenge/phishing-analysis-f92ef500ce&lt;/a&gt;&lt;br&gt;
Lab 2 Phishing Analysis 2: &lt;a href="https://blueteamlabs.online/home/challenge/phishing-analysis-2-a1091574b8" rel="noopener noreferrer"&gt;https://blueteamlabs.online/home/challenge/phishing-analysis-2-a1091574b8&lt;/a&gt;&lt;br&gt;
Lab 3 The Planet's Prestige: &lt;a href="https://blueteamlabs.online/home/challenge/the-planets-prestige-e5beb8e545" rel="noopener noreferrer"&gt;https://blueteamlabs.online/home/challenge/the-planets-prestige-e5beb8e545&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools for Email Forensics:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://app.phishtool.com/" rel="noopener noreferrer"&gt;PhishTool Community&lt;/a&gt;    Analyzes suspicious emails for phishing attempts.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://mxtoolbox.com/SuperTool.aspx" rel="noopener noreferrer"&gt;MxToolbox&lt;/a&gt;    Troubleshoots email, domain, and network issues.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://talosintelligence.com/" rel="noopener noreferrer"&gt;Cisco Talos Intelligence&lt;/a&gt;   Provides information about cyber threats and vulnerabilities.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.browserling.com/" rel="noopener noreferrer"&gt;Browserling&lt;/a&gt;  Tests websites across different browsers and devices (online tool).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.virtualbox.org/" rel="noopener noreferrer"&gt;Virtual Machine (VM)&lt;/a&gt;  Creates a virtual computer system for safe software testing.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://linuxconfig.org/how-to-install-and-use-hex-editor-on-kali-linux" rel="noopener noreferrer"&gt;Hex Editor&lt;/a&gt; Views and edits files in hexadecimal format (for data analysis).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://any.run/" rel="noopener noreferrer"&gt;Sandbox Environment (AnyRun)&lt;/a&gt; Safely executes suspicious code or opens risky files.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.thunderbird.net/en-US/" rel="noopener noreferrer"&gt;Mozilla Thunderbird&lt;/a&gt;    Free and open-source email client.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.garykessler.net/library/file_sigs.html" rel="noopener noreferrer"&gt;Gary Kessler File Signature Resource&lt;/a&gt;   Identifies file types based on their signatures.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.geeksforgeeks.org/installing-and-using-exiftool-on-linux/" rel="noopener noreferrer"&gt;ExifTool&lt;/a&gt;   Reads, writes, and edits metadata in various file formats.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gchq.github.io/CyberChef/" rel="noopener noreferrer"&gt;CyberChef&lt;/a&gt;  Decodes, encodes, and manipulates various data formats (online tool).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cybervie.com/blog/what-is-the-harvester/" rel="noopener noreferrer"&gt;TheHarvester&lt;/a&gt; Gathers email addresses, phone numbers, and social media profiles (Kali Linux tool).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://help.dyn.com/how-to-use-binds-dig-tool/" rel="noopener noreferrer"&gt;dig Tool&lt;/a&gt; Gets information about domain names and their associated records (command-line tool).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.metaspike.com/blog/" rel="noopener noreferrer"&gt;Metasploit articles&lt;/a&gt;  Resources for email forensics (website).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml" rel="noopener noreferrer"&gt;Email Headers&lt;/a&gt; website which shows you all the Email Header Fields and their reference.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://labs.sqrx.com/squarex-for-beginners-ae8fac17ea68" rel="noopener noreferrer"&gt;SquareX&lt;/a&gt; file viewer and other useful extension&lt;/p&gt;


&lt;h2&gt;
  
  
  Investigating email links:
&lt;/h2&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hover your cursor over the link without clicking on it. Check if the URL matches the context of the email, check if it looks suspicious or have slight misspellings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure the URL uses HTTPS, has a valid domain name and is not a shortened or obfuscated link.  check for long strings of characters, unexpected domain names, or extra subdomains.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use URL scanner and Domain Lookup, &lt;a href="https://www.virustotal.com/gui/home/upload" rel="noopener noreferrer"&gt;VirusTotal&lt;/a&gt;, &lt;a href="https://phishtank.org/" rel="noopener noreferrer"&gt;PhishTank&lt;/a&gt;, &lt;a href="https://www.browserling.com/" rel="noopener noreferrer"&gt;browerling&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check for URL redirections that lead to unexpected sites&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can use URL Expander tool&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sometimes, links are hidden behind text (e.g., “Click here”). Ensure that the text link and the actual URL match.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test in a virtual Environment make sure to make snapshot of that virtual machine before testing.&lt;/p&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What if you clicked on those links and nothing much happened? How can you ensure it's not harming your device?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Disconnect your device from internet.&lt;/li&gt;
&lt;li&gt;Run Antivirus and Anti-Malware Scans.&lt;/li&gt;
&lt;li&gt;Look for unusual slowdowns, unexpected pop-ups, check task manager, sudden spike in memory.&lt;/li&gt;
&lt;li&gt;Monitor your system activity and network activity, (memory, process analysis, packet capture).&lt;/li&gt;
&lt;li&gt;See if any new program installed, control panel &amp;gt; programs or press window button and search "all apps".&lt;/li&gt;
&lt;li&gt;Use a file integrity monitoring tool to see any changes made to system’s directories or critical system files.&lt;/li&gt;
&lt;li&gt;Look for any unauthorized changes in the system registry, use tool like Autoruns.&lt;/li&gt;
&lt;li&gt;Check your browser extensions for any new or unfamiliar ones.&lt;/li&gt;
&lt;li&gt;Update your operating system, browser, and all software.&lt;/li&gt;
&lt;li&gt;Restore from Backup.&lt;/li&gt;
&lt;li&gt;changing online account passwords.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How to Investigate Email Attachments?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;First thing that you can do is to verify with the sender.&lt;/li&gt;
&lt;li&gt;Use File Extension Verification Tools ex: TrID &lt;/li&gt;
&lt;li&gt;Monitor system and network activity when analyzing &lt;/li&gt;
&lt;li&gt;Test attachment in virtual environment.&lt;/li&gt;
&lt;li&gt;Review file properties and metadata and use file analysis tool like virustotal.&lt;/li&gt;
&lt;li&gt;Scan attachment with AntiVirus.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Basic File Integrity Monitoring System</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 08 Oct 2024 03:36:24 +0000</pubDate>
      <link>https://dev.to/mihika/basic-file-integrity-monitoring-system-4j64</link>
      <guid>https://dev.to/mihika/basic-file-integrity-monitoring-system-4j64</guid>
      <description>&lt;p&gt;Git Repo : &lt;a href="https://github.com/Mihika893/File-Integrity-Monitoring" rel="noopener noreferrer"&gt;Git repo of File integrity monitoring system&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This Python-based system monitors assigned files and directories, notifying you of any changes. To run it, use: &lt;code&gt;python3 ./FIMS.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If no changes are detected, you're notified:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr29x81iliztvsmnqui8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr29x81iliztvsmnqui8.jpg" alt="File integrity checked, no changes found" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If changes occur, you decide whether they're authorized:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favopfbubpzrjcm85jzfl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favopfbubpzrjcm85jzfl.jpg" alt="changes found by file integrity monitoring system" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If authorized, the baseline (which stores details like filename, permissions, and hashes) updates accordingly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5v9ynzepk5fkbpbqga7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5v9ynzepk5fkbpbqga7.jpg" alt="FIM system notification, baseline updated " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If unauthorized, a report.txt is generated, logging the modifications for investigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlr6ri6kmm5r6e7msi3q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlr6ri6kmm5r6e7msi3q.jpg" alt="unauthorized changes found by FIM system" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this is what report.txt looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftyd6i2mm4zqtfuv59h65.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftyd6i2mm4zqtfuv59h65.jpg" alt="report.txt will record unauthorized changes" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get started, clone the repo, modify the paths in &lt;strong&gt;create_baseline.py&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwsx4s27wfqec6cz4vtc3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwsx4s27wfqec6cz4vtc3.jpg" alt="Modifying the paths in create_baseline.py accordingly" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;run it to set up a baseline for monitoring: &lt;br&gt;
&lt;code&gt;python3 ./create_baseline.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will create baseline.csv file and snapshot directory.&lt;/p&gt;

&lt;p&gt;also modify the paths in &lt;strong&gt;FIMS.py&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uydfg4qoiudoi5w20by.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uydfg4qoiudoi5w20by.jpg" alt="Modifying the paths in FIMS.py accordingly" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we mention some files to monitor in create_baseline.py separately and also mentioned a directory to monitor in FIMS.py&lt;br&gt;
all done, run the script : &lt;code&gt;python3 ./FIMS.py&lt;/code&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>fim</category>
      <category>hashing</category>
      <category>linux</category>
    </item>
    <item>
      <title>Memory Dump Analysis | Kali Linux</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 17 Sep 2024 15:51:08 +0000</pubDate>
      <link>https://dev.to/mihika/memory-dump-analysis-kali-linux-4id3</link>
      <guid>https://dev.to/mihika/memory-dump-analysis-kali-linux-4id3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Memory Dump Analysis or RAM forensics, What is it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A memory dump is a snapshot of a computer's RAM (random access memory) at a specific point in time, capturing the state of the system, including running processes, loaded drivers, open files, and other data in memory. Memory dumps are often used for debugging, forensic analysis, and diagnosing system crashes or security incidents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools used to take memory dump:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For windows:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dumpit&lt;/li&gt;
&lt;li&gt;FTK imager, It is used for drive forensics, but can also allow you to take memory dump.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For linux:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LiME( linux memory extractor)&lt;/li&gt;
&lt;li&gt;AVML&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tools will be useful in memory analysis:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Volatility&lt;/li&gt;
&lt;li&gt;MimiKatz tool &lt;/li&gt;
&lt;li&gt;Intezer Analyze&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/volatilityfoundation/volatility/wiki/Memory%20Samples" rel="noopener noreferrer"&gt;Git repo for memory dump samples&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Taking Memory dump in Kali Linux:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AVML&lt;/strong&gt; is straightforward and efficient for capturing memory in forensic investigations on Linux systems. First, open your terminal in Kali Linux and enter the command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To download avml:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; wget https://github.com/microsoft/avml/releases/latest/download/avml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After downloading, the binary file needs to be made executable. You can do this with the chmod command:&lt;br&gt;
&lt;code&gt;&amp;gt; chmod +x avml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To ensure that the file has been downloaded and is executable, you can list the file details:&lt;br&gt;
&lt;code&gt;&amp;gt; ls -lh avml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You should see the avml file with the appropriate permissions (e.g., -rwxr-xr-x).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take the Memory Dump:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; sudo ./avml /path/to/memory_dump.raw&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Replace '/path/to/memory_dump.raw' with the location where you want to save the memory dump. &lt;br&gt;
&lt;strong&gt;Verify the Memory Dump :&lt;/strong&gt; &lt;code&gt;&amp;gt; ls -lh /home/kali/memory_dump.raw&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Guide : *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Root Privileges: Memory dumping requires root access, so make sure to use sudo when running the command.&lt;br&gt;
Storage Consideration: The memory dump file size will be approximately equal to the size of your system's RAM. For example, if your system has 8GB of RAM, the dump file will likely be close to 8GB. Ensure you have enough storage space available at the target location.&lt;br&gt;
Safe Analysis Practices: Always analyze the memory dump on a different device, ideally within a sandboxed environment, to avoid contaminating the original system. Encrypt the dump file when transferring it to maintain its integrity and security.&lt;br&gt;
Familiarity with the OS: When analyzing the memory dump, having a good understanding of common processes for that specific operating system is beneficial. This knowledge helps you quickly identify any suspicious processes that might be running on the system.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Encrypt the Memory dump:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Generate a GPG Key (if you don’t have one)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; gpg --full-generate-key


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Run the command, and follow the prompts to generate your key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: To Encrypt the memory dump using GPG Passphrase:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; gpg --encrypt --recipient YourEmail@example.com /path/to/memory_dump.raw


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Enter your email ID used in GPG passphrase, and location where the memory dump is stored. This can only encrypt the files, not directories. this will create a encrypted memory dump file, you can delete the original one, if you wants to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Decrypt the Memory Dump (When Needed):&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; gpg --decrypt /path/to/memory_dump.raw.gpg &amp;gt; /path/to/decrypted_memory_dump.raw


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Replace '/path/to/memory_dump.raw.gpg' with the location where the encrypted memory dump file is. and Replace '/path/to/decrypted_memory_dump.raw' with the file where you want the output of encrypted file to be written. Enter the passphrase or private key as prompted.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Keep the passphrase or private key secure and do not share it with unauthorized users.&lt;br&gt;
Store a copy of the encrypted file in a secure location to ensure data integrity.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory Dump Analysis:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Volatility&lt;/strong&gt; is a command line tool, a popular open-source framework used for analyzing memory dumps. It also has a GUI version, Its called &lt;strong&gt;Volatility workbench&lt;/strong&gt;. The command line tool is more comprehensive, so we gonna learn that. we are using Volatility version 3 here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing Volatility:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Update the system:&lt;br&gt;
&lt;code&gt;&amp;gt; sudo apt update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install dependencies:&lt;br&gt;
&lt;code&gt;&amp;gt; sudo apt install python3 python3-pip git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Clone the Volatility 3 repository:&lt;br&gt;
&lt;code&gt;&amp;gt; git clone https://github.com/volatilityfoundation/volatility3.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the Volatility 3 directory:&lt;br&gt;
&lt;code&gt;&amp;gt; cd volatility3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install Python dependencies:&lt;br&gt;
&lt;code&gt;&amp;gt; pip3 install -r requirements.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run Volatility 3:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -h&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Volatility Tool provides different commands (or "plugins") to analyze memory dumps from various operating systems (OS). The choice of command depends on the OS of the memory dump and the specific analysis you want to perform. You can see that from the output of the last command : &lt;code&gt;&amp;gt; python3 vol.py -h&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Syntax :&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f &amp;lt;memory_dump_file&amp;gt; &amp;lt;plugin_name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Volatility Commands:
&lt;/h2&gt;

&lt;p&gt;To get the list of all processes, for that there are two commands or plugins: &lt;strong&gt;linux.pslist.PsList&lt;/strong&gt; and &lt;strong&gt;linux.psscan.PsScan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;here's the difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;linux.pslist.PsList : is faster and more accurate for identifying active, linked processes but can miss hidden or terminated processes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;linux.psscan.PsScan : is more thorough and can detect hidden or terminated processes, but it may include false positives and is slower. well, both commands can be used together to ensure comprehensive process enumeration in a memory dump.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure you are in volatility3 dir:&lt;code&gt;&amp;gt; cd /path/to/volatility3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; python3 vol.py -f /home/kalikali/memory_dump.raw linux.pslist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you're Encountering the same problem like me.. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9krv54kgvom1av23ro5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9krv54kgvom1av23ro5f.png" alt="Symbol Table Problems"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That actually due to the absence of symbol file for your Linux kernel version. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;symbol file&lt;/strong&gt; in memory forensics is like a map or guide that helps tools like Volatility understand the structure of the operating system's memory. It contains information about functions, variables, and data structures used by the operating system. When analyzing a memory dump, the symbol file helps the tool accurately interpret the raw data, making it possible to identify processes, network connections, and other key details. Without the correct symbol file, the analysis might fail or give incorrect results.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I spent a lot of the time looking for the solution, but I couldn't resolved it. well but I noticed that the windows plugins works perfectly, if you want to analyze windows memory dump. For now, In the article, we will learn how to analyze Windows memory dumps. Then, I will also cover what to do with Linux memory dumps"&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyzing Windows Memory dump:
&lt;/h2&gt;

&lt;p&gt;If you need memory dump sample, download from here: &lt;a href="https://mega.nz/file/ChoDHaja#1XvuQd49c7-7kgJvPXIEAst-NXi8L3ggwienE1uoZTk" rel="noopener noreferrer"&gt;Memory Dump Sample (Windows)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.info&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.info&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This plugin (info) extracts basic information about the Windows operating system in the memory dump, such as the version of Windows, the architecture (32-bit or 64-bit), the Service Pack version, and other OS-related details.&lt;/p&gt;

&lt;p&gt;Run the command to get the list of all processes:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.pslist&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.psscan&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Redirect the output of a plugin to a file for further analysis:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.pslist &amp;gt; processes.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;windows.pslist shows active processes in the official list, while windows.psscan is more thorough and can detect both active and hidden/terminated processes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.filescan&lt;/strong&gt;&lt;br&gt;
To get the list of all open files:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.filescan&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To get the list of files with specific extension or word in it:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.filescan | grep .kdbs&lt;/code&gt;&lt;br&gt;
It will search for files in memory dump with extension .kdbs&lt;br&gt;
A .kdbs file is a database file format associated with the KeePass password manager. It contains passwords, usernames, URLs, and other sensitive information. Users can organize this information into groups and subgroups. To access the contents of a .kdbx file, you need to provide a master password, key file, or both. This adds an extra layer of security. you can open a .kdbx file on different operating systems using compatible KeePass versions or other compatible password managers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.filescan | grep -i password&lt;/code&gt;&lt;br&gt;
search for any file-related structures in a memory dump that might contain the word "password" in their names or paths.&lt;/p&gt;

&lt;p&gt;windows.filescan plugin, scans the specified memory dump for file-related structures, helping to identify open files, file handles, or even files that might have been hidden or unlinked by malware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.dumpfiles&lt;/strong&gt;&lt;br&gt;
Extracting any file from Memory Image.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw -o /output/directory windows.dumpfiles --physaddr 0xADDRESS&lt;/code&gt;&lt;br&gt;
Replace '/output/directory' with the location where you want to save the file. And replace '0xADDRESS' with the physical memory address of the file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.malfind&lt;/strong&gt;&lt;br&gt;
To detect hidden or injected processes that could be malicious:&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.malfind&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.dlllist&lt;/strong&gt;&lt;br&gt;
lists all the Dynamic Link Libraries (DLLs) loaded into the address space of each process in the Windows memory dump.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.dlllist&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.pstree&lt;/strong&gt;&lt;br&gt;
displays the running processes in a hierarchical tree format, illustrating parent-child relationships between processes.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.pstree&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.cmdline&lt;/strong&gt;&lt;br&gt;
retrieves the command-line arguments used to start each process.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.cmdline&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.netstat&lt;/strong&gt;&lt;br&gt;
lists active network connections and listening ports found in the memory dump.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f /path/to/memory_dump.raw windows.netstat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windows.memmap&lt;/strong&gt;&lt;br&gt;
Dumps entire processes from memory. This includes everything associated with the process: executable code, loaded dynamic link libraries (DLLs), stack, heap, and other memory-mapped files.&lt;br&gt;
&lt;code&gt;&amp;gt; python3 vol.py -f "/path/to/file" -o "/path/to/dir" windows.memmap --dump --pid &amp;lt;PID&amp;gt;&lt;/code&gt;&lt;br&gt;
dumps the memory pages of a process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difference:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;windows.memmap: Dumps entire process memory, used for extracting the full memory space of running processes.&lt;/li&gt;
&lt;li&gt;windows.dumpfiles: Extracts specific files from memory (e.g., files loaded in the page cache or mapped into memory).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That were some basic commands, I have a lot more to discuss with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  I use volatility2 more often then volatility3
&lt;/h2&gt;

&lt;p&gt;I use both volatility 2 and volatility 3 and I think volatility2 is better than volatility 3, it has more plugins, and gives more organized output. &lt;br&gt;
&lt;strong&gt;Some useful commands in volatility 2:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; psscan&lt;/code&gt;&lt;br&gt;
to get the list of all processes, even hidden or terminated once.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; cmdscan&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; consoles&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; cmdline&lt;/code&gt;&lt;br&gt;
The cmdscan plugin extracts and displays command-line entries from the Windows registry, the cmdline plugin retrieves command-line arguments from running processes, and the console plugin captures and analyzes console (command prompt) history and output from memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;clipboard&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; clipboard&lt;/code&gt;&lt;br&gt;
The clipboard plugin extracts and displays the contents of the clipboard from memory, including any text or data stored there during the system's runtime. the clipboard is where copy and paste information is temporarily stored. In Windows, clipboard data is managed by the operating system and is typically stored in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;screenshot&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; screenshot -D &amp;lt;location_to save_screenshots&amp;gt;&lt;/code&gt;&lt;br&gt;
To capture all the screenshots from memory dump. look at the screenshots carefully, look which application is opened, any string shown, any hash value. if you find any string, search it in memory dump, using string command:&lt;br&gt;
&lt;code&gt;&amp;gt; strings &amp;lt;memory dump&amp;gt; | grep -i "string_or_word"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Environment variables&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; envars&lt;/code&gt;&lt;br&gt;
To view environmental variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Browser History&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; filescan | grep -i history&lt;/code&gt;&lt;br&gt;
To view browser History file. download history file using dumpfiles plugin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;filescan with specific extensions&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; filescan | grep -E "\.(rar|png|jpeg|txt)$"&lt;/code&gt;&lt;br&gt;
search files of specific extensions at onces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;hashdump&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; python2 vol.py -f /path/to/MemoryDump.raw --profile=&amp;lt;profile&amp;gt; hashdump&lt;/code&gt;&lt;br&gt;
get the NTLM hash value of all user's password&lt;/p&gt;

&lt;p&gt;Practice Labs will help you better understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources &amp;amp; Labs:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://blog.onfvp.com/post/volatility-cheatsheet/" rel="noopener noreferrer"&gt;volatility cheatsheet both vol2 &amp;amp; vol3&lt;/a&gt;&lt;br&gt;
&lt;a href="https://mega.nz/file/y6QE0C4T#tBEUMJO23mKwsorF5cOa9ix20oby7uudAX6rCA25Tdk" rel="noopener noreferrer"&gt;Linux Memory Dump Sample&lt;/a&gt;&lt;br&gt;
&lt;a href="https://mega.nz/file/ChoDHaja#1XvuQd49c7-7kgJvPXIEAst-NXi8L3ggwienE1uoZTk" rel="noopener noreferrer"&gt;Windows Memory Dump Sample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Labs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/stuxnet999/MemLabs" rel="noopener noreferrer"&gt;MemLabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blueteamlabs.online/home/challenge/memory-analysis-ransomware-7da6c9244d" rel="noopener noreferrer"&gt;Memory Analysis Ransomware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://app.letsdefend.io/challenge?search_term=memory+dump" rel="noopener noreferrer"&gt;LetsDefend Memory Dump Analysis Labs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Solutions of these labs are available online.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux Memory Dump:
&lt;/h2&gt;

&lt;p&gt;I downloaded both volatility 2 and volatility 3 on Kali linux. For analyzing Windows memory dump, it works smoothly, following a simple process. For analyzing windows memory dump, you don't need to install any symbol table( In volatility 3) or no need to create profile (In volatility 2), It already has all necessary files for windows. But for analyzing Linux memory dump, I couldn't found the solution. Looking for different memory analysis tools, shifting to different VM . It didn't work out. I was trying my last attempt to solve this problem , I was using ubuntu VM its Ubuntu 2023.10.1 and I watched a video for how to setup volatility 2, the video link: &lt;a href="https://youtu.be/Hd7qhNeVlSM?si=ix7Pwyhai8iyiHoj" rel="noopener noreferrer"&gt;Memory Forensics&lt;/a&gt;&lt;br&gt;
I followed exactly as it mentioned in the video, but when I run the command to look for imageinfo it stucks, I waited for more than 1 hour and still no response.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

determining profile based on KDBG searc......


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On the Internet, user saying that sometimes it takes time, about 30 mins to 2 hours. I'll say if you want to practice linux memory dump analysis, solve labs related to linux.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Update | Backup | Recover | Kali Linux | Simple Guide</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Sun, 01 Sep 2024 08:31:33 +0000</pubDate>
      <link>https://dev.to/mihika/update-backup-recover-kali-linux-simple-guide-565</link>
      <guid>https://dev.to/mihika/update-backup-recover-kali-linux-simple-guide-565</guid>
      <description>&lt;p&gt;Maintaining up-to-date systems alongside regular backups is crucial for ensuring both the security and recover-ability of your Kali Linux environment.&lt;br&gt;
Without wasting time, read the below article.&lt;/p&gt;
&lt;h2&gt;
  
  
  To update the Linux OS:
&lt;/h2&gt;

&lt;p&gt;open the terminal, and type the below commands one by one.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; sudo apt update&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; sudo apt upgrade&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; sudo apt autoremove&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; cat /etc/os-release&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update           #update the package list
sudo apt upgrade          #update the packages to the latest version
sudo apt full-upgrade     #complete system update
sudo apt autoremove       #clean up unnecessary packages 
cat /etc/os-release       #check version of OS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  To update the Browser:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; sudo apt update&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt; sudo apt upgrade firefex-esr&lt;/code&gt;&lt;br&gt;
verify the update : Open firefox &amp;gt; help &amp;gt; about firefox &amp;gt; check version&lt;/p&gt;



&lt;p&gt;In IT, a backup refers to storing a copy of valuable assets—such as your critical data and system configurations—in a secure location. This allows you to restore the original data or system if they become corrupted, damaged, or otherwise inaccessible. Recovery is the process of retrieving data from a backup after such an event.&lt;/p&gt;

&lt;p&gt;If files are accidentally deleted and no backup is available, the process of attempting to recover the lost data is known as data recovery. This involves using specialized software or services to recover deleted files from storage media like hard drives, SSDs, USB drives, or memory cards. When files are deleted, the data isn’t immediately erased; instead, the space it occupied is marked as available for new data. Data recovery tools can sometimes retrieve these files before they are overwritten, although success is not guaranteed, and the chances decrease as new data is written to the storage medium.&lt;/p&gt;

&lt;p&gt;Understanding and implementing backup and recovery processes is fundamental for anyone working in IT.&lt;/p&gt;
&lt;h2&gt;
  
  
  Types of Backup:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Full Backup :&lt;/strong&gt; A comprehensive backup that includes your entire system, all important data, production data, databases, and everything else. It creates a complete snapshot of your system at a specific point in time.&lt;br&gt;
&lt;strong&gt;2. Incremental Backup :&lt;/strong&gt; This type of backup only saves the data that has changed since the last backup, whether it was a full backup or another incremental backup. It’s faster and requires less storage space.&lt;br&gt;
&lt;strong&gt;3. Differential Backup :&lt;/strong&gt; A backup that saves all the changes made since the last full backup. Each differential backup grows in size over time as it accumulates all changes since the last full backup, making recovery faster than with incremental backups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary :&lt;/strong&gt;Full = you back up all your data.&lt;br&gt;
Incremental = Only new changes since the last backup.&lt;br&gt;
Differential = All changes since the last full backup.&lt;/p&gt;
&lt;h2&gt;
  
  
  Backup Tools in Kali Linux:
&lt;/h2&gt;

&lt;p&gt;command-line tools like &lt;strong&gt;rsync&lt;/strong&gt;, &lt;strong&gt;tar&lt;/strong&gt;, and &lt;strong&gt;dd&lt;/strong&gt;.&lt;br&gt;
Third-party tools like &lt;strong&gt;Deja Dup&lt;/strong&gt;, &lt;strong&gt;Timeshift&lt;/strong&gt;, and &lt;strong&gt;Clonezilla&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating a Backup Plan:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Deciding what to back up (critical files, entire system, configurations).&lt;/li&gt;
&lt;li&gt;Choosing the right backup schedule and frequency.&lt;/li&gt;
&lt;li&gt;Where to store backups (local, external, cloud).&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step-by-Step Backup Process:
&lt;/h2&gt;

&lt;p&gt;You take Backup of your complete Filesystem and all data and keep it at safe place like external drive. when your system infected when a malware or got corrupted somehow, disconnect yourself from internet, use antivirus software to scan and remove the malware, reset your system and restore the Backup. &lt;/p&gt;

&lt;p&gt;Before taking backup, Run the below command in terminal to estimate the size of your backup by checking the disk usage of the directories. And excluding the directories that need not to be back up.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; sudo du -shc / --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/run --exclude=/tmp --exclude=/mnt --exclude=/media --exclude=/lost+found

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 1 : Using rsync for complete backup of the Filesystem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rsync&lt;/strong&gt; is the most simplest and efficient way to take backup.&lt;br&gt;
following the command to take backup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; sudo apt-get install rsync
&amp;gt; sudo rsync -aAXv / /path/to/backup/folder --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command is to install the rsync tool and second command to take backup. Write the commands as mentioned, replace '/path/to/backup/folder' with the actual location where you want to save the backup.&lt;br&gt;
Here’s a breakdown of the options:&lt;br&gt;
-a: Archive mode; preserves permissions, timestamps, and symbolic links.&lt;br&gt;
-A: Preserves ACLs (Access Control Lists).&lt;br&gt;
-X: Preserves extended attributes.&lt;br&gt;
-v: Verbose; shows progress.&lt;br&gt;
--exclude=: Uses a file to specify which files and directories to exclude.&lt;br&gt;
Verify the Backup: After the rsync command completes, check the backup directory to ensure all files have been copied correctly. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 : Using tar for compressing and archiving.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Follow the below command to compress the backup folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; tar -czvf backup_folder.tar.gz -C /path/to/backup backup_folder

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace '/path/to/backup backup_folder' with the path where you stored the backup. Example, If the location of backup is '/home/user1/backup_folder'. then the command will be like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; tar -czvf backup_folder.tar.gz -C /home/user1 backup_folder&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here's what each option does:&lt;br&gt;
-c: Creates a new archive.&lt;br&gt;
-z: Compresses the archive with gzip.&lt;br&gt;
-v: Shows the progress in the terminal.&lt;br&gt;
-f: Specifies the filename of the archive.&lt;br&gt;
-C /home/user1: Changes to the directory where backup_folder is located before creating the archive.&lt;/p&gt;

&lt;p&gt;This will create a compressed backup_folder.tar.gz in your /home/user1 directory. Store the backup in an external drive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now, how to restore that backup:&lt;/strong&gt;&lt;br&gt;
If the Backup is in the external drive, connect the drive to your system or if it is somewhere in cloud storage platform, download it and run this command.&lt;br&gt;
&lt;code&gt;&amp;gt; sudo rsync -aAXv /path/to/backup/folder/ /&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Replace '/path/to/backup/folder/' with the location where the backup is located.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;How to use rsync for backing up a folder:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To take backup of Important data:&lt;br&gt;
&lt;code&gt;&amp;gt; sudo rsync -aAXv /home/ /path/to/backup/location/home_backup/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, I am Taking backup of complete /home directory. Replace '/path/to/backup/location/home_backup/' with the location where you want to store it for now. After that store it in external drive or use any cloud storage platform.&lt;/p&gt;

&lt;p&gt;To Retore the folder, in case it got deleted or something happened use the below command:&lt;br&gt;
&lt;code&gt;&amp;gt; sudo rsync -aAXv /path/to/backup/location/home_backup/ /home/&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Automating Backups:
&lt;/h2&gt;

&lt;p&gt;To schedule backups using rsync, you can use cron to automate the process. Open the terminal, follow the command:&lt;/p&gt;

&lt;p&gt;Open the Crontab Editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;crontab -e
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a Cron Job: Add a line to schedule your backup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 2 * * * /usr/bin/rsync -aAXv / /path/to/external/drive --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line will run a backup every day at 2 AM.&lt;br&gt;
To Exit the crontab editor:&lt;br&gt;
Save: Press Ctrl + O (write out).&lt;br&gt;
Confirm: Press Enter to confirm the filename.&lt;br&gt;
Quit: Press Ctrl + X to exit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;0 2 * * *: Schedule to run at 2:00 AM every day.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/usr/bin/rsync: Path to the rsync command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;-aAXv: Options to preserve file attributes, permissions, and show progress.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/: Source directory (root filesystem).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/path/to/external/drive: Destination for the backup, path where you want the backup to be stored.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;--exclude={...}: Exclude directories that don’t need to be backed up.&lt;br&gt;
&lt;strong&gt;Save and Exit:&lt;/strong&gt; Save the crontab file and exit the editor. The cron job will now automatically run according to the schedule.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Keep this chart for setting time and date, according to you:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------+-------+-------+-------+-------+
| Min   | Hour  | Day   | Month | Week  |
+-------+-------+-------+-------+-------+
| 0-59  | 0-23  | 1-31  | 1-12  | 0-7   |
+-------+-------+-------+-------+-------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In above cron job 0 2 * * * means no minutes are set, hour is 2 which is in AM , * (asterisk) mean every time, so every day, every month, and every week.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>backup</category>
      <category>update</category>
      <category>rsync</category>
    </item>
    <item>
      <title>HANCITOR - TRAFFIC ANALYSIS - SOL-LIGHTNET</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Thu, 13 Jun 2024 16:37:18 +0000</pubDate>
      <link>https://dev.to/mihika/hancitor-traffic-analysis-sol-lightnet-1m7n</link>
      <guid>https://dev.to/mihika/hancitor-traffic-analysis-sol-lightnet-1m7n</guid>
      <description>&lt;h2&gt;
  
  
  let's start:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Downloading the Capture File and Understanding the Assignment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download the .pcap file from &lt;a href="https://www.malware-traffic-analysis.net/2020/01/30/index.html"&gt;PCAP&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Familiarize yourself with the assignment instructions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  LAN segment data:
&lt;/h2&gt;

&lt;p&gt;LAN segment range:  10.20.30[.]0/24 (10.20.30[.]0 through 10.20.30[.]255)&lt;br&gt;
Domain:  sol-lightnet[.]com&lt;br&gt;
Domain controller:  10.20.30[.]2 - Sol-Lightnet-DC&lt;br&gt;
LAN segment gateway:  10.20.30[.]1&lt;br&gt;
LAN segment broadcast address:  10.20.30[.]255&lt;/p&gt;

&lt;h2&gt;
  
  
  OUR TASK:
&lt;/h2&gt;

&lt;p&gt;Write an incident report based on the pcap and the alerts.&lt;br&gt;
The incident report should contain the following:&lt;br&gt;
Executive Summary&lt;br&gt;
Details (of the infected Windows host)&lt;br&gt;
Indicators of Compromise (IOCs).&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyzing Network Traffic with Basic Filters:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filter: `(http.request || tls.handshake.type eq 1) &amp;amp;&amp;amp; !(ssdp)`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;49.51.133.162 port 80 - gengrasjeepram.com - GET /sv.exe&lt;br&gt;
This appears to be a request to download an executable file (sv.exe) from the domain gengrasjeepram.com. Analysing packet content, it's an executable file and the context, it's potentially malicious. Upon Research, associated to Hancitor Malware.&lt;/p&gt;

&lt;p&gt;port 80 - api.ipify.org - GET /&lt;br&gt;
This seems to be a request to api.ipify.org, which is a legitimate service to check the public IP address of a device. exposing the the public IP address of the compromised host.&lt;/p&gt;

&lt;p&gt;81.177.6.156 port 80 - twereptale.com - POST /4/forum.php&lt;br&gt;
81.177.6.156 port 80 - twereptale.com - POST /mlu/forum.php&lt;br&gt;
81.177.6.156 port 80 - twereptale.com - POST /d2/about.php&lt;br&gt;
These are POST requests to various endpoints on the domain twereptale.com. The repetitive nature suggests potential malicious activity, possibly sending system information or other data to the server.&lt;/p&gt;

&lt;p&gt;148.66.137.40 port 80 - xolightfinance.com - GET /bhola/images/1&lt;br&gt;
148.66.137.40 port 80 - xolightfinance.com - GET /bhola/images/2&lt;br&gt;
These are requests to retrieve image files from the domain xolightfinance.com. While the files themselves may not be malicious, the fact that they are requested from a potentially malicious domain raises suspicion.&lt;/p&gt;

&lt;p&gt;No other indicators of malicious activity were found.&lt;/p&gt;

&lt;p&gt;For a deeper understanding of Hancitor malware and its infection traffic, consider reading Brad Duncan's insightful article on Unit 42:  &lt;a href="https://unit42.paloaltonetworks.com/wireshark-tutorial-hancitor-followup-malware/"&gt;Examining Traffic from Hancitor Infections&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final report:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Executive Summary&lt;/strong&gt;&lt;br&gt;
On Thursday 2020-01-30 at 00:55 UTC, a Windows 10 client used by Alejandrina Hogue was infected with Hancitor malware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;br&gt;
Host name: DESKTOP-4C02EMG&lt;br&gt;
Host MAC address: 58:94:6b:77:9b:3c (IntelCor_77:9b:3c)&lt;br&gt;
Host IP address: 10.20.30.227&lt;br&gt;
User account name: alejandrina.hogue&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indicators of Compromise (IOCs)&lt;/strong&gt;&lt;br&gt;
49.51.133.162 port 80 - gengrasjeepram.com - GET /sv.exe&lt;br&gt;
SHA256 hash: 995cbbb422634d497d65e12454cd5832cf1b4422189d9ec06efa88ed56891cda&lt;/p&gt;

&lt;p&gt;port 80 - api.ipify.org - GET /&lt;br&gt;
81.177.6.156 port 80 - twereptale.com - POST /4/forum.php&lt;br&gt;
81.177.6.156 port 80 - twereptale.com - POST /mlu/forum.php &lt;br&gt;
81.177.6.156 port 80 - twereptale.com - POST /d2/about.php&lt;br&gt;
148.66.137.40 port 80 - xolightfinance.com - GET /bhola/images/1&lt;br&gt;
148.66.137.40 port 80 - xolightfinance.com - GET /bhola/images/2&lt;/p&gt;

</description>
      <category>hancitor</category>
      <category>wireshark</category>
      <category>pcap</category>
      <category>paloaltonetworks</category>
    </item>
    <item>
      <title>DRIDEX - Traffic Analysis - DUALRUNNING</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Tue, 11 Jun 2024 12:48:36 +0000</pubDate>
      <link>https://dev.to/mihika/dridex-traffic-analysis-dualrunning-4gmd</link>
      <guid>https://dev.to/mihika/dridex-traffic-analysis-dualrunning-4gmd</guid>
      <description>&lt;h2&gt;
  
  
  let's start:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Downloading the Capture File and Understanding the Assignment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download the .pcap file from &lt;a href="https://www.malware-traffic-analysis.net/2021/07/14/index.html"&gt;PCAP&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Familiarize yourself with the assignment instructions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  LAN segment data:
&lt;/h2&gt;

&lt;p&gt;LAN segment range:  172.16.1[.]0/24 (172.16.1[.]0 through 172.16.1[.]255)&lt;br&gt;
Domain:  dualrunning[.]net&lt;br&gt;
Domain controller:  172.16.1[.]2 - Dualrunning-DC&lt;br&gt;
LAN segment gateway:  172.16.1[.]1&lt;br&gt;
LAN segment broadcast address:  172.16.1[.]255&lt;/p&gt;
&lt;h2&gt;
  
  
  OUR TASK:
&lt;/h2&gt;

&lt;p&gt;Write an incident report based on the pcap and the alerts.&lt;br&gt;
The incident report should contain the following:&lt;br&gt;
Executive Summary&lt;br&gt;
Details (of the infected Windows host)&lt;br&gt;
Indicators of Compromise (IOCs).&lt;/p&gt;
&lt;h2&gt;
  
  
  Analyzing Network Traffic with Basic Filters:
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Basic Filter: (http.request || tls.handshake.type eq 1) &amp;amp;&amp;amp; !(ssdp)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Upon inspection, a GET request to 185.21.216.153 on port 8088  was detected, It's an Excel file, and the URL from which this file was requested is linked to the Dridex malware.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;185.21.216.153 port 8088 - insiderushings.com:8088 - GET /wp-content/Receipt 9650354.xls?evagk=2MyeEdhGPszYX
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and just below we can see URL for initial Dridex DLL&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;185.21.216.153 port 8088 - buyer-remindment.com:8088 - GET/templates/file6.bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dridex infection traffic consists of two parts:&lt;br&gt;
Initial infection activity.&lt;br&gt;
Post-infection C2 traffic.&lt;/p&gt;

&lt;p&gt;You can Identify the C2 traffic, by identifying this pattern. This C2 traffic communicates directly with an IP address, so there are no server name or host name associated with it. It also has unusual certificate issuer data. &lt;/p&gt;

&lt;p&gt;And we Found the following traffic directly to IP addresses instead of domain names. This is most likely Dridex HTTPS C2 traffic::&lt;br&gt;
• 202.29.60.34 port 443 - HTTPS traffic&lt;br&gt;
• 72.11.131.199 port 443 - HTTPS traffic&lt;br&gt;
• 207.244.250.103 port 443 - HTTPS traffic&lt;br&gt;
• 45.145.55.170 port 453 - HTTPS traffic&lt;br&gt;
• 84.232.252.62 port 443 - HTTPS traffic&lt;/p&gt;

&lt;p&gt;Apply this Filter to review certificate issuer for those suspected IP addresses.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filter: tls.handshake.type eq 11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the packet and go to the frame details section and expand the information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TLS &amp;gt; TLSv1: Certificate &amp;gt; handshake protocol:certificate &amp;gt; certificates(__ bytes) &amp;gt; Certificates[truncated] &amp;gt; SignedCertificate &amp;gt; Issuer &amp;gt; rdnSequence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also detected suspicious activity from the malicious source IP 81.17.23.125 to our compromised host 172.16.1.239. Despite the Host line in the HTTP request headers indicating 81.17.23.125:2318, there was no corresponding traffic over TCP port 2318 in the pcap.&lt;/p&gt;

&lt;p&gt;To investigate further, use the Wireshark filter ip.addr eq 81.17.23.125 &amp;amp;&amp;amp; tcp.flags eq 0x0002 to find TCP SYN segments for the start of all TCP streams to 81.17.23.125. Follow TCP streams from each TCP SYN segment to analyze the directory listing for the infected user's Documents directory.&lt;/p&gt;

&lt;p&gt;For a deeper understanding of Dridex malware and its infection traffic, consider reading Brad Duncan's insightful article on Unit 42:  &lt;a href="https://unit42.paloaltonetworks.com/wireshark-tutorial-dridex-infection-traffic/"&gt;Wireshark Tutorial: Dridex Infection Traffic.&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final report:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Executive Summary&lt;/strong&gt;&lt;br&gt;
On 2021-07-14 at approximately 20:31 UTC, a Windows host used by Samantha Reed was infected with Dridex malware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;br&gt;
MAC address: 00:13:d4:10:05:25&lt;br&gt;
IP address: 172.16.1.239&lt;br&gt;
Host name: DEKSTOP-F3P7XLU&lt;br&gt;
Windows user account: samantha.reed&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indicators of Compromise (IOCs)&lt;/strong&gt;&lt;br&gt;
Dridex C2 traffic:&lt;/p&gt;

&lt;p&gt;202.29.60.34 port 443 - HTTPS traffic&lt;br&gt;
72.11.131.199 port 443 - HTTPS traffic&lt;br&gt;
207.244.250.103 port 443 - HTTPS traffic&lt;br&gt;
45.145.55.170 port 453 - HTTPS traffic&lt;br&gt;
84.232.252.62 port 443 - HTTPS traffic&lt;br&gt;
81.17.23.125 port 443 - HTTPS traffic&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TRICKBOT - Traffic Analysis - FUNKYLIZARDS</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Mon, 10 Jun 2024 12:15:20 +0000</pubDate>
      <link>https://dev.to/mihika/trickbot-traffic-analysis-funkylizards-fb</link>
      <guid>https://dev.to/mihika/trickbot-traffic-analysis-funkylizards-fb</guid>
      <description>&lt;h2&gt;
  
  
  let's start:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Downloading the Capture File and Understanding the Assignment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download the .pcap file from &lt;a href="https://www.malware-traffic-analysis.net/2021/08/19/index.html" rel="noopener noreferrer"&gt;pcap&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Familiarize yourself with the assignment instructions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  LAN segment data:
&lt;/h2&gt;

&lt;p&gt;LAN segment range: 10.8.19.0/24 (10.8.19.0 through 10.8.19.255)&lt;br&gt;
Domain: funkylizards.com&lt;br&gt;
Domain Controller: 10.8.19.8 Funkylizard-DC&lt;br&gt;
LAN segment gateway: 10.8.19.1&lt;br&gt;
LAN segment broadcast address: 10.8.19.255&lt;/p&gt;
&lt;h2&gt;
  
  
  OUR TASK:
&lt;/h2&gt;

&lt;p&gt;Write an incident report based on the pcap and the alerts.&lt;br&gt;
The incident report should contain the following:&lt;br&gt;
Executive Summary&lt;br&gt;
Details (of the infected Windows host)&lt;br&gt;
Indicators of Compromise (IOCs).&lt;/p&gt;
&lt;h2&gt;
  
  
  Investigating the PCAP
&lt;/h2&gt;

&lt;p&gt;Analyzing Network Traffic with Basic Filters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(http.request || tls.handshake.type eq 1) &amp;amp;&amp;amp; !(ssdp)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Upon inspection, a GET request to 185.244.41.29 on port 80 was detected, fetching a malicious Dynamic Link Library (DLL) file associated with Trickbot malware.&lt;/p&gt;

&lt;p&gt;85.244.41.29 port 80 - 185.244.41.29 - GET /ooiwy.pdf&lt;/p&gt;

&lt;p&gt;Post infection traffic initially consists of HTTPS/SSL/TLS traffic over TCP port 443, 447, or 449 and an IP address check by the infected Windows host. After infection, the compromised Windows host performs an IP address check. which we can see in this pcap: &lt;code&gt;port 443 - api.ipify.org - GET /&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(http.request || tls.handshake.type eq 1 || tcp.flags eq 1) &amp;amp;&amp;amp; !ssdp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shortly after the HTTP request for the Trickbot executable, several attempted TCP connections over port 443 to different IP addresses are observed, before a successful TCP connection to 46.99.175.149 and 182.253.210.130.&lt;/p&gt;

&lt;p&gt;The HTTPS/SSL/TLS traffic to various IP addresses over TCP ports 447 and 449 has unusual certificate data. We can review the certificate issuer associated with these two hosts by filtering on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tls.handshake.type == 11 &amp;amp;&amp;amp; ip.addr==46.99.175.149 &amp;amp;&amp;amp; ip.addr==182.253.210.130
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the packet and go to the frame details section and expand the information.&lt;br&gt;
TLS &amp;gt; TLSv1: Certificate &amp;gt; handshake protocol:certificate &amp;gt; certificates(__ bytes) &amp;gt; Certificates[truncated] &amp;gt; SignedCertificate &amp;gt; Issuer &amp;gt; rdnSequence&lt;/p&gt;

&lt;p&gt;The state or province name (Some-State) and the organization name (Internet Widgits Pty Ltd) are not used for legitimate HTTPS/SSL/TLS traffic. This is an indicator of malicious traffic, and its not limited to Trickbot.&lt;/p&gt;

&lt;p&gt;The Trickbot-infected Windows host will check its IP address using a number of different IP address checking sites. it needs to ascertain its geographical location or to determine if it's running in a virtual environment or a sandbox. This tactic allows the malware to blend in with normal network traffic, making it harder to detect and mitigate its activities. Various legitimate IP address checking services used by Trickbot include:&lt;/p&gt;

&lt;p&gt;api.ip[.]sb&lt;br&gt;
checkip.amazonaws[.]com&lt;br&gt;
icanhazip[.]com&lt;br&gt;
ident[.]me&lt;br&gt;
ip.anysrc[.]net&lt;br&gt;
ipecho[.]net&lt;br&gt;
ipinfo[.]io&lt;br&gt;
myexternalip[.]com&lt;br&gt;
wtfismyip[.]com&lt;/p&gt;

&lt;p&gt;Again, an IP address check by itself is not malicious. However, this type of activity combined with other network traffic can provide indicators of an infection. you may see above host in the packet.&lt;/p&gt;

&lt;p&gt;A Trickbot infection can generates HTTP traffic. this traffic sends information from the infected host like system information and passwords from the browser cache and email clients. This information is sent from the infected host to C2 server used by Trickbot. apply the basic filter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(http.request || tls.handshake.type eq 1) &amp;amp;&amp;amp; !(ssdp)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you see a post request to host 103.148.41.195. view packet content and you see infomation like processes running on the infected host system, system information.&lt;/p&gt;

&lt;p&gt;For a comprehensive understanding of Trickbot Malware, I recommend reading Brad Duncan's article on it: &lt;a href="https://unit42.paloaltonetworks.com/wireshark-tutorial-examining-trickbot-infections/" rel="noopener noreferrer"&gt;Trickbot Malware&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final report:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Executive Summary&lt;/strong&gt;&lt;br&gt;
On 2021-08-19 at approximately 19:40 UTC, a Windows host used by Monica Steele was infected with Trickbot malware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;br&gt;
MAC address: 00:08:02:1c:47:ae&lt;br&gt;
IP address: 10.8.19.101&lt;br&gt;
Host name: DEKSTOP-M1TFHB6&lt;br&gt;
Windows user account: monica.steele&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indicators of Compromise (IOCs)&lt;/strong&gt;&lt;br&gt;
Trickbot DLL:&lt;br&gt;
185.244.41.29 port 80 - 185.244.41.29 - GET /ooiwy.pdf&lt;/p&gt;

&lt;p&gt;SHA256 hash: f25a780095730701efac67e9d5b84bc289afea56d96d8aff8a44af69ae606404&lt;br&gt;
File size: 323,584 bytes&lt;br&gt;
File description: Trickbot DLL&lt;br&gt;
File name: ooiwy.pdf&lt;/p&gt;

&lt;p&gt;Trickbot C2 traffic:&lt;/p&gt;

&lt;p&gt;port 443 - api.ipify.org - GET / [IP address check by infected host]&lt;br&gt;
46.99.175.149 on port 443 - HTTPS traffic&lt;br&gt;
182.253.210.130 on port 443 - HTTPS traffic&lt;br&gt;
103.148.41.195 port 443 - POST /rob124/DESKTOP-M1TFHB6_W10019043.0CB9C3AE3FA9B1267DFC20141CDE9D8 4/90/&lt;/p&gt;

</description>
    </item>
    <item>
      <title>BazarLoader - Traffic Analysis - ANGRYPOUTINE</title>
      <dc:creator>Mihika</dc:creator>
      <pubDate>Mon, 10 Jun 2024 10:52:58 +0000</pubDate>
      <link>https://dev.to/mihika/bazarloader-traffic-analysis-angrypoutine-1b10</link>
      <guid>https://dev.to/mihika/bazarloader-traffic-analysis-angrypoutine-1b10</guid>
      <description>&lt;h2&gt;
  
  
  let's start:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Downloading the Capture File and Understanding the Assignment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download the .pcap file from &lt;a href="https://www.malware-traffic-analysis.net/2021/09/10/index.html"&gt;pcap.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Familiarize yourself with the assignment instructions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  LAN segment data:
&lt;/h2&gt;

&lt;p&gt;LAN segment range:  10.9.10[.]0/24 (10.9.10[.]0 through 10.9.10[.]255)&lt;br&gt;
Domain:  angrypoutine[.]com&lt;br&gt;
Domain controller:  10.9.10[.]9 - ANGRYPOUTINE-DC&lt;br&gt;
LAN segment gateway:  10.9.10[.]1&lt;br&gt;
LAN segment broadcast address:  10.9.10[.]255&lt;/p&gt;

&lt;h2&gt;
  
  
  OUR TASK:
&lt;/h2&gt;

&lt;p&gt;Write an incident report based on the pcap and the alerts.&lt;br&gt;
The incident report should contain the following:&lt;br&gt;
Executive Summary&lt;br&gt;
Details (of the infected Windows host)&lt;br&gt;
Indicators of Compromise (IOCs).&lt;/p&gt;

&lt;h2&gt;
  
  
  Identifying the Infected Host
&lt;/h2&gt;

&lt;p&gt;This is my method for finding the infected host in a PCAP file, though it may not always guarantee accurate results.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In Wireshark, go to Statistics &amp;gt; Endpoint &amp;gt; IPv4.&lt;/li&gt;
&lt;li&gt;Identify the IP associated with the most transferred packets within your LAN. This is likely the compromised host.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Investigating the PCAP
&lt;/h2&gt;

&lt;p&gt;Analyzing Network Traffic with Basic Filters:&lt;/p&gt;

&lt;p&gt;(http.request || tls.handshake.type eq 1) &amp;amp;&amp;amp; !(ssdp)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0msms2eb099qcftjzb7h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0msms2eb099qcftjzb7h.png" alt="Applying the Basic filter for analysising network traffic" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon inspection, a GET request to 194.62.42.206 port 80 was detected, fetching a malicious Dynamic Link Library (DLL) file for BazarLoader from the following URL:&lt;br&gt;
/bmdff/BhoHsCtZ/MLdmpfjaX/5uFG3Dz7yt/date1?BNLv65=pAAS&lt;/p&gt;

&lt;p&gt;This URL, containing '/bmdff/', consistently yields a 64-bit DLL for BazarLoader. Notably, this pattern has persisted over the past several weeks, indicating association with the TA551 (Shathak) campaign.&lt;br&gt;
Further analysis reveals BazarLoader's command and control (C2) activity. Initially, BazarLoader retrieves BazarBackdoor via HTTPS traffic from 167.172.37.9 over TCP port 443. Subsequently, BazarBackdoor itself generates C2 activity, utilizing HTTPS traffic to communicate with 94.158.245.52 over TCP port 443.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnaol0ujiwl2l7ktogn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnaol0ujiwl2l7ktogn5.png" alt="Identifying BazarLoader C2 traffic" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's important to note that Bazar C2 activity often directs traffic to legitimate domains. While this behavior isn't inherently malicious, it's reminiscent of various malware families conducting connectivity checks or ensuring uninterrupted internet access on infected Windows hosts.&lt;/p&gt;

&lt;p&gt;For a comprehensive understanding of BazarLoader's network reconnaissance tactics, I recommend reading Brad Duncan's article on the case study:&lt;br&gt;
&lt;a href="https://unit42.paloaltonetworks.com/bazarloader-network-reconnaissance/"&gt;Case Study: From BazarLoader to Network Reconnaissance&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final report:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Executive Summary&lt;/strong&gt;&lt;br&gt;
On 2021-09-10 at approximately 23:17 UTC, a Windows host used by Hobart Gunnarsson was infected with BazarLoader through the TA551 (Shathak) campaign.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Details&lt;/strong&gt;&lt;br&gt;
MAC address: 00:4f:49:b1:e8:c3&lt;br&gt;
IP address: 10.9.10.102&lt;br&gt;
Host name: DESKTOP-KKITB6Q&lt;br&gt;
Windows user account: hobart.gunnarsson&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indicators of Compromise (IOCs)&lt;/strong&gt;&lt;br&gt;
BazarLoader DLL:&lt;br&gt;
194.62.42.206 port 80 - simpsonsavingss.com - GET /bmdff/BhoHsCtZ/MLdmpfjaX/5uFG3Dz7y /date1?BNLv65=pAAS&lt;/p&gt;

&lt;p&gt;SHA256 hash: eed363fc4af7a9070d69340592dcab7c78db4f90710357de29e3b624aa957cf8&lt;br&gt;
File size: 284,816 bytes&lt;br&gt;
File description: BazarLoader DLL&lt;br&gt;
File name: date6.dll&lt;/p&gt;

&lt;p&gt;BazarLoader C2 traffic:&lt;/p&gt;

&lt;p&gt;167.172.37.9 port 443 - HTTPS traffic&lt;br&gt;
94.158.245.52 port 443 - HTTPS traffic&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
