Tag Archives: technology

APT41’s Dodgebox: Defense Evasion and Detection Strategies

While conducting threat hunting research, I came across a defense evasion behavior in APT41’s Dodgebox malware that I haven’t seen formally documented as its own technique in MITRE ATT&CK. This post walks through what I found, why it matters, and how to detect it.

The Technique

Dodgebox checks whether Control Flow Guard (CFG) is enabled on the system, and if it is, attempts to disable it.

CFG is a security feature built into modern Windows systems that restricts where an application can execute code. It’s designed to make it harder for attackers to exploit memory corruption vulnerabilities, like buffer overflows, to hijack control of a running program. When CFG is bypassed, an attacker significantly improves their odds of successful code execution and privilege escalation.

According to Zscaler’s ThreatLabz research on Dodgebox, the malware detects CFG status and, if active, modifies the LdrpHandleInvalidUserCallTarget function in ntdll.dll to disable it, effectively removing that security layer before proceeding.

Reference: Zscaler ThreatLabz, DodgeBox: A deep dive into the updated arsenal of APT41

Where This Sits in ATT&CK

This behavior maps cleanly to Defense Evasion, and specifically to the Disable or Modify Tools technique (currently T1685 in ATT&CK’s structure, previously catalogued under T1562.001). ATT&CK already documents APT41’s broader pattern of in-memory patching of security interfaces like AMSI and ETW inside ntdll.dll to evade detection without triggering obvious service termination events. The CFG check-and-disable behavior is consistent with that same pattern, but as of this writing, I haven’t found it documented as its own procedure example under any current sub-technique.

Worth noting separately: before disabling CFG, the malware first has to determine its status. That discovery step is arguably its own consideration, closer to System Information Discovery, and shouldn’t be conflated with the disable action itself.

