Friday, June 2, 2023

Attacks On PDF Certification

In recent years, we have presented How to Spoof PDF Signatures and Shadow Attacks: Hiding and Replacing Content in Signed PDFs, which describe attacks on PDF signatures under various attack scenarios. The attacks focused on so-called approval signatures. However, in addition to signing PDFs, the PDF specification also specifies the certification of documents, also known as certification signatures.

To close this research gap, we performed an extensive analysis of the security of PDF certification. In doing so, we developed the Evil Annotation Attack (EAA), as well as the Sneaky Signature Attack (SSA). The attack idea exploits the flexibility of PDF certification, which allows signing or adding annotations to certified documents under different permission levels. Our practical evaluation shows that an attacker could change the visible content in 15 of 26 viewer applications by using EAA and in 8 applications using SSA by using PDF specification compliant exploits. We improved both attacks' stealthiness with applications' implementation issues and found only two applications secure to all attacks.

We responsibly disclosed all affected vendors. Together with the CERT-Bund (BSI), we supported the vendors in developing suitable countermeasures. The attacks are documented in CVE-2020-35931, CVE-2021-28545 and CVE-2021-28546.
Full results are available in our papervulnerability report and on our website.

PDF Structure and Basics

The figure on the left shows the file structure of a certified document. The first four building blocks are: header, body, xref table, and trailer. The header defines the version of the document, for example %PDF-2.0 for version 2.0. The body defines the content shown to the user after opening the file. The body contains different objects with different types. Common types are text, font, or image. There are dedicated objects that control the presentation of the PDF, such as Catalog, Pages, and Page. An example of an object is depicted in the listing below. The xref table contains the byte position of each object in the PDF. It allows PDF viewers to efficiently find all objects for processing. The trailer defines the byte position of the xref table and the root object of the PDF document's object tree. The root object is named Catalog and it is the first object to be processed, because it contains all relevant information about the document's structure.
 
 
 
 
Interactive Elements

The PDF specification additionally defines interactive elements that allow user input into the document. Such elements are separated in two categories: forms and annotations. 

Forms. PDF forms allow user input in a predefined mask, such as a text field, a radio button, or a selection box. Facilities, such as the administration, usually use forms to create PDF documents with predefined areas which are intended to be filled out by users. The user input is, however, limited to the defined form fields and cannot change other content within the PDF.

Annotations. Annotations introduce a different method for a user input by allowing a user to put remarks in a PDF document like text highlighting, strikeouts, or sticky notes. Annotations are not limited to predefined places within the PDF and can be applied everywhere within the document.

Incremental Update

An Incremental Update introduces a possibility to extend a PDF by appending new information at the end of the file, see Inc. Update 1 in the figure above. In this way, the original document stays unmodified and a revision history of all document changes is kept. Each Incremental Update defines new objects, a new xref table, and a new trailer. An example of an Incremental Update is the inclusion of an certification, signature, annotation, or the filling out forms within a PDF.

User Interface (UI) Layers

The UI in many PDF viewing applications can be divided into three layers that are important for the verification of the certification.

UI-Layer 1: Top Bar Validation Status. UI-Layer 1 is usually displayed immediately after opening. Typical applications use a clearly visible bar on top of the PDF content. The status of the certification and signatures validation is provided as a text (e.g., valid/invalid), often combined with green, blue or red background colors, cf. figures in EAA and SSA sections.
 
UI-Layer 2: Detailed Validation and Information. UI-Layer 2 provides detailed information about the certification and the signatures applied to the PDF. It can be implemented by the viewer in numerous ways, but viewers typically do not show this information automatically once the PDF file is opened. Instead, it must be opened manually by clicking a certain button. For example, this button can be placed on the topbar (UI-Layer 1). Some viewers use sidebars which provide detailed information regarding the certified document, other use popup windows.
 
