The Hive
GitHubLinkedInEmail
  • šŸ Home
  • 🌐RECON
    • šŸ“”Passive (OSINT)
      • ā©Metadata
      • ā©Social Platforms
        • Email
        • Tumbler
        • Redit
        • Github
        • Tinder
        • TikTok
        • Snapchat
        • Instagram
        • Facebook
        • Twitter
        • Google
        • LinkedIn
    • šŸ“”Active
      • ā©Host Discovery / Network Mapping
      • ā©nmap cheat sheet
      • ā©masscan cheat sheet
    • šŸ“”Web Recon
      • ā©Web Server Discovery
      • ā©Hidden Hosts
      • ā©Directories & Subdomains
      • ā©SSL Certs
      • ā©CMS
      • ā©WAF Detection
    • šŸ“”Firewall Evasion
  • šŸ“—Web Attacks
    • 🟢Server Side
      • 🟩Authentication Mechanisms
      • 🟩Access Control (Authorization)
      • 🟩Directory Traversal
      • 🟩OS Command Injection
      • 🟩Server-Side Request Forgery (SSRF)
      • 🟩XML External Entity (XXE) Injection
      • 🟩File Upload
      • šŸ”§SQL Injection
      • 🟩Information Disclosure
      • 🟩Business Logic
    • 🟢Client Side
      • 🟩Cross-site request forgery (CSRF)
      • šŸ”§Cross-site scripting (XSS)
  • šŸ“’Network attacks
    • 🟔Network Services
      • 🟨Brute Force
      • 🟨DNS
      • 🟨IPv6
      • 🟨FTP
      • 🟨SSH
      • 🟨SMB
      • 🟨SNMP
      • 🟨SMTP
      • 🟨POP3
      • 🟨IMAP
      • 🟨MSSQL
      • 🟨MySQL
      • 🟨MSRPC / RPCbind
      • 🟨LDAP
      • 🟨NTP
      • 🟨NFS
      • 🟨Telnet
      • 🟨WebDAV
      • 🟨RDP
      • 🟨RSIP
      • 🟨Rlogin
      • 🟨VPNs
      • 🟨Echo
      • šŸ”§RTP
      • šŸ”§VOIP
        • SIP
    • 🟔Network Devices
      • 🟨IPv6 Attacks
        • Neighbor Impersonation
        • Router Advertisement Flooding
      • 🟨Switch Attacks
        • Cisco Exploitation
        • STP Spoofing
        • VLAN Hopping
        • MAC Flood
      • 🟨Router Attacks
        • Router Exploitation
        • HSRP Hijacking
        • šŸ”§RIP Spoofing
        • šŸ”§OSPF Attacks
        • šŸ”§VRRP MitM
      • 🟨NAC Bypass
        • Captive Portal
        • 802.1X / EAP Bypass
      • 🟨Printer Exploitation
    • 🟔MITM & Poisoning
      • 🟨Bettercap
      • 🟨HTTPS Downgrade / HSTS Bypass
      • 🟨Session Hijackings
      • 🟨Malicious Update
      • 🟨RDP Downgrade
      • 🟨DNS Spoofing
      • 🟨NTP Spoofing
      • 🟨ARP Spoofing
      • 🟨DHCP Poisoning
      • 🟨DHCPv6 Spoofing
      • 🟨SSDP Spoofing
      • 🟨WSUS Spoofing
      • 🟨ADIDNS Poisoning
      • 🟨WPAD Abuse
    • 🟔Wireless Attacks
      • 🟨Protocol Concepts
      • 🟨Basics
      • 🟨Attacks
    • 🟔Sniffing
      • 🟨Wireshark
      • 🟨tcpdump
    • 🟔Denial of Service
  • šŸ“•Red Team
    • šŸ”“Windows
      • ā­•Security Concepts
        • Windows Security Components
        • Active Directory Components
        • Kerberos
        • Loggon Sessions and Access Tokens
        • Permissions and Access Control
        • Windows Registry
        • Object Management
      • ā­•Physical Attack
      • ā­•Enumeration
      • ā­•Privilege Escalation
        • DLL Hijacking
          • Phantom DLL Hijacking / Replacement
          • Search Order Hijacking ( Preloading )
          • DLL Side-Loading
        • Service Misconfigurations
          • Weak Registry Permissions
          • Insecure Service Executables
          • Insecure Permission
          • Unquoted Service Path
        • Creating a New Service (admin to system)
        • Registry
          • AlwaysInstallElevated
          • AutoRuns
        • Scheduled Tasks
        • Mass Roll-outs
        • Startup Apps
        • Installed Applications
        • Loopback Services
        • Insecure GUI APPs
        • Potatos
        • Printspoofer / SEImpersonate
        • PSEXEC (admin to system)
      • ā­•Credential Dumping
      • ā­•Persistence
        • Invisible Account Forger
        • Add User
        • Scheduled Tasks
        • Run Registry Keys
        • Logon Scripts
        • Screensavers Hijack
        • Powershell Profiles & Modules
        • Service Creation/Modification
        • Shortcut Modification
        • Startup Folder
        • RDP backdoors
        • COM Hijacking
    • šŸ”“Active Directory
      • ā­•Domain Enumeration
      • ā­•Tools & Frameworks
        • Evil-WinRM
        • CME cheat sheet
        • SharpSploit
        • impacket cheat sheet
        • DeathStar
      • ā­•Exploitation
        • LLMNR Poisoning
        • SMB/NTLM Relay
        • DNS Takeover + LDAP Relay
        • Cracking Hashes
        • Password spraying
        • ADCS + PetitPotam NTLM Relay
        • EternalBlue
        • ZeroLogon
        • MS Exchange ProxyShell
        • MS Exchange ProxyLogon
        • Java JBOSS
      • ā­•Privilege Escalation
        • Token Impersonation
        • DNS Admins
        • AD CS Abuse
        • ACL Abuse
          • GenericAll
          • Write Property
          • Self-membership
          • ForceChangePassword
          • Managed Security Groups
          • Exchange Windows Permissions
        • Group Policy Objects (GPOs)
        • Custom SSPs
        • PrintNightmare
      • ā­•Lateral Movement
        • RDP Password Decryption
        • RDP Session Hijacking
        • headless RDP with SharpRDP
        • Domain Shares
        • SCF File Attacks
        • Pass the Hash / Password
        • Overpass the Hash / Pass the Key
        • Pass The Ticket
        • Kerberosting / AS-REP Rosting
        • Kerberos Delegation
      • ā­•Credential Dumping
        • CredSSP / TSPKG
        • Wdigest Clear Text
        • DPAPI secrets
        • SAM & Registry
        • NTDS.dit & vshadow
        • comsvcs.dll
        • Meterpreter
        • Procdump & LSASS
        • AD User Comments
        • SYSVOL & Group Policy Preferences
        • LAPS Passwords
        • GSMA Passwords
        • HiveNightmare
        • Mimikatz Cheat sheet
        • Other Tools / Techniques
      • ā­•Persistence
        • Certificates
        • DCSync
        • DCShadow
        • Silver Ticket
        • Golden Ticket
        • Skeleton Key
        • WMI
        • PowerShell Remoting
        • Remote Registry
        • Rights Abuse
        • AdminSDHolder
        • DSRM
        • Kerberos Checksum Validation ( MS14-068 )
    • šŸ”“Linux
      • ā­•Physical Attacks
      • ā­•Enumeration
      • ā­•Privilege Escalation
        • SUID / SGID abuse
        • /etc/shadow & /etc/passwd
        • cron/crontab abuse
        • Sudo Abuse
        • Capabilities Abuse
        • Environment Variables
          • LD_LIBRARY_PATH
          • LD_PRELOAD
        • Shared Object Injection
        • NFS
        • man CE Pager Argument
        • MySQL UDF
        • UDEVD
        • STDIN/STDOUT
        • Unix Socket Exploitation
        • Dirty Pipe
        • Docker
          • SUID Docker
      • ā­•Lateral Movement
        • Infecting Running Processes
        • VIM Config File Keylogger
        • SSH Hijacking
        • Samba Secrets to Domain Admin
        • Hiding Processes
        • Simple User-mode Rootkits
        • Vino VNC Server
      • ā­•Credential Dumping
        • Swap Dump
        • mimipinguin
        • unshadow
        • 3snake
      • ā­•Persistence
        • Startup User File Backdoor
        • PHP Backdoor
        • Apache mod_rootme
        • Startup Service Backdoor
        • xdg Backdoor
        • rootbash SUID
        • apt Backdoor
        • Driver Backdoor
        • Core Pattern
        • dash Backdoor
        • Creating an SUID Binary
        • Systemd netcat bind shell
        • Xinetd UDP portnock
        • openSSL reverse shell
        • motd Backdoor
        • Auth Log Backdoor
        • RSYSLOG Backdoor
        • sshd Backdoor
        • VIM Config Backdoor
        • .bashrc Backdoor
        • Adding a Root user
        • Crontab Reverse Shell
        • SSH persistence password-less
      • ā­•Covering Tracks
    • šŸ”“Command & Control (C2)
      • ā­•Cobalt Strike
      • ā­•Metasploit
      • ā­•Empire & Starkiller
      • ā­•Covenant
    • šŸ”“Shells and Payloads
      • ā­•Shell Escape / Interactive Shell
      • ā­•LOL Binaries
      • ā­•msfvenom
      • ā­•SharpShooter & Ivy
      • ā­•Other Payloads
    • šŸ”“Payload Delivery
      • ā­•Powershell Reflective DLL Load
      • ā­•HTML Smuggling
      • ā­•Office Macros
      • ā­•DDE Auto - Word/Excel
      • ā­•.SLK Excel
      • ā­•XLM Macro 4.0
      • ā­•LNK
      • ā­•embedded OLE + LNK objects
      • ā­•JScript
      • ā­•HTA
      • ā­•VBS
      • ā­•VBA
      • ā­•RTF
      • ā­•REG
      • ā­•MSI / MSIEXEC
      • ā­•IQY
      • ā­•CHM / HHC
      • ā­•SCR
    • šŸ”“Pivoting
      • ā­•SSH Forwarding
      • ā­•Socat Stealth Port Forward
      • ā­•Socat Reverse Shell Relay
      • ā­•HTTP Tunneling
      • ā­•ICMP Tunneling
      • ā­•DNS Tunneling
      • ā­•Metasploit Pivoting
      • ā­•Cobalt Strike Pivoteing
      • ā­•VPN Tunneling
      • ā­•Other Tools
    • šŸ”“Exfiltration / File Transfer
      • ā­•Encode / Decode Files
      • ā­•TCP / UDP
      • ā­•DNS
      • ā­•SSH
      • ā­•ICMP
      • ā­•SMB
      • ā­•FTP
      • ā­•HTTP
      • ā­•Other Methods
    • šŸ”“Password Attacks
      • ā­•Online Attacks
      • ā­•Offline Attack
      • ā­•Word List
      • ā­•Cheat Sheet
    • šŸ”“Defense Evasion
      • ā­•Basic Tricks
      • šŸ”§Powershell Tricks
      • ā­•Disabling Defenses
      • ā­•UAC Bypass
      • ā­•Process Migration
      • ā­•Dechaining Macros
      • ā­•VBA Sandbox Evasion
      • ā­•AMSI Bypass
      • ā­•SRP & AppLocker Bypass
      • ā­•GPO Bypass
  • šŸ“˜Blue Team
    • šŸ”µThreat Modeling / Hunting / Intelligence
    • šŸ”µLinux Hardening
      • šŸ”¹OS Security
        • Update Strategy
        • Service Management
        • Physical Security
        • Grub Hardening
        • Kernel Parameters
        • Process Isolation
      • šŸ”¹Accounts & Passwords
        • Users & Groups
        • Password Security & Sudoers
      • šŸ”¹Access Control & Ownership
      • šŸ”¹File System Security
      • šŸ”¹Integrity Check
      • šŸ”¹Sandboxing
      • šŸ”¹Network
      • šŸ”¹iptables
        • Rule Sets
      • šŸ”¹Service Hardening
        • BIND9
        • vsftpd
        • Nginx
        • Apache
        • SSH
      • šŸ”¹System Audit
      • šŸ”¹Logging
        • auditd
      • šŸ”¹Encryption
    • šŸ”µSecurity Architecture
      • šŸ”¹Layered Security
  • 🟪Purple Teaming
    • 🟣Adversary Emulation
  • 🟧programming
    • 🟠C Programming
      • šŸ”øBasic Structure
      • šŸ”øGCC Compiler
      • šŸ”øPreprocessors
      • šŸ”øData Types
      • šŸ”øType Qualifiers
      • šŸ”øPointers
      • šŸ”øDynamic Memory Allocation
      • šŸ”øLoops
      • šŸ”øConditional Statements
      • šŸ”øFunctions
      • šŸ”øInput / Output
      • šŸ”øMacros
      • šŸ”øFiles
      • šŸ”øStrings Manipulation
      • šŸ”øBit Manipulation
      • šŸ”øData Structures
        • Arrays
        • Structures
        • Unions
      • šŸ”øAbstract Data Types
        • Stack
        • Queue
        • Linked List
          • Singly Linked List
          • Doubly Linked List
      • šŸ”øLibraries & Linking
      • šŸ”øError Recovery
    • šŸ”§Assembly ( NASM )
      • Intel IA-32 Environment
      • Basic Structure
      • Variables and Data Types
      • Most-used Instructions
      • input / output
  • 🟫Miscellaneous
    • 🟤GNU Screen / tmux
    • 🟤SSH Tricks
    • 🟤Cats
      • netcat
      • ncat
      • pwncat
      • socat
      • šŸ”§powercat
    • 🟤Curl
    • 🟤Cross-compiling Binaries
