Video - Installing w3af in Kali Linux Using Docker

12 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€96.05
List Price:  €134.47
You save:  €38.42
£78.28
List Price:  £109.60
You save:  £31.31
CA$143.28
List Price:  CA$200.59
You save:  CA$57.31
A$160.13
List Price:  A$224.20
You save:  A$64.06
S$135.03
List Price:  S$189.05
You save:  S$54.02
HK$777
List Price:  HK$1,087.84
You save:  HK$310.83
CHF 88.49
List Price:  CHF 123.89
You save:  CHF 35.40
NOK kr1,126.80
List Price:  NOK kr1,577.57
You save:  NOK kr450.76
DKK kr717.22
List Price:  DKK kr1,004.14
You save:  DKK kr286.92
NZ$176.87
List Price:  NZ$247.63
You save:  NZ$70.75
د.إ367.26
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,929.84
List Price:  ৳16,702.26
You save:  ৳4,772.41
₹8,538.94
List Price:  ₹11,954.85
You save:  ₹3,415.91
RM448.65
List Price:  RM628.13
You save:  RM179.48
₦154,544.52
List Price:  ₦216,368.52
You save:  ₦61,823.99
₨27,792.76
List Price:  ₨38,910.97
You save:  ₨11,118.21
฿3,416.65
List Price:  ฿4,783.45
You save:  ฿1,366.80
₺3,519.17
List Price:  ₺4,926.99
You save:  ₺1,407.81
B$637.56
List Price:  B$892.61
You save:  B$255.05
R1,874.85
List Price:  R2,624.87
You save:  R750.01
Лв188
List Price:  Лв263.20
You save:  Лв75.20
₩145,711.39
List Price:  ₩204,001.77
You save:  ₩58,290.38
₪364.90
List Price:  ₪510.87
You save:  ₪145.97
₱5,865.41
List Price:  ₱8,211.81
You save:  ₱2,346.40
¥15,715.92
List Price:  ¥22,002.92
You save:  ¥6,286.99
MX$2,016.21
List Price:  MX$2,822.78
You save:  MX$806.56
QR363.08
List Price:  QR508.32
You save:  QR145.24
P1,386.50
List Price:  P1,941.15
You save:  P554.65
KSh12,902.70
List Price:  KSh18,064.30
You save:  KSh5,161.60
E£5,082.90
List Price:  E£7,116.27
You save:  E£2,033.36
ብር12,710.92
List Price:  ብር17,795.80
You save:  ብር5,084.87
Kz91,190.88
List Price:  Kz127,670.88
You save:  Kz36,480
CLP$98,919.10
List Price:  CLP$138,490.70
You save:  CLP$39,571.60
CN¥729.82
List Price:  CN¥1,021.78
You save:  CN¥291.96
RD$6,081.12
List Price:  RD$8,513.82
You save:  RD$2,432.69
DA13,508.78
List Price:  DA18,912.83
You save:  DA5,404.05
FJ$231.84
List Price:  FJ$324.58
You save:  FJ$92.74
Q768.97
List Price:  Q1,076.59
You save:  Q307.62
GY$20,886.35
List Price:  GY$29,241.72
You save:  GY$8,355.37
ISK kr13,953.60
List Price:  ISK kr19,535.60
You save:  ISK kr5,582
DH1,006.73
List Price:  DH1,409.47
You save:  DH402.73
L1,841.91
List Price:  L2,578.75
You save:  L736.83
ден5,908.74
List Price:  ден8,272.47
You save:  ден2,363.73
MOP$798.63
List Price:  MOP$1,118.11
You save:  MOP$319.48
N$1,856.28
List Price:  N$2,598.86
You save:  N$742.58
C$3,673.45
List Price:  C$5,142.98
You save:  C$1,469.52
रु13,596.38
List Price:  रु19,035.48
You save:  रु5,439.09
S/371.74
List Price:  S/520.45
You save:  S/148.71
K405.18
List Price:  K567.27
You save:  K162.09
SAR375.47
List Price:  SAR525.68
You save:  SAR150.20
ZK2,762.82
List Price:  ZK3,868.06
You save:  ZK1,105.23
L478.38
List Price:  L669.75
You save:  L191.37
Kč2,417.95
List Price:  Kč3,385.23
You save:  Kč967.27
Ft39,478.73
List Price:  Ft55,271.81
You save:  Ft15,793.07
SEK kr1,088.11
List Price:  SEK kr1,523.40
You save:  SEK kr435.29
ARS$102,698.50
List Price:  ARS$143,782.01
You save:  ARS$41,083.50
Bs689.84
List Price:  Bs965.80
You save:  Bs275.96
COP$441,236.66
List Price:  COP$617,748.98
You save:  COP$176,512.31
₡50,688.88
List Price:  ₡70,966.47
You save:  ₡20,277.58
L2,536.46
List Price:  L3,551.14
You save:  L1,014.68
₲778,577.57
List Price:  ₲1,090,039.75
You save:  ₲311,462.17
$U4,443.67
List Price:  $U6,221.32
You save:  $U1,777.64
zł409.39
List Price:  zł573.17
You save:  zł163.77
Already have an account? Log In