UI-Layer 3: PDF Annotations. UI-Layer 3 is another UI element that shows all PDF annotations. Typically, a sidebar is used for this purpose. This layer is of particular importance for certified documents, since for some documents, adding and changing PDF annotations is allowed. Without this layer, some annotations (e.g., text blocks) would be indistinguishable from regular PDF text content.

Difference between Signed and Certified Documents


Signed Documents
By signing a PDF document, a Signature object is created. This object contains the trusted public keys to verify the document, the signature value, the range of bytes that are protected by the signature, and a userfriendly information regarding the signer of the document. The Signature object is usually added to the PDF document by using an Incremental Update.

Certified Documents
Certifications have two main differences to signatures. First, each PDF can have only one certification and must be the first in the document. Second, certifications define permissions that allow certain changes to the certified document. As depicted in the table above, certifications define a more flexible way to handle Incremental Updates, and allowed Incremental Update do not lead to a warning. The certifier chooses between three different permission levels (P) to allow different modifications.
 
P1: No modifications on the document are allowed.
P2: Filling out forms, digitally signing the document are allowed, and instantiate page templates.
P3: In addition to P2, annotations are also allowed.
 
The allowed modifications are defined within the DocMDP Transformation parameter contained in the certification object. With respect to the integrity protection of the PDF, the PDF application must execute the following steps. First, it must verify if an Incremental Update was applied after the PDF was certified. Second, it must verify if the defined changes are legitimate according to the given permissions.
 

Evil Annotation Attack (EAA)

The idea of the Evil Annotation Attack (EAA) is to show arbitrary content in a certified document by abusing annotations for this purpose. Since P3 certified document allow to add annotations, EAA breaks the integrity of the certification. 

Evaluating Permission P3. According to the specification, the following changes in a certified document with P3 are allowed: 1) adding/removing/modifying annotations, 2) fillingout forms, 3) and signing the document. We started with an in-depth analysis of all annotations and their features. We evaluated 28 different annotations and classified these with respect to their capabilities and danger level. The results are depicted in the Table on the right side and will be further explained.

Danger Level of Annotations. We determined three annotations with a danger level high capable to hide and add text and images: FreeText, Redact, and Stamp. All three can be used to stealthily modify a certified document and inject malicious content. In addition, 11 out of 28 annotations are classified as medium since an attacker can hide content within the certified document. The danger level of the remaining annotations is classified as low or none since such annotations are either quite limited or not allowed in certified documents.

Attacking with Annotations. According to our attacker model, the attacker possesses a validly certified document allowing the insertion of annotations. To execute the attack, the attacker modifies a certified document by including the annotation with the malicious content at a position of attacker's choice. Then, the attacker sends the modified file to the victim who verifies the digital signature. The victim could detect the attack if it manually opens UI-Layer 3 or clicks on the annotation. However, none of the tested PDF applications opened UI-Layer 3 automatically. Additionally, the attacker can lock an annotation to disable clicking on it.

Improving the stealthiness of EAA

To improve the attack, we elaborated techniques to prevent the annotation's visualization, so that it does not appear in UI-Layer 3. Surprisingly, we found a generic and simple bypass that can be applied to all annotations. PDF viewers identify annotations by their specified /Subtype. This /Subtype is also used by the viewer to assign the various editing tools, such as a text editor for FreeText comments. If the value of /Subtype is either missing or set to an unspecified value, whereby both cases are not prohibited according to the specification, the PDF viewer is unable to assign the annotation. As depicted in the figure below, the annotation is not listed in UI-Layer 3. In summary, the annotation is indistinguishable from the original content.
 

Special Modifications

For some annotations, such as FreeText or Stamp, the editing tools of appropriate PDF applications can be easily used to completely design the visible content of a certified document. This is not the case for other annotations, which are classified as suitable for hiding text and images. The Underline annotation, for example, only creates a small line below the selected text. For hiding the text that is located below this line, the PDF object must be manually edited. By using a text editor, the thickness of the line can be adjusted within the annotation's appearance (parameter: /N) to hide the whole text. It is also possible to define the coordinates of an annotation to hide a particular area on a page. A special feature among the annotations is Redact. It allows new text to be placed over existing text. If the user moves the mouse over the text, the new text is displayed and hides the original text. To display this new text permanently, it is sufficient to redirect the object number (parameter: /N) to the object with the new text. Summarized, the specification does not restrict the size, color or characteristics of annotations and offers arbitrary possibilities to change the displayed content.

