- 101
- More on Using Bash's Built-in /dev/tcp File (TCP/IP)
- Bash Brace Expansion Cleverness - Jon Oberhide
- Basic Linux Privilege Escalation - g0tmi1k
- Not so much a script as a resource, g0tmi1k’s blog post here has led to so many privilege escalations on Linux system’s it’s not funny. Would definitely recommend trying out everything on this post for enumerating systems.
- Discovery
- Articles/Blogposts/Writeups
- Account Discovery
- Browser Bookmark Discovery
- File and Directory Discovery
- Network Service Scanning
- Articles/Blogposts/Writeups
- Tools
- Baboossh
- BabooSSH allows you, from a simple SSH connection to a compromised host, to quickly gather info on other SSH endpoints to pivot and compromise them.
- Baboossh
- Network Sniffing
- Password Policy Discovery
- Permission Groups Discovery
- Process Discovery
- Articles/Blogposts/Writeups
- Tools
- pspy
- pspy is a command line tool designed to snoop on processes without need for root permissions. It allows you to see commands run by other users, cron jobs, etc. as they execute. The tool gathers the info from procfs scans. Inotify watchers placed on selected parts of the file system trigger these scans to catch short-lived processes.
- pspy
- Remote System Discovery
- nullinux
- nullinux is an internal penetration testing tool for Linux that can be used to enumerate OS information, domain information, shares, directories, and users through SMB. If no username and password are provided, nullinux will attempt to connect to the target using an SMB null session. Unlike many of the enumeration tools out there already, nullinux can enumerate multiple targets at once and when finished, creates a users.txt file of all users found on the host(s). This file is formatted for direct implementation and further exploitation.This program assumes Python 2.7, and the smbclient package is installed on the machine. Run the setup.sh script to check if these packages are installed.
- nullinux
- Software Discovery
- System Information Discovery
- System Network Configuration Discovery
- System Network Connections Discovery
- System Owner/User Discovery
- Execution
- Articles/Blogposts/Writeups
- Tools
- LoLBins
- Articles/Blogposts/Writeups
- Tools
- GTFOBins
- GTFOBins is a curated list of Unix binaries that can be exploited by an attacker to bypass local security restrictions. The project collects legitimate functions of Unix binaries that can be abused to break out of restricted shells, escalate or maintain elevated privileges, transfer files, spawn bind and reverse shells, and facilitate the other post-exploitation tasks.
- GTFOPlus
- GTFOPlus is a helper script that relies on the GTFOBins repo to identify standard Linux binaries that could assist with privilege escalation.
- GTFOBins
- Command and Scripting Interpreter
- Bash
- Tools
- Orc
- Orc is a post-exploitation framework for Linux written in Bash
- Orc
- Tools
- Bash
- Exploitation for Client Execution
- Inter-Process Communication
- Native API
- Articles/Blogposts/Writeups
- Tools
- msf-elf-in-memory-execution
- Post module for Metasploit to execute ELF in memory
- msf-elf-in-memory-execution
- Scheduled Task/Job
- At
- Launchd
- Cron
- Shared Modules
- Software Deployment Tools
- System Services
- Launchctl
- Service Execution
- User Execution
- Malicious Link
- Malicious File
- Articles/Blogposts/Writeups
- Payloads
- Tools
- fireELF
- fireELF is a opensource fileless linux malware framework thats crossplatform and allows users to easily create and manage payloads. By default is comes with 'memfd_create' which is a new way to run linux elf executables completely from memory, without having the binary touch the harddrive.
- fireELF
- Tools
- Persistence
- Account Manipulation
- Additional Azure Service Principal Credentials
- Exchange Email Delegate Permissions
- Add Office 365 Global Administrator Role
- SSH Authorized Keys
- BITS Jobs
- Boot or Logon Autostart Execution
- Registry Run Keys / Startup Folder
- Authentication Package
- Time Providers
- Winlogon Helper DLL
- Security Support Provider
- Kernel Modules and Extensions
- Re-opened Applications
- LSASS Driver
- Shortcut Modification
- Port Monitors
- Plist Modification
- Boot or Logon Initialization Scripts
- Logon Script (Windows)
- Logon Script (Mac)
- Network Logon Script
- Rc.common
- Startup Items
- Browser Extensions
- Browser Extensions
- Compromise Client Software Binary
- Tools
- Debinject
- Inject malicious code into .debs
- Debinject
- Tools
- Create Account
- Local Account
- Domain Account
- Cloud Account
- Create or Modify System Process
- Launch Agent
- Systemd Service
- Windows Service
- Launch Daemon
- Event Triggered Execution
- Change Default File Association
- Screensaver
- Windows Management Instrumentation Event Subscription
- .bash_profile and .bashrc
- Trap
- LC_LOAD_DYLIB Addition
- Netsh Helper DLL
- Accessibility Features
- AppCert DLLs
- AppInit DLLs
- Application Shimming
- Image File Execution Options Injection
- PowerShell Profile
- Emond
- Component Object Model Hijacking
- External Remote Services
- Hijack Execution Flow
- Services File Permissions Weakness
- Executable Installer File Permissions Weakness
- Services Registry Permissions Weakness
- Path Interception by Unquoted Path
- Path Interception by PATH Environment Variable
- Path Interception by Search Order Hijacking
- DLL Search Order Hijacking
- DLL Side-Loading
- LD_PRELOAD
- Dylib Hijacking
- COR_PROFILER
- Implant Container Image
- Implant Container Image
- Office Application Startup
- Add-ins
- Office Template Macros
- Outlook Forms
- Outlook Rules
- Outlook Home Page
- Office Test
- Pre-OS Boot
- System Firmware
- Component Firmware
- Bootkit
- Scheduled Task/Job
- At (Windows)
- Scheduled Task
- At (Linux)
- Launchd
- Cron
- Server Software Component
- SQL Stored Procedures
- Transport Agent
- Web Shell
- Traffic Signaling
- Port Knocking
- Valid Accounts
- Default Accounts
- Domain Accounts
- Local Accounts
- Cloud Accounts
- Account Manipulation
- Privilege Escalation
- 101
- Articles/Blogposts/Writeups
- Exploits
- Docker
- Dirty COW
- Huge Dirty COW
- “Huge Dirty COW” (CVE-2017–1000405) The incomplete Dirty COW patch - Eylon Ben Yaakov
- HugeDirtyCow PoC
- A POC for the Huge Dirty Cow vulnerability (CVE-2017-1000405)
- dirty_sock
- dirty_sock - Linux privilege escalation exploit via snapd (CVE-2019-7304)
- In January 2019, current versions of Ubuntu Linux were found to be vulnerable to local privilege escalation due to a bug in the snapd API. This repository contains the original exploit POC, which is being made available for research and education. For a detailed walkthrough of the vulnerability and the exploit, please refer to the blog posting here.
- Linux Privilege Escalation via snapd (dirty_sock exploit)
- Kernel-based
- Miscellaneous Software
- Vim/Neovim Arbitrary Code Execution via Modelines - CVE-2019-12735
- Vim before 8.1.1365 and Neovim before 0.3.6 are vulnerable to arbitrary code execution via modelines by opening a specially crafted text file.
- [0day] [exploit] Compromising a Linux desktop using... 6502 processor opcodes on the NES?! - scarybeastsecurity
- A vulnerability and a separate logic error exist in the gstreamer 0.10.x player for NSF music files. Combined, they allow for very reliable exploitation and the bypass of 64-bit ASLR, DEP, etc. The reliability is provided by the presence of a turing complete “scripting” inside a music player. NSF files are music files from the Nintendo Entertainment System. Curious? Read on...
- systemd (systemd-tmpfiles) < 236 - 'fs.protected_hardlinks=0' Local Privilege Escalation
- Vim/Neovim Arbitrary Code Execution via Modelines - CVE-2019-12735
- Techniques
- Container-based
- Using the docker command to root the host (totally not a security issue)
- It is possible to do a few more things more with docker besides working with containers, such as creating a root shell on the host, overwriting system configuration files, reading restricted stuff, etc.
- Linux Privilege Escalation via LXD & Hijacked UNIX Socket Credentials - Chris Moberly
- Using the docker command to root the host (totally not a security issue)
- Capabilities
- Cron jobs
- Exploitation for Privilege Escalation
- GTFOBins
- NFS
- Linux Privilege Escalation using weak NFS permissions - Haider Mahmood
- Linux Privilege Escalation using Misconfigured NFS - Raj Chandel
- NFS weak permissions(Linux Privilege Escalation) - Touhid Shaikh
- NFS, no_root_squash and SUID - Basic NFS Security - fullyautolinux
- A tale of a lesser known NFS privesc - gquere
- NFS - myexperiments.io
- PATH
- Process Injection
- Shared Libraries
- Setuid and Setgid
- SUID - myexperiments.io
- SUID Executables - NetbiosX
- Tools
- SUID3NUM
- A standalone python script which utilizes python's built-in modules to find SUID bins, separate default bins from custom bins, cross-match those with bins in GTFO Bin's repository & auto-exploit those, all with colors! ( ͡ʘ ͜ʖ ͡ʘ)
- SUID3NUM
- Sudo
- Sudo Caching
- Valid Accounts
- Web Shell
- Wildcards
- Writable Files
- uptux
- Linux privilege escalation checks (systemd, dbus, socket fun, etc)
- uptux
- Container-based
- Solaris
- uid=0 is deprecated: A trick unix-privesc-check doesn’t yet know - TMB
- dtappgather-poc.sh
- Exploit PoC reverse engineered from EXTREMEPARR which provides local root on Solaris 7 - 11 (x86 & SPARC). Uses a environment variable of setuid binary dtappgather to manipulate file permissions and create a user owned directory anywhere on the system (as root). Can then add a shared object to locale folder and run setuid binaries with an untrusted library file.
- Talks/Videos
- Tools
- LinEnum
- This tool is great at running through a heap of things you should check on a Linux system in the post exploit process. This include file permissions, cron jobs if visible, weak credentials etc. The first thing I run on a newly compromised system.
- Linux_Exploit_Suggester
- Linux Exploit Suggester; based on operating system release number. This program run without arguments will perform a 'uname -r' to grab the Linux Operating Systems release version, and return a suggestive list of possible exploits. Nothing fancy, so a patched/back-ported patch may fool this script. Additionally possible to provide '-k' flag to manually enter the Kernel Version/Operating System Release Version.
- linux-exploit-suggester
- Linux privilege escalation auditing tool
- Linux Exploit Suggester 2
- Next-Generation Linux Kernel Exploit Suggester
- LinuxPrivChecker
- This is a great tool for once again checking a lot of standard things like file permissions etc. The real gem of this script is the recommended privilege escalation exploits given at the conclusion of the sc
- Github
- Unix Privilege Escalation Checker
- Unix-privesc-checker is a script that runs on Unix systems (tested on Solaris 9, HPUX 11, Various Linuxes, FreeBSD 6.2). It tries to find misconfigurations that could allow local unprivileged users to escalate privileges to other users or to access local apps (e.g. databases). It is written as a single shell script so it can be easily uploaded and run (as opposed to un-tarred, compiled and installed). It can run either as a normal user or as root (obviously it does a better job when running as root because it can read more files).
- EvilAbigail
- Initrd encrypted root fs attack
- kernelpop
- kernel privilege escalation enumeration and exploitation framework
- GTFOPlus
- GTFOPlus is a helper script that relies on the GTFOBins repo to identify standard Linux binaries that could assist with privilege escalation.
- LinEnum
- Defense Evasion
- Binary Padding
- Clear Command History
- Compile After Delivery
- Connection Proxy
- Disabling Security Tools
- Endpoint Detection Response(EDR)
- Zombie Ant Farm: A Kit For Playing Hide and Seek with Linux EDRs.
- Zombie Ant Farm: Primitives and Offensive Tooling for Linux EDR evasion.
- Zombie Ant Farm: A Kit For Playing Hide and Seek with Linux EDRs.
- Execution Guardrails
- Credential Access
- Bash History
- Articles/Blogposts
- Tools
- Brute Force
- Articles/Blogposts
- Tools
- Credential Dumping
- Articles/Blogposts
- Where 2 Worlds Collide: Bringing Mimikatz et al to UNIX - Tim(-Wadha) Brown
- What this talk is about: Why a domain joined UNIX box matters to Enterprise Admins; How AD based trust relationships on UNIX boxes are abused; How UNIX admins can help mitigate the worst side effects;
- linikatz
- This repository contains all of the scripts and source code for "Where 2 Worlds Collide: Bringing Mimikatz et al to UNIX". In addition to the main linikatz.sh script, this also includes auditd policies, John the Ripper rules, Metasploit post-exploitation modules and fuzzers. More will follow in due course.
- Kerberos Credential Thiever (GNU/Linux) - Ronan Loftus, Arne Zismer
- Kerberos is an authentication protocol that aims to reduce the amount of sensitive data that needs to be sent across a network with lots of network resources that require authentication. This reduces the risk of having authentication data stolen by an attacker. Network Attached Storage devices, big data processing applications like Hadoop, databases and web servers commonly run on GNU/Linux machines that are integrated in a Kerberos system. Due to the sensitivity of the data these services deal with, their security is of great importance. There has been done a lot of research about sniffing and replaying Kerberos credentials from the network. However, little work has been done on stealing credentials from Kerberos clients on GNU/Linux. We therefore investigate the feasibility of extracting and reusing Kerberos credentials from GNU/Linux machines. In this research we show that all the credentials can be extracted, independently of how they are stored on the client. We also show how these credentials can be reused to impersonate the compromised client. In order to improve the security of Kerberos, we also propose mitigations to these attacks.
- Exfiltrating credentials via PAM backdoors & DNS requests - x-c3ll
- Where 2 Worlds Collide: Bringing Mimikatz et al to UNIX - Tim(-Wadha) Brown
- Tools
- linikatz
- mimipenguin
- A tool to dump the login password from the current linux user
- 3snake
- Targeting rooted servers, reads memory from sshd and sudo system calls that handle password based authentication. Doesn't write any memory to the traced processes. Spawns a new process for every sshd and sudo command that is run. Listens for the proc event using netlink sockets to get candidate processes to trace. When it receives an sshd or sudo process ptrace is attached and traces read and write system calls, extracting strings related to password based authentication.
- Tickey
- Tool to extract Kerberos tickets from Linux kernel keys. Paper
- Impost3r
- Impost3r is a tool that aim to steal many kinds of linux passwords(including ssh,su,sudo) written by C
- Articles/Blogposts
- Credentials from Web Browsers
- Articles/Blogposts
- Tools
- Credentials in Files
- Articles/Blogposts
- Tools
- KeyTabExtract
- KeyTabExtract is a little utility to help extract valuable information from 502 type .keytab files, which may be used to authenticate Linux boxes to Kerberos. The script will extract information such as the realm, Service Principal, Encryption Type and NTLM Hash.
- swap_digger
- swap_digger is a bash script used to automate Linux swap analysis for post-exploitation or forensics purpose. It automates swap extraction and searches for Linux user credentials, Web form credentials, Web form emails, HTTP basic authentication, WiFi SSID and keys, etc.
- KeyTabExtract
- Exploitation for Credential Access
- Articles/Blogposts
- Triple-Fetch-Kernel-Creds
- Attempt to steal kernelcredentials from launchd + task_t pointer (Based on: CVE-2017-7047)
- Triple-Fetch-Kernel-Creds
- Tools
- Articles/Blogposts
- Input Capture
- Articles/Blogposts
- Tools
- SudoHulk
- This tool change sudo command, hooking the execve syscall using ptrace, tested under bash and zsh
- SudoHulk
- Network Sniffing
- Articles/Blogposts
- Tools
- Private Keys
- Articles/Blogposts
- Tools
- Steal Web Session Cookie
- Articles/Blogposts
- Tools
- Two-Factor Authentication Interception
- Articles/Blogposts
- Tools
- Bash History
- Lateral Movement
- Application Deployment Software
- Exploitation of Remote Services
- Internal Spearphishing
- Port Forwarding & Proxies
- PortPush
- PortPush is a small Bash utility used for pivoting into internal networks upon compromising a public-facing host.
- PortPush
- Remote File Copy
- Remote Services
- RDP
- The RDP Through SSH Encyclopedia - Carrie Roberts
- I have needed to remind myself how to set up RDP access through an SSH connection so many times that I’ve decided to document it here for future reference. I hope it proves useful to you as well. I do “adversary simulation” for work and so I present this information using terms like “attacker” and “target” but this info is also useful for performing system administration tasks.
- The RDP Through SSH Encyclopedia - Carrie Roberts
- SSH
- RDP
- SSH Hijacking
- Third-party Software
- Collection
- Audio Capture
- Automated Collection
- Clipboard Data
- Data from Information Repositories
- Data from Local System
- Tools
- swap_digger
- swap_digger is a bash script used to automate Linux swap analysis for post-exploitation or forensics purpose. It automates swap extraction and searches for Linux user credentials, Web form credentials, Web form emails, HTTP basic authentication, WiFi SSID and keys, etc.
- swap_digger
- Tools
- Data from Network Shared Drive
- Data from Removable Media
- Data Staged
- Input Capture
- Screen Capture
- 101
- Articles/Blogposts/Writeups
- Talks & Presentations
- Tools
- Jugaad - Thread Injection Kit
- Jugaad is an attempt to create CreateRemoteThread() equivalent for
*nix
platform. The current version supports only Linux operating system. For details on what is the methodology behind jugaad and how things work under the hood visit http://null.co.in/section/projects for a detailed paper.
- Jugaad is an attempt to create CreateRemoteThread() equivalent for
- linux-injector
- Utility for injecting executable code into a running process on x86/x64 Linux. It uses ptrace() to attach to a process, then mmap()'s memory regions for the injected code, a new stack, and space for trampoline shellcode. Finally, the trampoline in the target process is used to create a new thread and execute the chosen shellcode, so the main thread is allowed to continue. This project borrows from a number of other projects and research, see References below.
- linux-inject
- Tool for injecting a shared object into a Linux process
- injectso64
- This is the x86-64 rewrite of Shaun Clowes' i386/SPARC injectso which he presented at Blackhat Europe 2001.
- Jugaad - Thread Injection Kit
- Techniques