Transcript

Greetings and initial video presentation we're going to see how we go about installing the W three AF scanner in Kali Linux using Docker. using Docker, we will be able to install the W three AF scanner and all of its dependencies without having to install any other dependencies onto our Kali machine. Docker is a computer program that performs operating system level virtualization, also known as containerization. It was first released in 2013 and is developed by Docker Incorporated. Docker is used to run software packages called containers. In a typical example, use case one container runs a web server and web applications.

While a second container runs a database server that is used by the web applications. Containers are isolated from each other and use their own set of tools and libraries. They can communicate through well defined channels. All containers use the same kernel and are therefore more lightweight than virtual machines. Containers are created from images which specify their precise contents. Images are often created by combining and modifying standard images downloaded from repositories.

This lab requires one virtual install of Kali Linux, that has been fully updated, and a good internet connection. Before we begin the actual lab, let's go ahead and ensure that our Kali has been fully updated. To do this, I'm going to use the app command app space, get space puppy, I'm going to hit enter. If you get an error stating you have an invalid signature, go ahead and run the following command from the lab. That's the W get space dash q space dash capital O, and we're going to go ahead and get ourselves a new signature key. Go and hit enter.

Give it a second comes back and says it's okay. Once you've updated your signature key, go ahead and run the update one more time. While Kelly's upgrading, we'd go ahead and open up a new terminal. And we're going to prepare a script file that's going to do all the heavy lifting for us. Using nano, we're going to create a new Docker underscore install.sh script that's going to run through the installation of Docker for us. So I've typed in nano, and I'm going to open up a blank file and this file is going to be named Dr. underscore install.sh.

There's my blank file. Now I'm going to go back over to my lab file and I'm going to copy and paste from the lab file, the text that is in between the lines for this particular script, come back over to my blank text file, and I'm just going to paste this in. Now what I'm going to do is I'm going to save this, it's going to be saved to my root folder so that I will know where to find it. So I'm going to go ahead and hit Ctrl x, I'm gonna say y or type in y For Yes, and then I'm going to hit enter, we can now do an ls, and we'll find that the file has been saved to my root folder. I'm now going to make this Docker underscore install.sh file executable. Under the change mode command I've typed in ch mo D space, the plus sign plus a small letter X space Docker underscore installed.sh.

I'm going to go ahead and hit enter and it comes back to the prompt letting me know that the command completed successfully. This command has now made this file this text file executable and if we do another LS, we'll be able to see that the color of the file has changed from white to green, indicating that it is now executable. Kali has completed updating I'm going to go ahead and close out that terminal return to my Second terminal where I created this Docker underscore install.sh script. We're now ready to run the script. Now I'm going to type in sh. And what I'm going to do is I'm just going to copy from the LS results, the name of the file, name of the script.

And I'm just going to copy and paste that into the terminal prompt. I'm not going to hit Enter. And this again is going to run through the script and part of that script is to run an update. But we've already done that. We're now installing the Docker program, and all of the files that it needs. And when we're done here, we'll be able to download the container that contains the W three AF scanner.

The script will install all the dependencies and everything that the Docker program needs to run on this Kali installation. Once the script does complete, the Docker program has been installed. Now if you look up just a little bit inside of the results inside of the terminal, you'll see that there is a Hello from Docker, that this was done inside of the script. And what it does is it goes out and it confirms that the Docker program is working. So the command that we would normally run if we were doing this manually would be Docker space run hello world. And we can run that command right here from the terminal.

I'm gonna go ahead and copy and paste that in from the lab. So it's Docker space run hello world. And this is going to go out and it's going to communicate with the Docker site. And I'm going to go ahead and type that in, and it comes back and it says hello from Docker. This message shows that your installation appears to be working correctly. We next need to download the W three AF package from GitHub.