Sneaky Signature Attack (SSA)

The idea of the Sneaky Signature Attack (SSA) is to manipulate the appearance of arbitrary content within the PDF by adding overlaying signature elements to a PDF document that is certified at level P2.

Evaluating Permission P2. According to the specification, the following changes in a certified document with P2 are allowed: filling-out forms, and signing the document. We started the analysis of forms as depicted in the table on the right side and evaluated their capabilities.

Danger Level of Forms. According to our analysis, the danger level was none because the insertion of new form elements, customizing the font size and appearance, and removing form elements is prohibited. The only permitted change is on the value stored in the field. Thus, an attacker is not able to create forms which hide arbitrary content within the PDF document. Surprisingly, these restrictions are not valid for the signature field. By inserting a signature field, the signer can define the exact position of the field, and additionally its appearance and content. This flexibility is necessary since each new signature could contain the signer's information. The information can be a graphic, a text, or a combination of both. Nevertheless, the attacker can misuse the flexibility to stealthy manipulate the document and insert new content.

Attacking with Forms: SSA. The attacker modifies a certified document by including a signature field with the malicious content at a position of attacker's choice. The attacker then needs to sign the document, but he does not need to possess a trusted key. A self-signed certificate for SSA is sufficient. The only restriction is that the attacker needs to sign the document to insert the malicious signature field. This signing information can be seen by opening the PDF document and showing detailed information of the signature validation. In this case, the victim opening the file can get suspicious and refuse to accept the document, even though the certification is valid.

Improving the stealthiness of SSA

To circumvent this limitation, we found a bypass to hide this information in UI-Layer 2. Thus, the victim is not able to determine the attacker's manipulations (see the figure on the left side). Basically, we have three tasks to improve the attack execution: 1) hide the signature information in the signature panel on UI-Layer 2 , 2) skip the validation of attacker's signature, and 3) make the signature field read-only to make it indistinguishable from the text content. To solve all tasks, we need to adjust one object – the one responsible for the appearance of the signature. It contains three relevant parameters: /P, /V, and /Ff. The /P is a reference to the page where signature should be displayed. We found out that if this reference is not valid, the signature disappears from the signature panel on UI-Layer 2, but the malicious content is still shown on the page. A signature added to a PDF document is usually verified by processing its referenced signature data. If the stored cryptographic values are correct and the document is not manipulated within the signed area, the signature is technically valid. The /V parameter references the signature value which needs to be validated. We found out that if this reference is also invalid, the signature validation is skipped. Finally, we set the parameter /Ff to 1 which means that the content is read-only. If a certified document is opened in a common PDF application, signatures can only be added to free signature fields provided by the certifier. Adding empty signature fields is normally no longer possible within the application. However, the specification does not prohibit adding empty signature fields to a certified document. By using frameworks like Apache PDFBox, empty signature fields can be placed anywhere in the document and filled with arbitrary content.

Evaluation

We evaluated all 26 PDF applications on each of the three UI-Layers against EAA and SSA attacks. We used two different types of exploits for this purpose: 1) exploits that are compliant to the PDF specification and 2) exploits that improved the stealthiness of the attacks by abusing implementation flaws, for example, by parsing errors. We have evaluated the latest (at the time of evaluation) available versions of the applications on all supported desktop platforms: Windows, macOS, and Linux. The results are depicted in the table below.


Authors of this Post

Simon Rohlmann 
Vladislav Mladenov
Christian Mainka
Jörg Schwenk

Acknowledgments

