📝
Home
Pentesting
  • 📝Home
  • ⚒️PENTESTING
    • Foundational
      • Gaining Access
      • Session Hijacking
      • Buffer Overflows
        • Finding the Offset
        • Spiking
        • Fuzzing
      • Attack Basics
        • Brute Force Attacks
        • Credential Stuffing and Password Spraying
        • Netcat Shell Stabilization
        • Reverse Shells vs Bind Shells
        • Staged vs Non-Staged Payloads
      • Footprinting
    • Reconnaissance
      • Discovering Email Addresses
      • Hunting Subdomains
    • Scanning and Enumeration
      • Banner Grabbing
      • Enumerating HTTP and HTTPS
      • Enumerating SMB
      • Enumerating SSH
      • NetBIOS Enumeration
      • SNMP Enumeration
      • Sniffing
    • Privilege Escalation
      • 🐧Linux Privilege Escalation
      • 🪟Windows Privilege Escalation
        • Initial Enumeration
    • Defense Evasion
      • Hiding Files and Covering Tracks
      • Network Evasion
    • Attacking Services
      • Attacking Kerberos
      • Attacking VPNs
      • Denial of Service
      • Exploiting FTP
      • Exploiting NFS
      • Exploiting SMTP
      • Exploiting Telnet
    • Attacking Active Directory
      • Initial Attack Vectors
        • Gaining Shell Access
        • LLMNR Poisoning
        • SMB Relay
        • Passback Attacks
        • IPv6 Attacks
      • Post-Compromise Enumeration
        • Bloodhound
        • ldapdomaindump
        • PowerView
        • PlumHound
      • Post-Compromise Attacks
        • GPP Attacks
        • Print Nightmare
        • Token Impersonation using Incognito
        • URL File Attack
        • Pass Attacks
        • Kerberoasting
        • LNK File Attacks
        • Mimikatz
      • Post-Domain Compromise Attacks
        • Dumping the NTDS.dit
        • Golden Ticket Attacks
      • Post Exploitation
    • Toolkit
      • Burp Suite
        • Intruder
      • Hping
        • Crafting TCP and UDP Packets
      • Metasploit
        • Meterpreter
        • Shell Handler
        • Gather Information
        • Gaining Root
    • Web Application Hacking
      • Attack Methodology
      • Attacking Web Applications
      • Authentication Bypass
      • Cross-Site Scripting
      • Cross-Site Request Forgery
      • File Inclusion
      • Server-Side Request Forgery
      • Injection
        • Command Injection
        • LDAP Injection
        • SQL Injection
  • 👽MALWARE ANALYSIS
    • Malware Analysis Primer
    • Malware Types
      • Rootkits
      • Viruses
      • WannaCry
    • Analyzing Malicious Windows Programs
    • Static Analysis
      • Basic Static Techniques
      • Advanced Static Analysis
    • Reverse Engineering
      • Crash Course in x86 Disassembly
      • Recognizing Code in Assembly Language
    • Dynamic Analysis
    • Detecting Malware
      • Evasion Techniques
      • Detecting Mimikatz
      • Hunting Malware
      • Hunting Metasploit
      • Hunting Persistence
  • 🏹THREAT HUNTING
    • Foundational
      • ATT&CK Framework
      • CIA Triad
    • APTs
  • 🐍PROGRAMMING & SCRIPTING
    • Foundational
      • Computer Memory
    • C Programming
    • Assembly Language
      • Assembly File Structure
      • Debugging with gdb
    • Bash
    • Python
      • Foundational
        • Booleans and Operators
        • Comprehensions
        • Conditionals
        • Dictionaries
        • Exceptions and Error Handling
        • Functions
        • Lambdas
        • Lists
        • Loops
        • Modules
        • Numbers
        • Reading and Writing Files
        • Sets
        • Sockets
        • String Formatting
        • Tuples
        • User Input
        • Variables
      • Extending Python
        • Virtual Environments
        • Sys Module
        • Requests
        • pwntools
    • Regular Expressions
    • SQL
  • 🕵️DIGITAL FORENSICS
    • Anti-Forensic Techniques
    • 🪟Windows Security Internals
      • Windows Security Internals
        • Kernel
          • Security Reference Monitor (SRM)
          • Object Manager
            • System Calls
            • NTSTATUS Codes
            • Object Handles
            • Query and Set Information System Calls
          • The I/O Manager & The Process and Thread Manager
          • The Memory Manager
          • The Configuration Manager
  • 💼GRC (CISSP Notes)
    • Security Assessment and Testing
    • Security Governance Principles
    • Security Policies Standards and Procedures
    • Preventing and Responding to Incidents
    • Organizational Roles and Responsibilities
    • Organizational Processes
  • 📦Networking
    • Foundational
      • DHCP
      • DNS Basics
      • HTTP Protocol
      • IPSec
      • IPv6 Fundamentals
    • Wireless Technologies
      • 802.11
      • Bluetooth
      • Wireless Authentication
      • Wireless Encryption
