Fake Access Point: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 28: Zeile 28:
 
*macaddr_acl=0: Wir wollen keine ACLs
 
*macaddr_acl=0: Wir wollen keine ACLs
 
*ignore_broadcast_ssid=0 : Die SSID soll sichtbar sein.
 
*ignore_broadcast_ssid=0 : Die SSID soll sichtbar sein.
 
+
=DHCP und Nameserver für diese Karte=
interface=wlan0mon
+
interface=wlan0
dhcp-range=192.168.1.2, 192.168.1.30, 255.255.255.0, 12h
+
dhcp-range=192.168.1.2, 192.168.1.30, 255.255.255.0, 12h
dhcp-option=3, 192.168.1.1
+
dhcp-option=3, 192.168.1.1
dhcp-option=6, 192.168.1.1
+
dhcp-option=6, 192.168.1.1
server=8.8.8.8
+
server=8.8.8.8
log-queries
+
log-queries
log-dhcp
+
log-dhcp
listen-address=127.0.0.1
+
listen-address=127.0.0.1
 
+
=Bedeutung=
 
+
*interface: Schnittstelle
dhcp-range: IP address range for the connected network clients. 12h is the amount of hours until the lease expires.
+
*dhcp-range: IP Range und Ablaufzeit
dhcp-option=3: Gateway IP for the networks.
+
*dhcp-option=3: Gateway IP  
dhcp-option=6: For DNS Server followed by IP address
+
*dhcp-option=6: DNS Server
server: DNS server’s address
+
*server: DNS server’s address
log-queries: Log the results of DNS queries handled by dnsmasq.
+
*log-queries: Log the results of DNS queries handled by dnsmasq.
log-dhcp: Log all the options sent to DHCP clients and the tags used to determine them.
+
*log-dhcp: Log all the options sent to DHCP clients and the tags used to determine thitt
listen-address: Links the DHCP to the local IP address which is 127.0.0.1.
+
*listen-address: Links the DHCP to the local IP address which is 127.0.0.1.
 
+
=Netzwerkarbeiten=
Now we need to assign the interface a network gateway and netmask and then add the routing table.
+
;IP Adresse an das Interface binden
 
+
*ifconfig wlan0 up 192.168.1.1 netmask 255.255.255.0
ifconfig wlan0mon up 192.168.1.1 netmask 255.255.255.0
+
;Alles aus diesem LAN wird maskiert
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
+
*iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
Start the DNS server by doing:
+
;Forwarding einschalten
 
+
*sysctl -w net.ipv4.ip_forward = 1
dnsmasq -C dnsmasq.conf -d
+
=Wir starten den DNSMASQ=
 
+
*dnsmasq -C dnsmasq.conf -d
STEP 8:
 
 
 
To provide the users with internet access, we need to forward traffic from eth0, the  virtual wireless adapter that is connected to the internet, to wlan0mon. This will help you perform various attacks that can give you complete access to the user’s device. If you don’t want the users to have internet access, skip this step.
 
 
 
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
 
iptables --append FORWARD --in-interface wlan0mon -j ACCEPT
 
First command: Interface name that is used to forward traffic from.
 
Second command: Interface name to receive the packets or the interface that is being forwarded to.
 
Now execute this command to enable IP Forwarding:
 
 
 
echo 1 > /proc/sys/net/ipv4/ip_forward
 
  
 
=Links=
 
=Links=
 
*https://zsecurity.org/how-to-start-a-fake-access-point-fake-wifi/
 
*https://zsecurity.org/how-to-start-a-fake-access-point-fake-wifi/

Version vom 12. Oktober 2022, 16:40 Uhr

Installation

Wir brauchen die Software für den Accesspoint sowie eine Light Version von Name und DHCP Server
  • apt update
  • apt install hostapd dnsmasq

Vorbereitung

Wir müssen den WLAN Adapter in den Überwachungsmodus versetzen, damit wir die Pakete im und um das Netzwerk herum schnüffeln können.
  • ifconfig wlan0 down
  • iwconfig wlan0 mode monitor
  • ifconfig wlan0 up

Wir erstellen eine Verzeichnis für unsere Konfig Dateien

  • mkdir /root/fap
  • cd /root/fap

Die Accesspoint Konfiguration

  • vi hostapd.conf
interface=wlan0
driver=nl80211
ssid=klauer 
hw_mode=g
channel=6
macaddr_acl=0
ignore_broadcast_ssid=0

Bedeutung

  • interface: Name der Schnittstelle.
  • driver: Der Treiber der Karte
  • ssid: Der Netzwerkname
  • hw_mode=g : Das Band welches wir nutzen.
  • channel: Der Kanal den wir nutzen
  • macaddr_acl=0: Wir wollen keine ACLs
  • ignore_broadcast_ssid=0 : Die SSID soll sichtbar sein.

DHCP und Nameserver für diese Karte

interface=wlan0
dhcp-range=192.168.1.2, 192.168.1.30, 255.255.255.0, 12h
dhcp-option=3, 192.168.1.1
dhcp-option=6, 192.168.1.1
server=8.8.8.8
log-queries
log-dhcp
listen-address=127.0.0.1

Bedeutung

  • interface: Schnittstelle
  • dhcp-range: IP Range und Ablaufzeit
  • dhcp-option=3: Gateway IP
  • dhcp-option=6: DNS Server
  • server: DNS server’s address
  • log-queries: Log the results of DNS queries handled by dnsmasq.
  • log-dhcp: Log all the options sent to DHCP clients and the tags used to determine thitt
  • listen-address: Links the DHCP to the local IP address which is 127.0.0.1.

Netzwerkarbeiten

IP Adresse an das Interface binden
  • ifconfig wlan0 up 192.168.1.1 netmask 255.255.255.0
Alles aus diesem LAN wird maskiert
  • iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
Forwarding einschalten
  • sysctl -w net.ipv4.ip_forward = 1

Wir starten den DNSMASQ

  • dnsmasq -C dnsmasq.conf -d

Links