Many thanks to the CERT-Bund (BSI) team for the great support during the responsible disclosure. We also want to acknowledge the teams of the vendors which reacted to our report and fixed the vulnerable implementations.



More information


  1. Hacker Tools For Windows
  2. Pentest Tools For Android
  3. Pentest Tools Find Subdomains
  4. Pentest Tools Online
  5. Hacker Security Tools
  6. Hacking App
  7. Pentest Tools List
  8. Pentest Recon Tools
  9. Pentest Tools Url Fuzzer
  10. Pentest Tools Review
  11. What Are Hacking Tools
  12. Hacker Tools For Ios
  13. Pentest Tools Open Source
  14. Hacker Security Tools
  15. Hacker Tools List
  16. Hacking Tools Hardware
  17. Pentest Tools Apk
  18. Nsa Hack Tools
  19. Hacking Tools For Kali Linux
  20. New Hack Tools
  21. Hacker Tools Free Download
  22. Hacker Tool Kit
  23. Hacking Tools Software
  24. Pentest Reporting Tools
  25. Tools Used For Hacking
  26. Hacks And Tools
  27. What Is Hacking Tools
  28. Hack Rom Tools
  29. Hacking Tools Hardware
  30. Hacker Tools Software
  31. Hacker Tools
  32. Hacker Tools Free
  33. Hacking Tools Windows 10
  34. Hacking Tools Usb
  35. Hacking Tools 2020
  36. Usb Pentest Tools
  37. Pentest Recon Tools
  38. Hacker
  39. Hack Tools
  40. Hacking App
  41. Hacking Tools For Windows 7
  42. Android Hack Tools Github
  43. Pentest Tools Online
  44. Hacker Tools 2020
  45. Pentest Tools Find Subdomains
  46. Hacking Tools For Mac
  47. Nsa Hacker Tools
  48. Pentest Tools Framework
  49. Computer Hacker
  50. Hacking Tools Hardware
  51. Hackrf Tools
  52. Termux Hacking Tools 2019
  53. Hacking Tools And Software
  54. Nsa Hacker Tools
  55. Hacker Tools 2019
  56. Pentest Tools Apk
  57. Hack Website Online Tool
  58. Termux Hacking Tools 2019
  59. Blackhat Hacker Tools
  60. Growth Hacker Tools
  61. Pentest Tools Subdomain
  62. Hacking Tools Software
  63. Android Hack Tools Github
  64. Computer Hacker
  65. Hacking Tools Hardware
  66. Hacking Tools Free Download
  67. Hack Tools For Pc
  68. Hacking Tools 2020
  69. Hack Tools Mac
  70. Hacking Tools Software
  71. Pentest Tools Subdomain
  72. Hacker Tools Apk
  73. How To Hack
  74. Hacking Tools Online
  75. Hack Tools Pc
  76. Pentest Tools Url Fuzzer
  77. Hack Tools 2019
  78. Nsa Hack Tools
  79. Best Pentesting Tools 2018
  80. Pentest Tools Android
  81. Pentest Tools
  82. Hacking Tools For Pc
  83. Hacker Tools Online
  84. Pentest Tools Windows
  85. Hack Tools Mac
  86. Hacking Tools Software
  87. Install Pentest Tools Ubuntu
  88. Easy Hack Tools
  89. Hacker Tools For Ios
  90. Hacker Tools For Mac
  91. Beginner Hacker Tools
  92. Nsa Hack Tools
  93. Nsa Hacker Tools
  94. Hacker Tools 2019
  95. Pentest Tools For Ubuntu
  96. Hacker Tools Apk Download
  97. Hak5 Tools
  98. Hacking Tools Online
  99. Hacking Tools For Games
  100. Hacker Tools Software
  101. Hacking Tools Github
  102. Hacking Tools Hardware
  103. Pentest Tools Port Scanner
  104. Hacker Security Tools

Thursday, June 1, 2023

Top Linux Commands Related To Hardware With Descriptive Definitions


