Thursday, October 6, 2011

Introduction of XSSer (An automated tool for XSS)

Hey guys, today we will learn some cool tricks of XSS attacks. First we need to know about XSS.

XSS: 


Cross Site Scripting (XSS), it is a type of web application attack that enables attackers to inject client-side script into Web pages viewed by other users. The concept of XSS is to manipulate client-side scripts of a web application to execute in the manner desired by the malicious user. Such a manipulation can embed a script in a page which can be executed every time the page is loaded, or whenever an associated event is performed.

There are many scripts available to test the XSS in any website. You can also get the cheat sheet of XSS from here.

But we are here to learn about XSSer tool to test the XSS with advance skills.

Here is the information:


Cross Site "Scripter" is an automatic -framework- to detect, exploit and report XSS vulnerabilities in web-based aplications.It contains several options to try to bypass certain filters, and various special techniques of code injection.



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, --verboseverbose (default: no)
--gtklaunch XSSer GTK Interface

*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, ask, 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 select multiple:

--cookie=COOKIEChange your HTTP Cookie header
--user-agent=AGENTChange your HTTP User-Agent header (default SPOOFED)
--referer=REFERERUse another HTTP Referer header (default NONE)
--headers=HEADERSExtra HTTP headers newline separated
--auth-type=ATYPEHTTP Authentication type (value Basic or Digest)
--auth-cred=ACREDHTTP Authentication credentials (value name:password)
--proxy=PROXYUse proxy server (tor: http://localhost:8118)
--timeout=TIMEOUTSelect your Timeout (default 30)
--delay=DELAYDelay in seconds between each HTTP request (default 8)
--threads=THREADSMaximum number of concurrent HTTP requests (default 5)
--retries=RETRIESRetries when the connection timeouts (default 3)

*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

*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 select 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!)

*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)
--publishoutput 'positives' to Social Networks (identi.ca)
--short=SHORTURLSdisplay -final code- shortered (tinyurl, is.gd)
--launchlaunch a browser at the end with each XSS discovered





I know that some people won't understand this...for them, I have an another post.

"Examples of XSSER"
 

The Hacker News