Posts

You Don't Need Fancy Tools to Detect Evil

Image
Some Threat Hunters believe you need a big budget and fancy tools to perform effective threat hunting. If that's the case, the tool is the Threat Hunter, not the person. Here, I will guide you on how to hunt for persistence on Windows hosts using the tools you already have at your disposal. One of my go-to tools to detect persistence is Microsoft Sysinternals Autoruns. This free utility from Microsoft has the most comprehensive knowledge of the auto-starting locations of any startup monitor. It displays the programs configured to run during system bootup or login and when you start various built-in Windows applications . Link to Autroruns: https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns   The competent we will use within this zip file is autorunsc64.exe, or if you have a 32-bit version of Windows, autorunsc.exe. This is a command line interface (CLI) for autoruns. We need to get into the detail of autorunsc. However, we will use the -a switch for "autostart e...

AL, AI, and Sigma: Automating Threat Hunting With OpenAI

Image
Traditional threat hunting involves taking some threat intelligence, such as Palo Alto Unit 42 (https://unit42.paloaltonetworks.com/), and searching for malicious activity. More often than not, we find nothing and then forget how we searched for the malicious activity. This is why one of the products of any threat hunt should be a Sigma rule.  A Sigma rule is a standardized format for creating rules to detect suspicious activities or anomalies in log data across various security information and event management (SIEM) systems. What sets Sigma apart is its normalization to YAML format, making it SIEM-agnostic and allowing for seamless conversion to the querying language of your preferred SIEM, giving you the freedom to use it in the system that best suits your needs.  Reading through article after article, and extracting the necessary details to write a Sigma rule can be time-consuming and tedious. I remember a quote from a system administrator when I worked at the service desk...

sigma2sclogscale

Sigma detection rules are great for portability from Security Information and Event Management (SIEM) with Sigma CLI (  https://github.com/SigmaHQ/sigma-cli ). While it's true that Sigma CLI doesn't support all SIEMs, including Crowdstrike Logscale, the silver lining is that Sigma rules are structured as YAML data, making them a breeze to parse.   Below is my first attempt at writing a Python script to create  a  Crowdstrike Logscale query. You'll need to change the <BASE_URL>  and <REPO_NAME>in line 105 to your Logscale site and the repo you want to query. You will also need to change  the <ACCESS_TOKEN> in line 106. (Note: I use a static token.) The usage is as follows. python sigma2sclogscale.py <folder_to_search_for_sigma_rules> The output is a text file with a tuple of Sigma rule title and Crowdstrike Logscale query.

Mobile Fake USPS Credential Card Harvesting Site

Image
This morning, I received a group text message from a phone number in the Philippines informing me that my USPS package does not have a house number. The message then provides a convenient link to help me update my information.        Two additional phone numbers were in the group chat. Both had the same area and first three numbers as mine.  I received the text message about one hour after it was registered with a Cloud provider in China.      When I attempted to analyze the link in Windows 10, the website checked to see if my browser was running a mobile version, and since it was not, it redirected me to the real USPS website. Instead of changing my user agent, I created a new Android 12 device in Android Studio. This time, I was welcome with a page that allowed me to update my information. Please note that it was not redirected to a different website. This would be more difficult to burn the domain if needed. I was then taken to a page that aske...

SigmaHQ2Splunk

Sigma is a generic and open signature format that allows you to describe relevant log events straightforwardly. These rules are used for log and security event analysis, detection, and hunting. Sigma rules are written in YAML format, which makes them easy to read and write. They are designed to be portable and can be converted to various SIEMs (Security Information and Event Management). There is a large community of threat hunters create and share these rules with each other, and there’s no community larger than SigmaHQ ( https://github.com/SigmaHQ ). Below is a bash script that will clone the SigmaHQ GitHub repository and convert them to Splunk queries.   There are a couple of prerequisites. •    Git - https://github.com/git-guides/install-git •    sigma-cli - https://github.com/SigmaHQ/sigma-cli

Not Just for Vulnerabilities

Image
Why should I protect our vulnerability scanners? It's just vulnerabilities, and hackers can just scan for themselves, right? True, but vulnerability scanners are much more than that. They can also execute arbitrary commands and pose a much greater risk than you realize. In this example, we'll use the popular vulnerability scanner Nessus; however, any major vulnerability scanner will have this capability. Nessus can run audit files, which are XML-based and can execute PowerShell commands. In this post, we’ll break down the functionality of these audit files. The first tag is to identify the audit file type. In our case a Windows audit file. After this comes the group tag. This helps organize the audit file in Nessus. Now, we get into the more interesting tags. The IF, THEN, ELSE tags. These tags are optional. However, I highly recommend utilizing them. This allows for a conditional check(s) to be performed before proceeding with the rest of the checks.  In our case, we’re t...

Windows Incident Response Triage Script

Image
 This script is to pull files for triaging Windows hosts.   https://github.com/wubbaroo/winirtriage/blob/main/winirtriage.ps1