Commands in Linux are just the keys to explore and close the Linux. As you can do things manually by simple clicking over the programs just like windows to open an applications. But if you don't have any idea about commands of Linux and definitely you also don't know about the Linux terminal. You cannot explore Linux deeply. Because terminal is the brain of the Linux and you can do everything by using Linux terminal in any Linux distribution. So, if you wanna work over the Linux distro then you should know about the commands as well. In this blog you will exactly get the content about Linux hardware commands which are related to CPU and memory processes.

dmesg

The dmesg command is used in Linux distribution for the sake of detecting hardware and boot messages in the Linux system.

cat /proc/cpuinfo

The cat command is basically used to read something over the terminal like cat index.py will display all the content which exist in index.py over the terminal. So cat /proc/cpuinfo will display the model of the CPU over the terminal.

cat /proc/meminfo

This command is similar to the above command but the only difference is that this command shows the information of hardware memory over the terminal. Because it will open the memory info file over the terminal.

cat /proc/interrupts

This command is also similar to the above command but there is the difference of one thing that this command will display lists the number of interrupts per CPU per input output device.

lshw

This command is used in Linux operating system to displays information on hardware configuration of the system in Linux.

lsblk

The "lsblk" command is used in Linux operating system to displays block device related information in the Linux operating system.

dmidecode

The "dmidecode" command is used in Linux distributions to display the information about hardware from the BIOS.

hdparm -i /dev/sda

The hdparm command basically used to display the information about the disks available in the system. If you wanna know the information about the "sda" disk so just type "hdparm -i /dev/sda" and if you wanna know the information about "sdb" so just type "hdparm -i /dev/sdb".

hdparm -tT

The "hdparm" command is used for displaying the information about disks as we discussed in above command. If you wanna do a read speed test on the disk sda or sdb just type the command "hdparm -tT /dev/sda".

badblocks -s /dev/sda

This command is used in linux to display test operations for unreadable blocks on disk sda. If the command is like "badblocks -s /dev/sdb" it will display test operations for unreadable blocks on disk sdb.
Read more

eCPTX - Advanced Penetration Testing

 


The eCPTX - Advanced Penetration Testing course from the popular eLearnSecurity Institute and INE is Advanced Penetration Testing. Prerequisites for this course Completion of eJPT and eCPPTv2 Is. The eCPTX course is one of the most popular and difficult courses in the field of penetration testing. This course has four sections including 1. Preparing for attacks | 2. Test the penetration of Active Directory Red Teaming and 3. Red Teaming on important infrastructures | 4. Evasion or bypassing techniques. In this course you will gain a deep understanding of the Red Team, Backdoor, client-side exploitation, build personalized Payloads, Active Directory penetration testing, Evasion techniques of defense tools such as anti Viruses or IDS / IPS, complete scrutiny of the target to find misconfigurations and weaknesses, as well as covert operations and stability. The eLearnSecurity Institute Roadmap is included in the High Quality Images section.


Course pre requisites

  • EJPT  course
  • ECPPTv2 course 
  • Course specifications
  • Course level: Advanced
  • Time: 7 hours and 57 minutes
  • Includes: ‌ 9 videos | 8 labs | ‌ 7 slides
  • Professor: Andres Doreste
  • ECPTX Course Content - Advanced Penetration Testing
  • Preparing the Attack
  • Social Engineering Attack Vectors
  • Red Teaming Active Directory
  • Advanced Active Directory Reconnaissance & Enumeration
  • Red Teaming Active Directory
  • Red Teaming Critical Domain Infrastructure
  • Red Teaming MS SQL Server
  • Red Teaming Exchange
  • Red Teaming WSUS
  • Evasion
  • Defense Evasion


Link do Download

