<?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 Madan on Medium]]></title>
        <description><![CDATA[Stories by Madan on Medium]]></description>
        <link>https://medium.com/@madansen.red18?source=rss-9b4ab5b8d04e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UAlyPiHYhQaFqzAjYBW9wA.jpeg</url>
            <title>Stories by Madan on Medium</title>
            <link>https://medium.com/@madansen.red18?source=rss-9b4ab5b8d04e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:36:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madansen.red18/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[Monitoring Windows System Calls]]></title>
            <link>https://medium.com/@madansen.red18/monitoring-windows-system-calls-efea72eecbab?source=rss-9b4ab5b8d04e------2</link>
            <guid isPermaLink="false">https://medium.com/p/efea72eecbab</guid>
            <dc:creator><![CDATA[Madan]]></dc:creator>
            <pubDate>Sun, 24 Nov 2024 11:04:33 GMT</pubDate>
            <atom:updated>2024-11-24T11:22:19.747Z</atom:updated>
            <content:encoded><![CDATA[<p>System calls (syscalls) are the bridge between user applications and the operating system. Hackers exploit them to execute malicious actions, such as loading malicious code into memory, bypassing security controls, or exfiltrating data — all while appearing as legitimate processes.</p><p>Unfortunately, most users remain unaware of such activity unless specialized tools like antivirus or EDR solutions detect the attack. Even then, these tools only provide alerts for known threats, leaving no way to view or analyze undetected syscall activity, creating a blind spot for novel or stealthy exploits.</p><p>Building a system call monitoring tool for Windows using DTrace was an exciting challenge that combined technical learning with a lot of problem-solving. I want to share my experience with you, breaking it down in a way that’s practical and easy to follow. Whether you’re exploring system monitoring or are just curious about how DTrace can be used on Windows, I hope this story resonates with you.</p><h3>What is DTrace?</h3><p>DTrace, or Dynamic Tracing, is a tool originally developed for Solaris to provide deep insights into system-level activities. Over time, its capabilities have expanded to other operating systems, including Windows. DTrace allows developers and administrators to trace system calls, kernel-level processes, and even application-level events with minimal performance impact.</p><p>When I first started experimenting with DTrace, I quickly realized how powerful it could be. The ability to monitor system behavior in real time opens the door to debugging complex issues, understanding performance bottlenecks, and detecting security vulnerabilities.</p><h3>The Goal: A Tool for Monitoring System Calls</h3><p>My aim was to create a system call monitoring tool tailored for Windows. Why? Because understanding how processes interact with the operating system is crucial for debugging and security tasks. I envisioned a tool that could:</p><ul><li>Capture and log system calls in real time.</li><li>Provide a clear and easy-to-interpret output.</li></ul><h3>Challenges Along the Way</h3><p>One of the biggest challenges was adapting DTrace, which wasn’t initially designed for Windows, to effectively monitor system calls on this platform. While DTrace does support Windows, there are limitations compared to its functionality on Unix-like systems. For instance, understanding the specific Windows APIs and how they map to DTrace probes took some digging.</p><p>Another hurdle was ensuring the tool could handle high-frequency events without becoming a bottleneck. For example, while testing, I noticed that tracing all file operations on a busy system generated overwhelming amounts of data. To solve this, I implemented filters to capture only the events relevant to the task at hand.</p><h3>Practical Use Cases</h3><ul><li><strong>Debugging</strong>: The tool helped me debug an issue where a program unexpectedly crashed. By tracing its system calls, I pinpointed a missing file that caused the crash.</li><li><strong>Security Auditing</strong>: Monitoring system calls gave insights into unusual activity, like processes trying to access sensitive files.</li><li><strong>Learning Tool</strong>: On a personal level, building and using this tool deepened my understanding of how Windows handles system calls.</li></ul><h3>Lessons Learned</h3><p>Creating this tool taught me the importance of focusing on real-world scenarios. Instead of capturing every possible system call, I learned to prioritize actionable data. I also discovered the value of writing clean, reusable scripts — what started as quick prototypes eventually became polished tools.</p><h3>Advice for Anyone Interested</h3><p>If you’re thinking about creating a similar tool, here are some tips:</p><ol><li>Start small. Focus on one category of system calls, like file operations, before expanding.</li><li>Test in a controlled environment to avoid overwhelming your system with data.</li><li>Document your scripts. Future-you will thank you!</li></ol><p>Building a system call monitoring tool with DTrace was a rewarding project that pushed my skills and taught me the importance of balancing functionality with performance. If you’re curious about system tracing or want to start your own project, I encourage you to give it a try. The insights you’ll gain are worth every moment.</p><p>Feel free to share your thoughts or ask questions — I’d love to hear your perspective!</p><p>Here is the git hub tool i created dor using dtrace using python</p><p><a href="https://github.com/Aiz9/Monitoring-Windows-Syscalls">https://github.com/Aiz9/Monitoring-Windows-Syscalls</a></p><p>References that helped me in my search:</p><p><a href="https://www.apriorit.com/dev-blog/reverse-engineering-monitoring-syscalls-windows">https://www.apriorit.com/dev-blog/reverse-engineering-monitoring-syscalls-windows</a></p><p><a href="https://stackoverflow.com/questions/864839/monitoring-certain-system-calls-done-by-a-process-in-windows">https://stackoverflow.com/questions/864839/monitoring-certain-system-calls-done-by-a-process-in-windows</a></p><p><a href="https://stackoverflow.com/questions/4959752/recording-syscalls-in-windows">https://stackoverflow.com/questions/4959752/recording-syscalls-in-windows</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efea72eecbab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting For WinOS 4.0]]></title>
            <link>https://medium.com/@madansen.red18/hunting-for-winos-4-0-ef7e6bf42981?source=rss-9b4ab5b8d04e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef7e6bf42981</guid>
            <dc:creator><![CDATA[Madan]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 06:27:15 GMT</pubDate>
            <atom:updated>2024-11-09T06:31:19.491Z</atom:updated>
            <content:encoded><![CDATA[<p>A new threat actor group, identified as <em>Void Arachne</em>, has recently emerged, targeting Chinese-speaking users and gamers with cyberattack campaign. The group is distributing malicious Windows installer files that masquerade as legitimate AI software, VPN installers, popular game installation tools, speed boosters, and optimization utilities. However, these seemingly innocent downloads are actually bundled with the <em>Winos</em> payloads.</p><h3>Winos 4.0 Infection Chain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aK7xaDrqcbX5dQgG.png" /><figcaption>Fig1: The Void Arachne campaign attack diagram by Trend Micro</figcaption></figure><h3><strong>Initial Access</strong></h3><ul><li>The campaign may involve methods to gain initial access, such as phishing, infected installers, or exploiting vulnerabilities to introduce the MSI file on a target system.</li></ul><h3>Execution</h3><ul><li><strong>Scheduled Task/Job (T1053)</strong>: The MSI file creates scheduled tasks to execute malicious files, maintaining persistence and automating execution.</li><li><strong>Command and Scripting Interpreter (T1059)</strong>: The malware utilizes VBScript and other script interpreters to automate malicious actions.</li></ul><h3>Persistence</h3><ul><li><strong>Scheduled Task/Job (T1053)</strong>: A scheduled task is configured to maintain persistence by executing the VBScript and batch files.</li><li><strong>Create or Modify System Process (T1543)</strong>: The malware creates a Windows service named CreateSvc_ to maintain persistence.</li></ul><h3>Privilege Escalation</h3><ul><li><strong>Abuse Elevation Control Mechanism (T1548)</strong>: The malware includes plugins for enabling debug privileges and executing in higher privilege modes.</li></ul><h3>Defense Evasion</h3><ul><li><strong>Obfuscated Files or Information (T1027)</strong>: Encrypted payloads and the use of the RC4 algorithm make detection and analysis more difficult.</li><li><strong>Deobfuscate/Decode Files or Information (T1140)</strong>: The malware decrypts payloads in memory to execute them without being stored in plain form.</li><li><strong>Disable or Modify System Firewall (T1562.004):</strong> The malware modifies system firewalls in order to bypass controls limiting network usage (port forwarding with netsh and the configuration of firewall rules.)</li><li><strong>Modify Registry (T1112)</strong>: The malware modifies registry keys to capture response from C&amp;C server and maintain persistence and evade detection.</li><li><strong>Indicator Removal on Host (T1070)</strong>: The malware uses one of its capabilities to delete itself and clean up artifacts to evade detection.</li></ul><h3>Credential Access</h3><ul><li><strong>Credentials from Password Stores (T1555)</strong>: It includes plugins to delete credentials from specific password stores, like Chrome and Telegram.</li><li><strong>Keylogging (T1056.001)</strong>: The malware employs a keylogger to capture and steal credentials.</li></ul><h3>. Discovery</h3><ul><li><strong>System Information Discovery (T1082)</strong>: Performs system discovery to gather data on the infected host.</li><li><strong>Network Service Discovery (T1046)</strong>: Internal network host scanning helps map the network environment.</li></ul><h3>Collection</h3><ul><li><strong>Input Capture (T1056)</strong>: Keylogging enables the malware to capture sensitive information entered by the user.</li><li><strong>Screen Capture (T1113)</strong>: The malware captures screenshots and video from the system.</li><li><strong>Audio Capture (T1123)</strong>: The malware may record audio from the microphone to capture sensitive information.</li></ul><h3>Command and Control (C2)</h3><ul><li><strong>Encrypted Channel (T1573)</strong>: The malware encrypts its communication with the C2 server using a generated session key.</li><li><strong>Non-Standard Port (T1571)</strong>: Uses port 443 for C2 communication, which can bypass security controls that might not monitor or restrict commonly used ports.</li></ul><h3>Exfiltration</h3><ul><li><strong>Exfiltration Over C2 Channel (T1041)</strong>: The malware uses the established C2 channel to exfiltrate data from the infected host.</li></ul><h3>Impact</h3><ul><li><strong>Data Destruction (T1485)</strong>: deletes credentials stored in web browser or other system resources.</li><li><strong>Disk Wipe (T1561)</strong>: Plugins may include functionality to overwrite or delete significant portions of disk data.</li><li><strong>Data Manipulation (T1565)</strong>: The malware has tools to manipulate files and system configurations.</li><li><strong>Service Stop (T1489)</strong>: The malware may stop services related to security monitoring or other critical functions.</li></ul><h3>Detection Queries</h3><p><strong>File drop</strong></p><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND EventID=11  AND targetfilename = &quot;C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VGX*&quot;</pre><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND EventID=11  AND (targetfilename = C:\\Users\\%USERNAME%\\Desktop\\*letvpn.msi OR* targetfilename = *C:\\Users\\%USERNAME%\\Downloads\\letvpn.msi OR* targetfilename =C:\\Users\\YourUsername\\AppData\\Local\\Temp\\*letvpn.msi )*</pre><p><strong>Scheduled Task Creation</strong></p><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND <br>Event ID =&quot;1&quot;  AND process name = &quot;schtasks.exe&quot;</pre><pre>source=&quot;*WinEventLog:Microsoft-Windows-Security&quot; AND <br>Event ID =&quot;4698&quot; OR Event ID = &quot;4702&quot;</pre><p><strong>VBS execution</strong></p><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND <br>Event ID =&quot;1&quot; AND (Process name = wscript.exe OR Process name = cscript.exe) AND command = &quot;*//e:vbscript*&quot;</pre><p><strong>Service Creation/ installation</strong></p><pre>source=&quot;*WinEventLog:Microsoft-Windows-Security&quot; AND (Event ID = 7045 OR  Event ID = 4697) AND ServiceName contains  &quot;CreateSvc_&quot;</pre><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND (EventID = 1 AND Image == &quot;sc.exe&quot; and CommandLine contains &quot;create&quot; or CommandLine contains &quot;CreateSvc_&quot;) or (Process Name  = &quot;powershell.exe&quot; and (CommandLine contains &quot;New-Service&quot; or CommandLine contains &quot;CreateSvc_&quot; )</pre><pre>EventID = 4104 AND (ScriptBlockText contains &quot;New-Service&quot; or ScriptBlockText contains &quot;Set-Service&quot; or ScriptBlockText contains &quot;sc.exe create&quot; or  ScriptBlockText contains &quot;CreateSvc_&quot;)</pre><p><strong>SeDebugPrivilege Enabled by a Suspicious Process</strong></p><pre>source= &quot;Microsoft-Windows-Security-Auditing&quot; AND event Type : &quot;Token Right Adjusted Events&quot; and EnabledPrivilegeList = &quot;SeDebugPrivilege&quot; AND  SubjectUserSid NOT IN (&quot;S-1-5-18&quot;, &quot;S-1-5-19&quot;, &quot;S-1-5-20&quot;) AND ProcessName NOT IN<br>         (&quot;C:\\\\Windows\\\\System32\\\\msiexec.exe&quot;,<br>          &quot;C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\lsass.exe&quot;,<br>          &quot;C:\\\\Windows\\\\WinSxS\\\\*&quot;,<br>          &quot;C:\\\\Program Files\\\\*&quot;,<br>          &quot;C:\\\\Program Files (x86)\\\\*&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\MRT.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\cleanmgr.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\taskhostw.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\mmc.exe&quot;,<br>          &quot;C:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*-*\\\\DismHost.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\auditpol.exe&quot;,<br>          &quot;C:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSe.exe&quot;,<br>          &quot;C:\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSe.exe&quot;)</pre><p><strong>Registry Modification</strong></p><pre>source=&quot;*WinEventLog:Microsoft-Windows-Sysmon/Operational&quot; AND (Event ID = 12 OR Event ID = 13) AND (Target Object path = HKEY_CURRENT_USER\\Console\\0 OR  Target Object path = HKEY_CURRENT_USER\\Console\\1)</pre><p><strong>File deletion</strong></p><pre>[Event ID = 4663 Followed By Event ID = 4660 within 5 Seconds] having same Process Name</pre><pre>Source = &quot;FIM&quot; AND Event type = &quot;file deletion&quot; </pre><p><strong>Possible Credential harvesting from Browsers</strong></p><pre>Event ID = 4663 AND (ObjectName=&quot;*\\\\cookies.sqlite*&quot; OR ObjectName=&quot;*release\\\\key3.db*&quot; OR ObjectName=&quot;*release\\\\key4.db*&quot; OR ObjectName=&quot;*release\\\\logins.json*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Chrome\\\\User Data\\\\Default\\\\Login Data*&quot; OR ObjectName=&quot;*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Network\\\\Cookies*&quot; OR ObjectName=&quot;*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Local State*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\7Star\\\\7Star\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Amigo\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\BraveSoftware\\\\Brave-Browser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\CentBrowser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Chedot\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Google\\\\Chrome SxS\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Chromium\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Microsoft\\\\Edge\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\CocCoc\\\\Browser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Comodo\\\\Dragon\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Elements Browser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Epic Privacy Browser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Kometa\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Opera Software\\\\Opera Stable*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Orbitum\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Sputnik\\\\Sputnik\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Torch\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\uCozMedia\\\\Uran\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Vivaldi\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Yandex\\\\YandexBrowser\\\\User Data*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Mozilla\\\\Firefox*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\NETGATE Technologies\\\\BlackHawk*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\8pecxstudios\\\\Cyberfox*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Comodo\\\\IceDragon*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\K-Meleon*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\Mozilla\\\\icecat*&quot; OR ObjectName=&quot;*\\\\Appdata\\\\Local\\\\UCBrowser*&quot;) AND  NOT ((process_name=&quot;System&quot; AND ParentImage=&quot;Idle&quot;) OR (process_name=&quot;C:\\\\Program Files\\\\*&quot; OR process_name=&quot;C:\\\\Program Files (x86)\\\\*&quot; OR process_name=&quot;C:\\\\WINDOWS\\\\system32\\\\*&quot; OR process_name=&quot;C:\\\\WINDOWS\\\\SysWOW64\\\\*&quot;)) AND  NOT ((process_name=&quot;C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*&quot; AND (process_name=&quot;*\\\\MpCopyAccelerator.exe&quot; OR process_name=&quot;*\\\\MsMpEng.exe&quot;)) OR ParentImage=&quot;C:\\\\Windows\\\\System32\\\\msiexec.exe&quot;)</pre><p><strong>System info discovery</strong></p><pre>Event ID = 4688 AND command contains systeminfo  OR command contains netstat</pre><pre>Event ID = 4104 AND Scriptblock contain &quot;systeminfo&quot; OR ScriptBlock contains &quot;netstat&quot;</pre><p><strong>Firewall Config Changes</strong></p><pre>Event ID = 4663 AND Object Name = **NetFirewall.dll**</pre><pre>Event ID = 1 AND Process Name = &quot;netsh.exe&quot; command = (netsh advfirewall firewall add rule name=&quot;Safe1&quot; dir=in action=allow program=&quot; C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VGX\\app-3.4.0\\LetsPRO.exe&quot;)</pre><pre>Event ID = 1 AND Process Name = &quot;netsh.exe&quot; command = (netsh interface portproxy add v4tov4 listenport=443 connectaddress=103[.]214[.]147[.]14[.]webcamcn[.]xyz connectport=443)</pre><p><strong>C&amp;C</strong></p><pre>Direction = Outbound AND  Destination Port = (443 OR 80) AND URL = &quot;*webcamcn.xyz*&quot;</pre><p><strong>For IOC provided by Trend Micro:-</strong></p><p><a href="https://www.trendmicro.com/content/dam/trendmicro/global/en/research/24/f/behind-the-great-wall--void-arachne-targets-chinese-speaking-users-with-the-winos-4-0-c-c-framework/WinOS4.0_IoCs.txt">https://www.trendmicro.com/content/dam/trendmicro/global/en/research/24/f/behind-the-great-wall--void-arachne-targets-chinese-speaking-users-with-the-winos-4-0-c-c-framework/WinOS4.0_IoCs.txt</a></p><p>references:-</p><p><a href="https://attack.mitre.org/">https://attack.mitre.org/</a></p><p><a href="https://www.trendmicro.com/en_us/research/24/f/behind-the-great-wall-void-arachne-targets-chinese-speaking-user.html">https://www.trendmicro.com/en_us/research/24/f/behind-the-great-wall-void-arachne-targets-chinese-speaking-user.html</a></p><p><a href="https://fourcore.io/blogs/threat-hunting-browser-credential-stealing">https://fourcore.io/blogs/threat-hunting-browser-credential-stealing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef7e6bf42981" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>