So I've typed in get space clone. Now copy this command over from the lab file. Now once the W three AF package has completed itself stalling from the GitHub, we can then look inside of our root folder to see if it is present. So I've typed in LS at the prompt, and we see that the W three AF directory is in place. We're now ready to change directory over to the W three AF folder. And we're going to be working inside there, modifying a couple of items.

But first, we have to get there. To do this, we're going to type in cd space, W three A f four slash extras for slash Docker for slash scripts. And there's a script that we're going to be using to install the W f container at this location. So I'm going to go ahead and change on over to my new location. And we're going to begin work inside of here, up inside of this scripts directory up inside of the W three AF directory. We're going to run a script That's going to begin the installation of the actual container for W three, a EP that we can run inside of the Docker program.

To do this, I've typed in sudo, which was not needed because I'm already root, but I've gotten used to just type in sudo space, period forward slash w three AF underscore console underscore Docker. Well, let's see what happens. I'm going to go ahead and hit enter. So we're now downloading everything we need for the W three AF container that's going to be working inside of the Docker program. So this is where we run into a problem with this Docker script that's present up inside of the W three a directory, it wants a password for this address. We're going to have to go in we're going to have to modify the Docker underscore helpers dot p y script file.

And what we're going to do is just change the permissions so that we don't get printed prompted for a password. So let's see how we do that. First thing I'm going to do is just hit enter a couple times here, that's going to come back over to the prompt. Now we're going to go ahead and we're going to go find this Docker underscore helpers dot php script. And I do this, we're going to have to change directory over to the common directory that's also located inside the W three folder. So I'm going to type in LS.

And let's see what's present up inside of here. And you'll see that there is a common directory that is present. So I'm going to change directory on over to this location. Now I'm going to go ahead and get a hold of this Docker helpers, Docker underscore helpers got p y script file. So I'm gonna do another LS, and we see that there is a Dockers underscore helpers.py file that is present. Now we're going to open this up with a text editor.

And we're going to modify the change mode permissions. And what it is, there is an error in the way that they put in the permissions, they should have used an octal. But instead they use the decimal. So we're going to go ahead and take a look at this. So what I'm going to do now is I'm going to get up inside of here using nano, and I'm going to modify the script real quick. So I'm going to type in nano space, Docker underscore helpers dot p y.

And now we're inside of the file that needs to be modified. This is a rather large file and I don't want to spend a lot of time looking at 164 different lines, looking for this particular line that I have to modify. So I'm going to use this w switch in here. And I'm just going to type I'm just going to press the Ctrl key plus W. And using the search feature, I'm just going to copy and paste the variable that I'm looking for inside of this script. Now actually copied this from the lab. And that's where you're going to find it as well.

And it comes right up and it shows me exactly where the line is that I need to modify. So what I'm going to do is I'm going to add a zero in front of this six, and that's going to make it octal as opposed to being decimal. So let me just go ahead and scoot on over here using my arrow. And I'm going to add in as zero, and gold one more to the right, and I'm going to push that back to the left. He's my arrow keys, and now we have the correct set of permission, we can go ahead and save our changes by typing in Ctrl x. If it asks you if you want to, say the modified buffer, type in Y for yes, and then hit enter, I now have to return back to my Scripts folder so that I can run that Docker underscore command one more time.

So what I'm going to do is I'm gonna type in cd space, period period, that's gonna take me back one level. Now I'm back to the Scripts folder. Now I'm going to use my up arrow. And I'm going to bring back that command that sudo command to run the script one more time, and we should not be prompted for any password. Let's go and see if that works. And with the modification of our Dockers underscore helpers.py script, we are now able to launch the W three A f scanner.

So I'm going to go ahead and type in y to accept the terms and conditions of using the scanner, hit Enter. And you'll notice that we do now have they prompt for the W three a vulnerability scanner for websites. So in conclusion, for this particular video tutorial, you got to see how we can get around the issue of not having all the dependencies available when we want to install something as simple as the W three a vulnerability scanner. What We can do is we can get a package, either from the software creator or from GitHub that somebody else has created. And using the Docker container that we downloaded, we were able to install this w three A f scanner without having to worry about installing or finding or locating or having the required dependencies. They're all inside of the container, and Kali could care less.

Okay, well that's going to conclude this short video presentation on how to go about installing the W three AF scanner using Docker. Now if you have any questions or you have any concerns, please don't hesitate to reach out and contact your instructor and I'll see you in my next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.