Author Topic: siege  (Read 1715 times)

berghem

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • http://lorenzistefano.com
on: February 12, 2012, 09:34:37 AM
Stavo provando questo tool, ma purtroppo in rete trovo poco.
Ad ogni modo, sto provando a fare degli stress test su una macchina virtuale che ho con la web application (dvwa applicazione open bacata).
ho impostato nel file di configurazione di siege user name e password, poi ho preparato un file di url fatto cosi

Code: [Select]
http:/192.168.56.101/dvwa
http://192.168.56.101/dvwa/login.php
http://192.168.56.101/dvwa/vulnerabilities/csrf/
http://192.168.56.101/dvwa/vulnerabilities/brute/
http://192.168.56.101/dvwa/vulnerabilities/exec/
http://192.168.56.101/dvwa/vulnerabilities/sqli/
http://192.168.56.101/dvwa/vulnerabilities/sqli_blind/
http://192.168.56.101/dvwa/vulnerabilities/upload/
http://192.168.56.101/dvwa/vulnerabilities/fi/?page=include.php
http://192.168.56.101/dvwa/vulnerabilities/xss_r/
http://192.168.56.101/dvwa/vulnerabilities/xss_s/
http://192.168.56.101/dvwa/security.php

infine lancio il comando
Code: [Select]
siege -d10 -c50 -i -f /home/stefano/url.txt
ma purtroppo continuo a ricevere dal server messaggi 302 e 400.
Credo che il problema sia il login, infatti, se dal browser mi loggo manulmente, poi copio e incollo i link postati sopra, la pagina si apre. Sempre dal browser, senza loggarmi, se incollo un link (diverso dalla pagina di login), non mi apre la pagina, e sniffando il traffico con wireshark, vedo il messaggio 302.
La domanda è, come faccio, a fare il login permanente a siege? il comando -c indica che simulo 50 utenti, ma forse gli dovrei dire che prima l'utente si logga, poi stressa le pagine....


 


berghem

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • http://lorenzistefano.com
Reply #1 on: February 12, 2012, 10:06:41 AM
rileggendo l'help di siege c'è scritto
Code: [Select]
# WWW-Authenticate username and password.  When siege
# hits a webpage that requires authentication, it will
# send this user name and password to the server.  Note
# this is NOT form based authentication.  You will have
# to construct URLs for that.
# ex: username = jdfulmer
#     password = whoohoo
#
# username =
# password =

quindi mi pare di capire che devo settare l'url in maniera corretta. Ho sniffato il traffico mentre mi loggavo, e ovviamente viene mandata una POST
Code: [Select]
POST /dvwa/login.php HTTP/1.1
Host: 192.168.56.101
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://192.168.56.101/dvwa/login.php
Cookie: security=high; PHPSESSID=tpcj1onsun1ok8vacpuf3mo6k7
Content-Type: application/x-www-form-urlencoded
Content-Length: 44

username=admin&password=password&Login=Login

continua a non essermi chiaro come autenticarmi con siege...


berghem

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • http://lorenzistefano.com
Reply #2 on: February 12, 2012, 10:36:47 AM
Ci sono quasi...
sempre dal file di configurazione
Code: [Select]
# Login URL. This is the first URL to be hit by every siege
# client. This feature was designed to allow you to login to
# a server and establish a session. It will only be hit once
# so if you need to hit this URL more then once, make sure it
# also appears in your urls.txt file.
#
# ex: login-url = http://eos.haha.com/login.jsp POST name=jeff&pass=foo
#
# Siege versions after 2.69 support multi logins; you can configure
# them with multiple login-url directives. Place each one on a separate
# line. Siege loops through each login then starts again at the beginning
# after it uses the last one. If you have more users than login-urls, then
# siege starts reassigning ones that have already been used.
#
# ex: login-url = http://www.haha.com/login.php?name=homer&pass=whoohoo
#     login-url = http://www.haha.com/login.php?name=marge&pass=ohhomie
#     login-url = http://www.haha.com/login.php?name=bart&pass=eatMyShorts

ma se da browser metto
http://192.168.56.101/dvwa/login.php?username=admin&password=password&Login=Login
come da sniffata postata sopra, non si logga...