Related news
  1. Hacker Tools Online
  2. Hacking Tools Download
  3. Hacking Tools Mac
  4. Hack Tools Github
  5. Black Hat Hacker Tools
  6. Pentest Tools Bluekeep
  7. Pentest Tools Find Subdomains
  8. Hacking Tools Free Download
  9. Hacking Tools Mac
  10. Tools For Hacker
  11. Hacker
  12. Hacker Tools List
  13. New Hacker Tools
  14. Tools 4 Hack
  15. Hacker Tools 2019
  16. Pentest Tools Review
  17. Pentest Tools Nmap
  18. Nsa Hacker Tools
  19. Bluetooth Hacking Tools Kali
  20. Hacking Tools Hardware
  21. Hacker Tools Hardware
  22. Hacking Tools For Games
  23. Best Hacking Tools 2020
  24. Hack Tools For Windows
  25. Hacker Tools For Mac
  26. Blackhat Hacker Tools
  27. Hacking Tools For Kali Linux
  28. Pentest Tools List
  29. Pentest Tools For Windows
  30. Hacker Tools Apk Download
  31. Hacker
  32. Hack Website Online Tool
  33. Hacking Tools For Pc
  34. Hacker Tools List
  35. Hacker Tools
  36. Pentest Tools Open Source
  37. Best Pentesting Tools 2018
  38. Pentest Tools Linux
  39. Hacker Tools Windows
  40. Bluetooth Hacking Tools Kali
  41. Pentest Tools
  42. Hacking Tools For Kali Linux
  43. Hacker Tools Mac
  44. Hacker Tools List
  45. Hack Tools For Windows
  46. Hacking Tools For Windows 7
  47. Hack Tools Online
  48. Pentest Tools For Android
  49. Hacking Apps
  50. How To Hack
  51. Beginner Hacker Tools
  52. Hacking Tools Windows
  53. Hacker Tools Mac
  54. World No 1 Hacker Software
  55. Hacker Tools Free Download
  56. Hacker Tools For Pc
  57. Bluetooth Hacking Tools Kali
  58. Hacking Tools For Mac
  59. New Hacker Tools
  60. Pentest Tools
  61. Bluetooth Hacking Tools Kali
  62. Hacker Tools For Mac
  63. Hack Tools Online
  64. Hacking Tools Download
  65. Hacker Tools Online
  66. Hacker Tools
  67. Install Pentest Tools Ubuntu
  68. Hacker Tools Hardware
  69. Pentest Recon Tools
  70. Tools 4 Hack
  71. Hacker Tools Apk Download
  72. Hacking Tools
  73. Easy Hack Tools
  74. Hack Tool Apk No Root
  75. Pentest Tools
  76. Hacker Tools 2020
  77. Pentest Tools Open Source
  78. Hacking Tools For Pc
  79. What Are Hacking Tools
  80. What Is Hacking Tools
  81. How To Hack
  82. Pentest Tools Port Scanner
  83. Hack Tools
  84. Growth Hacker Tools
  85. Android Hack Tools Github
  86. Best Hacking Tools 2019
  87. Hacking Tools For Beginners
  88. Hacking Tools And Software
  89. Pentest Reporting Tools
  90. Hacker Tools Hardware
  91. New Hacker Tools
  92. Hacker Techniques Tools And Incident Handling
  93. Android Hack Tools Github
  94. Hack Website Online Tool
  95. Hacking Tools For Kali Linux
  96. Nsa Hack Tools Download
  97. Pentest Box Tools Download
  98. Blackhat Hacker Tools
  99. Pentest Tools Website
  100. Pentest Tools Url Fuzzer
  101. Hacker Tools Software
  102. Hacker Tools Github
  103. Tools For Hacker
  104. Hacking Tools For Pc
  105. Hacking Tools Free Download
  106. Pentest Tools Windows
  107. How To Install Pentest Tools In Ubuntu
  108. Pentest Tools For Ubuntu
  109. Hacking Tools Hardware
  110. Kik Hack Tools
  111. Hacker Tools Free
  112. Ethical Hacker Tools
  113. Hack Tool Apk
  114. Pentest Tools For Android
  115. Pentest Tools Website
  116. Hacking Tools Pc
  117. Best Hacking Tools 2020
  118. Hack Tools
  119. Bluetooth Hacking Tools Kali
  120. Pentest Box Tools Download
  121. Hacker Tools 2019
  122. Hacks And Tools
  123. Hack Tools
  124. How To Hack
  125. Pentest Tools For Ubuntu
  126. Nsa Hack Tools Download
  127. Hacker Tools Hardware
  128. Hacker Tools Software
  129. Hack Tools For Pc
  130. Hacker
  131. Hacker Tools Free
  132. Hacking Tools For Windows
  133. Hacker Tools 2020
  134. New Hacker Tools
  135. Pentest Tools Nmap
  136. Hack Apps
  137. Hacking Tools For Games
  138. Bluetooth Hacking Tools Kali
  139. Pentest Tools Free
  140. Hacker Tools Apk Download
  141. Hack Tools
  142. Hack Tools For Games
  143. Pentest Tools Framework
  144. Hacking Tools Github
  145. Termux Hacking Tools 2019
  146. Hack Tools For Pc
  147. Hacker Tools For Pc
  148. Hack Website Online Tool
  149. Hack Tools
  150. Kik Hack Tools
  151. Physical Pentest Tools
  152. Pentest Tools
  153. Hacking Tools Pc
  154. Hack Tools
  155. Pentest Tools Kali Linux
  156. Hacking Tools For Games
  157. Hacking App
  158. Best Hacking Tools 2019
  159. Pentest Tools Windows
  160. Best Hacking Tools 2020
  161. Hacker Tools
  162. Hacking Tools Windows