Powered by GitBook
On this page
  • Ways to hide files in Windows systems
  • What is Steganography?
  • What are the three main logs?
  • How to hide your tracks in log files
  • Log file location
  • Tools
  1. PENTESTING
  2. Defense Evasion

Hiding Files and Covering Tracks


Ways to hide files in Windows systems

  • Altermate Data Stream (ADS)

    • A feature of the Windows native NTFS to ensure compatibility with Apple's HFS

    • Has the ability for loads for back-end features built into the OS and applications

    • No one in practice actually uses it because it is easy to spot and triggers all sorts of warnings

    • Allows you to hide files behind any other file, rendering it invisible to directory searches

    • Mitigations

      • Every forensics kit checks for ADS

      • Modern versions of Windows show an executable that's run inside a .txt file in the Task Manager as part of the parent

      • Hunt down ADS using applications like LNS and Sfind

      • In Vista, use directory command dir /r which will display all file stream in the directory

      • Copying files to and from a FAT partition blows away any residual file streams in the directory

# Move contents of the badfile file into the text file with a command 
c:\type c:\badfile.exe > c:\readme.txt:badfile.exe 

# When ready to use the file start it with 
start readme.txt:badfile.exe 

# Create a link to the bad file 
c:\mklink innocent.exe readme.txt:badfile.exe 

What is Steganography?

  • Hiding data in pictures

  • Two types of semagrams

    • Visual semagram — use an everyday object to convey a message

    • Text semagram — obscures a message in text by using things such as font, size, type or spacing

  • Linguistic steganography

    • a collection of techniques and methods that allows the hiding of any digital information within texts based on some linguistic knowledge.

    • Hides the message in the carrier file in a non-obvious way

  • Technical Steganography

    • Hides a message using scientific methods

  • Tools

    • ImageHide

    • Snow

    • Mp3Stego

    • Blindside

    • S-tools

    • wbStego

    • Stealth

What are the three main logs?

  • Application logs — entries specifically related to the applications, and only entries programmed by the developers get in

  • System log — Registers system events, such as drivers failing and startup/shutdown times

  • Security log — Registers login attempts, access and activities regarding resources

How to hide your tracks in log files

  • Be selective in your event log editing

  • Go in first and edit what is actually being audited

  • Turn off auditing only on the things you'll be hitting, things like:

    • failed resource access

    • failed logins

  • Visit the log and get rid of those items that show your presence and activities

  • Get rid of the security event log that shows where you edited the audit log

  • Another option is to simply corrupt the log file once you are done

Log file location

  • Default log file location is %systemroot%\System32\Config

  • This can be changed and placed the log files somewhere else by editing the registry key (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog)

Tools

  • In Control Panel | Administrative Tools | Local Security Policy — you can set up and change the audit policy for the system

  • Top level settings are found under Local Policies | Audit Policy

  • Other settings are found in Advanced Audit Policy Configuration

  • WinZapper

    • Evidence Eliminator

    • Auditpol - let's you disable event logs on other machines

c:\auditpol \\targetIPaddress /disable 
PreviousDefense EvasionNextNetwork Evasion

Last updated 1 year ago

⚒️