Detection

    There are a few practical ways to check CFG status and hunt for this behavior.

    1. PowerShell – Per-Process Check
      • Get-ProcessMitigation lets you query the mitigation settings of a running process, including whether CFG is enabled:
        • Get-ProcessMitigation -System
      • If the result shows OFF, CFG is not enabled for that process. ON or NOTSET indicates CFG is enabled or set to the default configuration.
    2. PowerShell – Binary-level Check Across Systems
      • Get-PESecurity is a PowerShell module that examines Windows binaries to determine whether they were compiled with various security mitigations, including CFG. The relevant characteristic is stored as GUARD_CF with a value of 0x4000, which makes it possible to check for CFG support at the binary level rather than just the running-process level.
    3. EDR – Fleet-wide Check
      • If you’re running Microsoft Defender for Endpoint, Advanced Hunting can assess CFG status across your environment:
        • DeviceTvmSecureConfigurationAssessment
        • | where ConfigurationID == "scid-2020"
        • | project DeviceName, OSPlatform, IsCompliant, Context
        • | join kind=leftouter (DeviceInfo | project DeviceName, PublicIP, IsAzureADJoined) on DeviceName
        • | summarize count() by IsCompliant, OSPlatform
      • This gives you a fleet-wide compliance view rather than a single host check, which is more useful for spotting systems where CFG has been disabled outside of normal configuration management.
    CFG Status
    SCID-2020

    If your organization has visibility into CFG status at scale, whether through EDR telemetry, binary analysis, or process mitigation checks, it’s worth adding to your detection coverage. This is a small, quiet step in an attack chain, but it’s also a step that’s currently easy to miss.

    References

    Tagged , , , , ,

    Making GARAK’s LLM Security Reports Actually Useful

    Lately, Iโ€™ve been running security assessments on various LLM applications using NVIDIAโ€™s GARAK tool. If you havenโ€™t come across it yet, GARAK is a powerful open-source scanner that checks LLMs for all kinds of vulnerabilities, everything from prompt injection to jailbreaks and data leakage.

    The tool itself is fantastic, but there was one thing driving me crazy: the reports.

    The Problem with JSONL Reports

    GARAK outputs all its test results as JSONL files (JSON Lines), which are basically long text files with one JSON object per line. Great for machines, terrible for humans trying to make sense of test results.

    I’d end up with these massive files full of valuable security data, but:

    • Couldn’t easily filter by vulnerability type
    • Had no way to sort or prioritize issues
    • Couldn’t quickly see patterns or success rates
    • Struggled to share the results with non-technical team members

    Anyone who’s tried opening a raw JSONL file and making sense of it knows the pain I’m talking about.

    The Solution: JSONL to Excel Converter

    After wrestling with this problem, I finally decided to build a solution. I created a simple Python script that takes GARAK’s JSONL reports and transforms them into nicely organized Excel workbooks.

    The tool

    1. Takes any JSONL file (not just GARAK reports) and converts it to Excel
    2. Creates multiple sheets for different views of the data
    3. Adds proper formatting, column sizing, and filters
    4. Generates summary sheets showing test distributions and success rates
    5. Makes it easy to identify and prioritize security issues

    Here’s what the output looks like for a typical GARAK report:

    • Summary sheet: Shows key fields like vulnerability type, status, and probe class
    • All Data sheet: Contains every single field from the original report
    • Status Analysis: Breaks down success/failure rates across all tests
    • Probe Success Rates: Shows which vulnerability types were most successful

    Why This Matters

    If you’re doing any kind of LLM security testing, quickly making sense of your test results is key. This simple conversion tool has saved me hours and helped me focus on real vulnerabilities instead of wrangling with report formatting.

    The best part is, the code is super simple; just a few lines of Python using pandas and xlsxwriter. I’ve put it up on GitHub for anyone to use.

    Wrapping Up

    Sometimes the simplest tools make the biggest difference. I built this converter to scratch my own itch, and it’s been surprisingly effective at saving time and effort.

    If you’re doing LLM security testing with GARAK, I hope it helps make your workflow smoother too.

    GARAK – JSONL to Excel Converter

    Also, check out my second tool: GARAK Live Log Monitor with Highlights. It’s a bash script that lets you watch GARAK logs in real-time, automatically highlights key events, and saves a colorized log for later review or sharing.

    Would love to hear your feedback!

    Tagged , , , , , , , , , , , ,

    How to Install and Configure Ollama on Kali Linux

    Install Ollama on Kali Linux

    In the fast-growing world of artificial intelligence (AI), Ollama is becoming a popular tool for people who want to run powerful AI language models on their own computers. Instead of relying on cloud servers, Ollama lets you run AI models locally, meaning you have more privacy and control over your data. This guide will show you how to install and set up Ollama on Kali Linux so you can experiment with AI models right from your device.

    What Is Ollama?

    Ollama is a software framework that makes it easy to download, run, and manage large language models (LLMs) like LLaMA and other similar models on your computer. Itโ€™s designed for privacy and efficiency, so your data doesnโ€™t leave your device. Ollama is getting more popular with developers and researchers who need to test AI models in a secure, private environment without sending data over the internet.

    Why Use Ollama?

    Ollama is gaining popularity for several reasons:

    • Privacy: Running models locally means your data stays on your device, which is crucial for people handling sensitive information.
    • Performance: Ollama is optimized to run on CPUs, so you donโ€™t need a high-end graphics card (GPU) to use it.
    • Ease of Use: With simple commands, you can easily download and manage different AI models, making it accessible for beginners and advanced users alike.

    Why Install Ollama on Kali Linux?

    Kali Linux is a popular choice for cybersecurity professionals, ethical hackers, and digital forensics experts. Itโ€™s packed with tools for security testing, network analysis, and digital investigations. Adding Ollama to Kali Linux can be a big advantage for these users, letting them run advanced AI language models right on their own computer. This setup can help with tasks like analyzing threats, automating reports, and processing natural language data, such as logs and alerts.

    By using Ollama on Kali Linux, professionals can:

    • Make Documentation Faster: AI models can help write reports, summaries, and other documents, saving time and improving consistency.
    • Automate Security Analysis: Combining Ollama with Kaliโ€™s security tools allows users to build scripts that look for trends, scan reports, and even identify potential threats.

    Before You Begin Install

    To get started with Ollama on Kali Linux, make sure you have:

    • Kali Linux version 2021.4 or later.
    • Enough RAM (at least 16GB is recommended for better performance).
    • sudo access on your system

    Note: Ollama was initially built for macOS, so the setup on Linux may have some limitations. Be sure to check Ollamaโ€™s GitHub page for the latest updates.

    Steps to Install Ollama on Kali Linux

    Step 1: Update Your System

    First, update your system to make sure all packages are up to date. Open a terminal and type:

    sudo apt update && sudo apt upgrade -y
    

    Install Ollama:

    The official Ollama installation for Ubuntu or Debian-based systems is much simpler and usually involves running a curl command to download and execute an installation script:

    curl -fsSL https://ollama.com/install.sh | sh
    
    ollama_install_kali, Ollama AI Models

    Verifying the Installation

    ollama --version
    
    Ollama Installation

    You can also just enter ollama in the terminal and if its installed correctly you should see the following:

    Run Language Models Locally

    Installing and Running LLMs

    The process for installing and running LLMs on Kali Linux is the same as on other Linux distributions:

    To Install an LLM:

    ollama pull <LLM_NAME>
    
    Install LLMs on Linux

    In my case above, I installed llama3.2:1b model. You can see full library of models available on Ollama’s Github.

    Start Prompt

    After you’ve completed the previous steps, you can start Ollama with the specific model that you installed and send your prompts:

    ollama run <LLM_NAME>
    start prompt ollama kali, AI for Cybersecurity Professionals

    Conclusion

    Ollama provides a great way to run large language models on your own machine, keeping data secure and private. With this guide, you can install and configure Ollama on Kali Linux and explore AI without relying on cloud-based services. Whether youโ€™re a developer, AI enthusiast, or just curious about AI models, Ollama lets you experiment with language models directly from your device.

    Stay tuned to the Ollama GitHub page for the latest features and updates. Happy experimenting with Ollama on Kali Linux!

    AI-Policy-Development-Guide

    I recently published a comprehensive guide for organizations developing an AI policy. It includes ย key questions on AI governance, risk mitigation, compliance, and stakeholder engagement. You can find it on my Github: https://github.com/azeemnow/Artificial-intelligence/blob/main/AI-Policy-Development-Guide/AI-Policy-Development-Guide-v1.pdf

    Disclosure: Some of the content in this blog post may have been generated or inspired by large language models (LLMs). Effort has been made to ensure accuracy and clarity.

    Tagged , , , , , , , , , , , , ,

    How Free Web Filtering Software Can Protect You System?

    Update

    On August 1, 2016, Blue Coat, Inc. (K9โ€™s parent company) was acquired by Symantecโ„ข. As can be imagined Blue Coat and Symantec had a handful of similar products and unfortunately, it didnโ€™t make sense to maintain two competing products. it was decided to โ€œend-of-lifeโ€ K9 Web Protection.
    Effective immediately, K9 Web Protection is no longer available for purchase or download. Technical Support for K9 will end on June 30, 2019.

    It is unfortunate to see K9 Web Protection go. I am not aware of an alternative free software that provides the same level of protection at a premium quality. However, for those interested in alternatives to K9 Web Protection, I would recommend you can start with Quad9 and OpenDNS Home. While neither of them provides everything that K9 did, but they still protect your system against most common online threats.


    โ€œWe may think one layer of security will protect us โ€“ for example, antivirus. Unfortunately for that approach, history has proven that, although single-focus solutions are useful in stopping specific attacks, the capabilities of advanced malware are so broad that such protections inevitably fail.โ€ โ€“ Jerry Shenk, Layered Security: Why It Works.

    Making use of layered security for personal use is of the utmost importance as I have covered a couple of times in the past: here, here, andย here. Just as I have done in the past, I will use this post to share another tool that you can explore to support your personal layered security strategy.

    My never-ending curiosity to explore and test new technologies can sometimes lead me to stumble upon genuinely impressive solutions. Fortunately for you, I believe this tool falls into that category.

    K9 Web Protection is the software that I have been testing for some months now, and I must say, Iโ€™ve been truly pleased with its results. The software falls under the Web Filter category, which places a restriction on websites that you can visit. Web Filtering is used in two major cases. The first is to permit parents to control the sort of content accessible to their children, offering their kids a safe environment to learn and explore online. The second is for businesses who wish to prevent their employees from accessing websites that do not pertain to their jobs.

    However, in addition to the above-mentioned, from my experience using this software on a daily basis, I have come across other benefits:

    • Real-time malware protectionโ€œhelps identify and block illegal or undesirable content in real time, including malware-infected sites. You also benefit from the WebPulse cloud service, a growing community of more than 62 million users who provide more than six billion real-time Web content ratings per day.โ€
      • You can learn more about web filtering and intelligence here.
    • Automatic content ratingsโ€œNew websites and web pages are created every minute, and no one person can possibly rate or categorize all of them. To ensure protection against new or previously unrated websites, Blue Coatโ€™s patent-pending Dynamic Real-Time Ratingโ„ข (DRTR) technology automatically determines the category of an unrated web page, and allows or blocks it according to your specifications.โ€

    Another advantage of the K9 Web Protection is that it is backed by Blue Coat (acquired by Symantec in 2016), ย the leader in Web Security โ€œwith an impressive portfolio of integrated technologies serving as a trusted platform to deliver Cloud Generation Security to more than 15,000 customers worldwide.โ€

    This solution is truly an โ€œenterprise-class security software designed for home computers.โ€ Also, did I mention that itโ€™s free! โ€œAs part of the Blue Coat Community Outreach Program, K9 Web Protection is free for home use. You can also purchase a license to use K9 Web Protection for business, government, non-profit, or other use.โ€

    I will do a quick overview of the installation and usage of the software, but you can find a well-documented quick start guide and user manual here:

    Installation and Usage Overview:

    installk9

    • The installation process should take a couple of minutes to complete as it is self-explanatory.
    • Upon completion, the applicationโ€™s interface will open in your browser:

    K9_Browser_admin_page

    • To view or modify any of the configurations, you will be prompted to enter the password you created during installation.
    • Here are some of the options and details you can access from the Setup page:

    k9_block_categories.PNG

    • Web Categories to Block: choosing one of the available levels allows you to block selected categories of websites.
    • Time Restrictions: 3 options are available to block web access depending on the time of day. Unrestricted places no restrictions on web access. NightGuard blocks all web access during contiguous blocks of time every day. Custom enables you to choose days of the week and time periods to block all web access.
    • Web Site Exceptions: Allows you to create lists of websites to โ€œalways blockโ€ or โ€œalways allow.โ€ Blocking Effects: โ€œBark When Blockedโ€ plays a barking sound when a web page is blocked. Make sure the sound is enabled and not muted. Show Admin Options displays options on blocked web pages which enable administrators to view the blocked web page. Enable Time Out allows you to block all web access if too many web pages are blocked in a given period of time
    • URL Keywords: Allows you to enter keywords which, if found in a URL, cause a โ€œblock pageโ€ to display. Safe Search: โ€œRedirect to K9 Safe Searchโ€ will redirect searches to various search engines through K9’s Safe Search. This provides a safer search experience than other search engines provide. Force Safe Search will prevent users from disabling Safe Search functionality provided by various websites.
    • Other Settings: โ€œUpdate to Betaโ€ enables you to get advance copies of new K9 Web Protection software undergoing development. Blue Coat distributes Beta versions so that K9 gets used in “real world” environments before being released as a final version. Please note that Beta versions might be incomplete and less stable than final versions. โ€œFilter Secure Trafficโ€ enables K9 to block secure websites (i.e. sites that use the HTTPS protocol).
    • Password/Email: Allows you to change your K9 administrator password or e-mail address.
    • K9 Update: Installs software updates if available.
    • View Activity Summary: This tab shows a summary of all โ€œWeb Activityโ€ on your computer: To view more details, click the โ€œCategoryโ€ or โ€œRequestsโ€ links. On these pages, you have the option of grouping the data by month or by day. To view Administrative Events details, click the โ€œView Allโ€ link. (Some of these activities are as a result of automatic browser and toolbar updates, for example, and might display URL formats with which you are not familiar.) By selecting “Clear Logs”, all your activity data will be cleared; however, three daysโ€™ worth of administrative events will be retained.k9_activity_summary

    As you can see from the above, the information provided here is extremely granular and it allows you to not only get an easy view of your browsing behavior but also the behaviors of the various system and application components. I have been using this solution in conjunction with other traditional protective mechanisms, such as anti-virus, and the benefits have been massive.

    For instance, sometimes, while surfing the internet, I would see a certain URL get blocked or a visit history to a certain category in a website without a recollection of visiting that website. However, after investigations, I found that some components of a software installed on my computer or an extension in my browser is the reason behind that activity.

    โ€œThe malware ecosystem has changed drastically in the past 10 years, to the point that the old precautions are just no longer enoughโ€ –ย Malwarebytes LABS.ย I have been using K9 Web Protection on many of my personal computers because I have been impressed with it, so I thought to share it here. I believe it provides that extra layer of protection that we can all appreciate in a world where cyber threats are on the rise. In addition, I believe this solution is a wonderful option for those that are less familiar with common cyber threat vectors (i.e. parents) and can easily fall for phishing emails or click on an adware as they browse the internet.

    As we have known for some time, โ€œthere is no single solution for the information security problems we face today. A combination of many different kinds of security tools is required to protect you from modern threatsโ€ฆโ€ and I believe K9 Web Protection is among the best tools we have today, so you should definitely equip yourself with it if you are going to create a safe web environment for yourself, your kids, your employees, and everyone around you!

    ย 


    Tagged , , , , , , , , ,
    Advertisements