Learning Web Pentesting With DVWA Part 1: Installation



In this tutorial series I'm going to walk you through the damn vulnerable web application (DVWA) which is damn vulnerable. Its main goal according to the creators is "to aid security professionals to test thier skills and tools in a legal environment, help web developers better understand the process of securing web applications and to aid both students & teachers to learn about web application security in a controlled class room environment."

I am going to install DVWA in docker so the prerequisite for this tutorial will be an installation of docker (Docker is not the only way to install DVWA but if you have docker already installed then it may be the easiest way to install DVWA).

To install DVWA in docker run your docker deamon if it's not running already and open a terminal or powershell and type:

docker rum --rm -it -p 8080:80 vulnerables/web-dvwa




It will take some time to pull the image from docker hub depending on your internet speed and after it is complete it will start the dvwa application. In the command we have mapped the image instance's port 80 to our hosts port 8080 so we should be able to access the web application from our host at http://localhost:8080

Now open your favorite web browser and go to http://localhost:8080
You should be prompted with a login screen like this:



login with these creds:
username: admin
password: password

After login you'll see a database setup page since this is our first run. Click on Create / Reset Database button at the bottom. It will setup database and redirect you to login page. Now login again and you'll see a welcome page.



Now click on DVWA Security link at the bottom of the page navigation and make sure the security level is set to Low. If it is not click on the dropdown, select Low and then click submit.




Now our setup is complete, so lets try a simple SQL attack to get a taste of whats about to come.

Click on SQL Injection in navigation menu.
You'll be presented with a small form which accepts User ID.
Enter a single quote (') in the User ID input field and click Submit.
You'll see an SQL error like this:



From the error message we can determine that the server has a MariaDB database and we can see the point of injection.
Since there are many quotes we are not able to determine the exact location of our injection. Lets add some text after our single quote to see exactly where our injection point is.
Now I am going to enter 'khan in the User ID field and click Submit.



Now we can see exactly where the point of injection is. Determining the point of injection is very important for a successful SQL injection and is sometimes very hard too, though it might not be that much useful here in this exercise.

Now lets try the very basic SQL Injection attack.
In the User ID field enter ' or 1=1-- - and click Submit.



We will explain what is going on here in the next article.


References:-
1. DVWA Official Website: http://www.dvwa.co.uk/
More information