Powered by GitBook
On this page
  • Linux Physical Security Guide
  • Boot in Single-user Mode
  • Exploitation
  1. Red Team
  2. Linux

Physical Attacks

PreviousLinuxNextEnumeration

Last updated 2 years ago

Linux Physical Security Guide

Boot in Single-user Mode

unauthorized users can edit the grub boot configuration and boot as root. After that the user can either collect any data in the users account(Passive). Or the unauthorized user can reset the root user password and/or other user passwords(Active).

Exploitation

when grub options are displayed press ā€˜e’. Then you will land in a screen such as this. Now you must go to the kernal line as shown below and add in:

'init=bin/bash'

Once that is done all you need to do is press f10 to boot. You may want to press fn + f10 in some cases. Then you will see a screen like this.

Now you must issue the commands:

mount -o remount,rw /

At this point, you are ready to reset the root password. So go ahead and change it. Finally, you need to issue the command touch /.autorelabel.(This is because you have done an unauthorized thing and need to clean the mess or clear the tracks).

Afterwards when you reboot into the machine, you will be able to access the root account with the new password you have used.

Another (easy) option to gain a root shell in Linux a system is to simply boot up in rescue mode which is the second option in the GRUB boot menu and almost always available.

The solution to this problem is to .

šŸ“•
šŸ”“
ā­•
enabling grub password authentication
Physical Security for Linux Systems - SecurSecur
Logo