Advertisement
Stybyk

RandomFirewall

Mar 30th, 2019
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.44 KB | None | 0 0
  1. #!/bin/bash
  2. counter=1
  3. sudo ip6tables -F
  4. while [ $counter -le 2000 ]
  5. do
  6. NEW_STRING=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 20 | head -n 1)
  7.  
  8. sudo ip6tables -I FORWARD $counter -p tcp --dport 80  -m string --string $NEW_STRING --algo bm -j REJECT --reject-with tcp-reset
  9. ((counter++))
  10. done
  11.  
  12.  sudo ip6tables -I FORWARD $((counter+1)) -p tcp --dport 80  -m string --string "admin%27+or+%271%27%3D%27" --algo bm -j LOG --log-prefix "SQL-injection8"
  13.  
  14.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80 -m string --string "admin%27+or+%271%27%3D%27" --algo bm -j REJECT --reject-with tcp-reset
  15.  
  16.  
  17.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27or+1%3D1+or+%27%27%3D%27" --algo bm -j LOG --log-prefix "SQL-injection12"
  18.  
  19.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27or+1%3D1+or+%27%27%3D%27" --algo bm -j REJECT --reject-with tcp-reset
  20.  
  21.  
  22.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27+or+1%3D1" --algo bm -j LOG --log-prefix "SQL-injection13"
  23.  
  24.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27+or+1%3D1" --algo bm -j REJECT --reject-with tcp-reset
  25.  
  26.  
  27.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27%29+or+%28%271%27%3D%271" --algo bm -j LOG --log-prefix "SQL-injection17"
  28.  
  29.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27%29+or+%28%271%27%3D%271" --algo bm -j REJECT --reject-with tcp-reset
  30.  
  31.  
  32.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27%29+or+%271%27%3D%271" --algo bm -j LOG --log-prefix "SQL-injection21"
  33.  
  34.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%27%29+or+%271%27%3D%271" --algo bm -j REJECT --reject-with tcp-reset
  35.  
  36.  
  37.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22+or+%221%22%3D%221" --algo bm -j LOG --log-prefix "SQL-injection29"
  38.  
  39.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22+or+%221%22%3D%221" --algo bm -j REJECT --reject-with tcp-reset
  40.  
  41.  
  42.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22or+1%3D1+or+%22%22%3D%22" --algo bm -j LOG --log-prefix "SQL-injection33"
  43.  
  44.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22or+1%3D1+or+%22%22%3D%22" --algo bm -j REJECT --reject-with tcp-reset
  45.  
  46.  
  47.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22%29+or+%28%221%22%3D%221" --algo bm -j LOG --log-prefix "SQL-injection37"
  48.  
  49.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "admin%22%29+or+%28%221%22%3D%221" --algo bm -j REJECT --reject-with tcp-reset
  50.  
  51.  
  52.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "UNION%2BSELECT" --algo bm -j LOG --log-prefix "SQL-ID5930"
  53.  
  54.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "UNION%2BSELECT" --algo bm -j REJECT --reject-with tcp-reset
  55.  
  56.  
  57.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "%2B%29SELECT%2B*%2BFROM%2B" --algo bm -j LOG --log-prefix "SQL-ID5930"
  58.  
  59.  sudo ip6tables -I FORWARD $((counter++)) -p tcp --dport 80  -m string --string "%2B%29SELECT%2B*%2BFROM%2B" --algo bm -j REJECT --reject-with tcp-reset
  60.  
  61. echo All done
  62. sudo ip6tables -L
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement