{"id":1154,"date":"2025-11-26T02:03:08","date_gmt":"2025-11-26T02:03:08","guid":{"rendered":"https:\/\/epbrtcybersecurityportfolio.xyz\/?p=1154"},"modified":"2025-11-26T02:03:08","modified_gmt":"2025-11-26T02:03:08","slug":"detecting-modern-attack-techniques","status":"publish","type":"post","link":"https:\/\/epbrtcybersecurityportfolio.xyz\/?p=1154","title":{"rendered":"Detecting Modern Attack Techniques"},"content":{"rendered":"\n<p>This is lab 1.2 for the SEC511 class.<\/p>\n\n\n\n<p>In this lab, I am looking at a client exploitation. A user has reported to the help desk that his PC started acting funny. This was after he clicked on a suspicious link. This was then escalated to the security team. The help desk mentioned that the PC IP address is 10.5.11.57. This happened on July 6th, 2025.<\/p>\n\n\n\n<p>First, I am tasked with identifying the name of the malware that was downloaded and executed, the site name and IP address that hosted the executable and the software\/protocol used for C2.<\/p>\n\n\n\n<p>I am going to use the time stamp provided in the Alert menu of Security Onion. We have total of 13 alerts that were generated on this date:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-62-1024x471.png\" alt=\"\" class=\"wp-image-1159\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-62-1024x471.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-62-300x138.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-62-768x353.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-62.png 1175w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I first group these alerts by source IP address. One line that attracts my interest right away is the ET DNS query made from the PC that was described as acting weird:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"499\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-63.png\" alt=\"\" class=\"wp-image-1162\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-63.png 984w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-63-300x152.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-63-768x389.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/figure>\n\n\n\n<p>It sent a DNS query to a .pw domain that is classified as likely hostile. Looking at the rule in detail:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"84\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-65.png\" alt=\"\" class=\"wp-image-1167\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-65.png 778w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-65-300x32.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-65-768x83.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n\n\n<p>The rule is looking for dns queries to top level domain &#8216;.pw&#8217; but not &#8216;.u.pw&#8217;. This is a pretty weak match as this TLD is not always necessarily evil. The actual DNS query made is:  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"85\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-66.png\" alt=\"\" class=\"wp-image-1172\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-66.png 546w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-66-300x47.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/figure>\n\n\n\n<p>Another alert of interest is: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"47\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-67.png\" alt=\"\" class=\"wp-image-1174\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-67.png 936w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-67-300x15.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-67-768x39.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/figure>\n\n\n\n<p>HTA is an HTML application. Historically, these were primarily associated with the Internet Explorer. Even though Internet Explorer is not around anymore, HTA files still matter as Windows still includes MSHTA which renders HTAs. HTA apps are typically used for executing scripts (it often used at the beginning of a chain that will lead to the use of Powershell). Let&#8217;s look at the HTA details:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"176\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-68.png\" alt=\"\" class=\"wp-image-1179\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-68.png 817w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-68-300x65.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-68-768x165.png 768w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/figure>\n\n\n\n<p>We see that the endpoint sent an HTTP request for video.hta to a host that is the domain that was flagged in the DNS alert. Looking at this alert, I don&#8217;t know if anything was received after this HTTP request was sent but we assume that the name of the malware downloaded is this video.hta file and the site that hosted it is www.plugh.pw. This IP address for this site is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"82\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-69.png\" alt=\"\" class=\"wp-image-1187\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-69.png 460w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-69-300x53.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/figure>\n\n\n\n<p>To get more details about this IP address, I can left click on it and select Actions\/Hunt. There are 19 events associated with this IP address: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"435\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-70-1024x435.png\" alt=\"\" class=\"wp-image-1191\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-70-1024x435.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-70-300x127.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-70-768x326.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-70.png 1137w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>First, we see the DNS request from 10.5.11.57. Then we see the reach out to the IP address that I am interested in. Looking at the socket pairs, I see 3 subsequent sessions. The client has interacted multiple times in a row with the same system. Let&#8217;s look at the packet for the first session corresponding to the socket pairs (52051-80). This is just a handshake (Syn, Syn\/Ack, Ack) with nothing else going on after that:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"293\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-71-1024x293.png\" alt=\"\" class=\"wp-image-1194\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-71-1024x293.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-71-300x86.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-71-768x220.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-71.png 1391w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s look at the packets for the second session:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"347\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-72-1024x347.png\" alt=\"\" class=\"wp-image-1197\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-72-1024x347.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-72-300x102.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-72-768x260.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-72.png 1386w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is a lot more interesting than the first session and deserves to be explored in Wireshark:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"157\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-73-1024x157.png\" alt=\"\" class=\"wp-image-1200\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-73-1024x157.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-73-300x46.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-73-768x118.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-73.png 1529w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s look at the TCP stream:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"320\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74-1024x320.png\" alt=\"\" class=\"wp-image-1203\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74-1024x320.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74-300x94.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74-768x240.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74-1536x480.png 1536w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-74.png 1579w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Looking at the HTTP response, the script language is VB script. I also see signs of obfuscation when setting the variables&#8217; names. Finally, I see powershell.exe:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"102\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-75.png\" alt=\"\" class=\"wp-image-1205\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-75.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-75-300x40.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>It looks like the attacker is using VB script to then call Wscript to instantiate Powershell. I then see a bunch of what looks like Base-64 encoded data. I am going to copy it and try to decode it in Cyberchef:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-76-1024x462.png\" alt=\"\" class=\"wp-image-1209\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-76-1024x462.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-76-300x135.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-76-768x347.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-76.png 1282w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It spits out an output that is ASCII characters mixed with non-printable characters that are null bytes. We can remove these in Cyberchef:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"410\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-77-1024x410.png\" alt=\"\" class=\"wp-image-1214\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-77-1024x410.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-77-300x120.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-77-768x308.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-77.png 1278w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"195\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-78.png\" alt=\"\" class=\"wp-image-1216\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-78.png 793w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-78-300x74.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-78-768x189.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure>\n\n\n\n<p>This is PowerShell code with some more Base-64 encoded data in it.<\/p>\n\n\n\n<p>Going back to our events after the port 80 connections, we see a connection to port 31337:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"200\" src=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-79-1024x200.png\" alt=\"\" class=\"wp-image-1221\" srcset=\"https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-79-1024x200.png 1024w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-79-300x59.png 300w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-79-768x150.png 768w, https:\/\/epbrtcybersecurityportfolio.xyz\/wp-content\/uploads\/2025\/11\/image-79.png 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>These are probably the C2 connections.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is lab 1.2 for the SEC511 class. In this lab, I am looking at a client exploitation. A user has reported to the help desk that his PC started acting funny. This was after he clicked on a suspicious link. This was then escalated to the security team. The help desk mentioned that the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1154","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1154"}],"version-history":[{"count":5,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1154\/revisions"}],"predecessor-version":[{"id":1223,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1154\/revisions\/1223"}],"wp:attachment":[{"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/epbrtcybersecurityportfolio.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}