User Tools

Site Tools


security

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
security [2022/10/07 08:59] jotasandokusecurity [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 **NETCAT (NC) NC NOTES** **NETCAT (NC) NC NOTES**
 +  # for tcp  
   nc -kl {port}    # for the host to listen on the specified port   nc -kl {port}    # for the host to listen on the specified port
-  nc -v 192.168.2.119 37657 <-- Alternatively we can use telnet 192.168.2.119 37657+  nc -zv 19.168.2.119 37657 <-- Alternatively we can use telnet 192.168.2.119 37657
   nc -z -v -w1 google.es 443   nc -z -v -w1 google.es 443
 +  # for udp. You need to type some text and see if it appears on the receiver
 +  nc -luk 192.168.0.112 7777    # listens on UDP
 +  nc -uv 192.168.0.112 7777    # opens terminal so we can send datagrams
 +  while true; do dd if=/dev/urandom bs=1400 | pv -L 10M | nc 10.80.8.1 4444; done    # to generate traffic. We can omit the pv bit 
      
      
Line 17: Line 22:
   nmap -O 192.168.2.1 <-- To determine the OS (this uses stack fingerprint!. No really open ports are required)   nmap -O 192.168.2.1 <-- To determine the OS (this uses stack fingerprint!. No really open ports are required)
   nmap -vv host.target.com    # port scan   nmap -vv host.target.com    # port scan
-  nmap -sP 10.0.0.0/24 # will scan the 256 hosts +  nmap -sP 10.0.0.0/24 # will scan the 256 hosts for reachability 
 +  nmap <IP>    # scan for open ports
      
 SCRIPTS: SCRIPTS:
Line 41: Line 47:
 ---- ----
 HPING NOTES: HPING NOTES:
-[[https://ravi73079.medium.com/attacks-to-be-performed-using-hping3-packet-crafting-98bc25584745]] +[[https://ravi73079.medium.com/attacks-to-be-performed-using-hping3-packet-crafting-98bc25584745]] ; For all flags check [[https://www.kali.org/tools/hping3/|this]]
-\\+
   hping3 --help   hping3 --help
   hping3 -c 15000 --icmp --flood --rand-source 192.168.100.3    # classical icmp flood   hping3 -c 15000 --icmp --flood --rand-source 192.168.100.3    # classical icmp flood
-  hping3 -c 15000 -d 120 -S -w 64 -p 80 --flood --rand-source 192.168.100.3  # big flood p80  based+  hping3 -c 15000 -d 120 -S -w 64 -p 80 --flood --rand-source 192.168.100.3  # big flood p80  based. We can set the rate by removing 'flood' and doing '-i u1000' 
 +  hping3  --fast  -d 0 -L 0 -S -w 64 -p 80  10.68.0.2    # note d 0 is payload (then + 20B TCP + 20B IP)
   hping3 -S -p 443 -c 3 google.com    # RTT for (web) sites where icpm is filtered (-S is just to set SYN flag)   hping3 -S -p 443 -c 3 google.com    # RTT for (web) sites where icpm is filtered (-S is just to set SYN flag)
   # volumetric attacks   # volumetric attacks
   hping3 --flood --spoof <spoofed-ip> --udp -p 53 <victim-ip>    hping3 --flood --spoof <spoofed-ip> --udp -p 53 <victim-ip> 
   hping3 --syn --flood <spoofed-ip> --udp -p 53 <victim-ip>    # SYN attack   hping3 --syn --flood <spoofed-ip> --udp -p 53 <victim-ip>    # SYN attack
 +  hping3 -c 15000 -d 120 -S -w 64 -p 80 --flood --rand-source # SYN-flood (datagram 120B)
      
  
security.1665133188.txt.gz · Last modified: (external edit)