Braindump
Read BlogpostsLet's Connect
  • Introduction: My OSCP Journey
  • Writeup Index
  • OSCP Machine Writeups
    • ๐Ÿ”ฅPG - Practice
      • Shenzi
      • DVR4
      • Resourced
      • Kevin
      • Nara
      • Jacko
      • Authby
      • Access
      • Internal
      • Hutch
      • Algernon
      • HelpDesk
      • Squid
      • Hepet
      • Craft2
      • ClamAV
      • Pelican
      • Payday
      • Snookums
      • Bratarina
      • Nibbles
      • Hetemit
      • Hawat
      • Astronaut
      • Exfiltrated
      • Fanatastic
      • Wombo
      • Levram
      • LaVita
    • ๐Ÿ’ฃHackTheBox
      • Devel
      • Legacy
      • Intelligence
        • Learning
      • Blackfield
        • PrivEsc - SeBackupPrivilege
      • Sauna
      • Bastard
      • Arctic
      • Forest
      • Active
      • SecNotes
      • Access
  • Preparation Notes
    • Tips and Tricks
      • File Transfer
      • Download a file - Windows CLI
      • Bypassing Firewall/Defender/UAC
      • Accessing File
      • Reverse Shell
      • OneLiner - Reverse/bind Shell
      • OneLiner - MSFVenom
    • Enumeration Techniques
      • System and Network Enumeration
      • Web Enumeration
      • Service Enum
      • CMS
    • Exploitation
      • Exploiting Web Apps
      • Exploiting Wordpress
      • Public Exploits
    • Privilege Escalation
      • Linux Privilege Escalation
        • Disk Group PrivEsc
      • Windows Privilege Escalation
    • Active Directory
      • Enumeration
      • AD Attacks
      • mimikatz
      • Lateral movement
    • Pivoting and Networking
      • SSH Port Forwarding
      • Ligolo-ng
    • Password Cracking
Powered by GitBook
On this page
  • LOLBAS (Living Off the Land Binaries)
  • Compile SUID bash
  • Set ENV in windows
  • Fixing Frozen PowerShell

Was this helpful?

  1. Preparation Notes

Tips and Tricks

PreviousAccessNextFile Transfer

Last updated 3 days ago

Was this helpful?

LOLBAS (Living Off the Land Binaries)

technique that is based on taking advantage of the systemโ€™s own binaries to cause significant damage in an attack, with a relatively low detection rate.

Compile SUID bash

If you find you can run command as root, you could compile a setuid bash for you! First create a c program:

int main(void)
{
    setuid(0);
    setgid(0);
    system("/bin/bash");
}

Compile (for x64):

gcc setuid.c -o <outputfile>

Set ENV in windows

In case Windows reverse shell throw error for basic command lke whoami and all, they this

set PATH=%SystemRoot%\\system32;%SystemRoot%;

Fixing Frozen PowerShell

May face this issue where you get cmd.exe shell and when you run powershell.exe, the shell frozes. ๐Ÿ˜Ÿ

Wayaround to run powerUp.ps1

# at the end of the line, add the following command
Invoke-AllChecks

# On your cmd shell, run powerup like this
powershell -ep byppass .\powerUp.ps1

# Bomm! mo frozen shell but results!!
LOLBAS
Logo