You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -352,6 +355,9 @@ eth1.250 Link encap:Ethernet HWaddr 00:0e:c6:f0:29:65
352
355
root@kali:~# arp-scan -I eth1.250 10.121.5.0/24
353
356
```
354
357
358
+
</details>
359
+
360
+
355
361
```bash
356
362
# Another configuration example
357
363
modprobe 8021q
@@ -691,15 +697,22 @@ set dns.spoof.hosts ./dns.spoof.hosts; dns.spoof on
691
697
**Configure own DNS with dnsmasq**
692
698
693
699
```bash
694
-
apt-get install dnsmasqecho "addn-hosts=dnsmasq.hosts"> dnsmasq.conf #Create dnsmasq.confecho "127.0.0.1 domain.example.com" > dnsmasq.hosts #Domains in dnsmasq.hosts will be the domains resolved by the Dsudo dnsmasq -C dnsmasq.conf --no-daemon
700
+
apt-get install dnsmasq
701
+
echo"addn-hosts=dnsmasq.hosts"> dnsmasq.conf
702
+
echo"127.0.0.1 domain.example.com"> dnsmasq.hosts
703
+
sudo dnsmasq -C dnsmasq.conf --no-daemon
695
704
dig @localhost domain.example.com # Test the configured DNS
696
705
```
697
706
707
+
698
708
### Local Gateways
699
709
700
710
Multiple routes to systems and networks often exist. Upon building a list of MAC addresses within the local network, use _gateway-finder.py_ to identify hosts that support IPv4 forwarding.
[+] We can reach TCP port 80 on 209.85.227.99 via 00:13:72:09:AD:76 [10.0.0.100]
718
731
```
719
732
733
+
</details>
734
+
735
+
720
736
### [Spoofing LLMNR, NBT-NS, and mDNS](spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md)
721
737
722
738
For local host resolution when DNS lookups are unsuccessful, Microsoft systems rely on **Link-Local Multicast Name Resolution (LLMNR)** and the **NetBIOS Name Service (NBT-NS)**. Similarly, **Apple Bonjour** and **Linux zero-configuration** implementations utilize **Multicast DNS (mDNS)** for discovering systems within a network. Due to the unauthenticated nature of these protocols and their operation over UDP, broadcasting messages, they can be exploited by attackers aiming to redirect users to malicious services.
@@ -796,7 +812,7 @@ Note that in order to perform this attack the victim has to try to access initia
796
812
797
813
More info [here](https://www.bettercap.org/legacy/#hsts-bypass), [here](https://www.slideshare.net/Fatuo__/offensive-exploiting-dns-servers-changes-blackhat-asia-2014) and [here](https://security.stackexchange.com/questions/91092/how-does-bypassing-hsts-with-sslstrip-work-exactly).
798
814
799
-
**sslStrip or sslStrip+ doesn;t work anymore. This is because there are HSTS rules presaved in the browsers, so even if it's the first time that a user access an "important" domain he will access it via HTTPS. Also, notice that the presaved rules and other generated rules can use the flag**[**`includeSubdomains`**](https://hstspreload.appspot.com)**so the**_**wwww.facebook.com**_**example from before won't work anymore as**_**facebook.com**_**uses HSTS with `includeSubdomains`.**
815
+
**sslStrip or sslStrip+ doesn't work anymore. This is because there are HSTS rules presaved in the browsers, so even if it's the first time that a user access an "important" domain he will access it via HTTPS. Also, notice that the presaved rules and other generated rules can use the flag**[**`includeSubdomains`**](https://hstspreload.appspot.com)**so the**_**wwww.facebook.com**_**example from before won't work anymore as**_**facebook.com**_**uses HSTS with `includeSubdomains`.**
800
816
801
817
TODO: easy-creds, evilgrade, metasploit, factory
802
818
@@ -840,6 +856,9 @@ Other things to test is to try to sign the certificate with a valid certificate
840
856
841
857
## Bettercap
842
858
859
+
<details>
860
+
<summary>Common Bettercap commands</summary>
861
+
843
862
```bash
844
863
# Events
845
864
events.stream off #Stop showing events
@@ -866,6 +885,9 @@ set wifi.ap.encryption false #If true, WPA2
866
885
wifi.recon on; wifi.ap
867
886
```
868
887
888
+
</details>
889
+
890
+
869
891
### Active Discovery Notes
870
892
871
893
Take into account that when a UDP packet is sent to a device that do not have the requested port an ICMP (Port Unreachable) is sent.
@@ -897,6 +919,70 @@ Bettercap broadcast SSDP packets searching for all kind of services (UDP Port 19
897
919
Bettercap broadcast WSD packets searching for services (UDP Port 3702).
-CVE-2023-40129 (Fluoride GATT): integer underflow in Read Multiple Variable response builder can cause ~64KB heap overflow when MTU truncates a variable-length element but the +2 length field is not accounted for.
943
+
944
+
<details>
945
+
<summary>Root cause (GATT Read Multiple Variable)</summary>
if (!is_overflow) p += len; p_buf->len += len; if (is_overflow) break;
966
+
}
967
+
}
968
+
}
969
+
```
970
+
971
+
- On variable-length entries, the overflow path subtracts only (total_len - mtu), ignoring the +2 length field, so len underflows (e.g., 0xFFFE) and memcpy writes ~64KB past the end of the buffer.
972
+
</details>
973
+
974
+
- Minimal unauthenticated trigger (small MTU forces underflow on the 4th attribute):
-**Network Security Assessment: Know Your Network (3rd edition)**
911
997
-**Practical IoT Hacking: The Definitive Guide to Attacking the Internet of Things. By Fotios Chantzis, Ioannis Stais, Paulino Calderon, Evangelos Deirmentzoglou, Beau Wood**
0 commit comments