Video – Performing a Browser Based Attack

11 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $139.99
You save:  $40
List Price:  €129.17
You save:  €36.90
List Price:  £110.02
You save:  £31.43
List Price:  CA$191.15
You save:  CA$54.61
List Price:  A$210.08
You save:  A$60.02
List Price:  S$188.77
You save:  S$53.93
List Price:  HK$1,092.75
You save:  HK$312.23
CHF 91.40
List Price:  CHF 127.97
You save:  CHF 36.56
NOK kr1,068.48
List Price:  NOK kr1,495.92
You save:  NOK kr427.43
DKK kr688.44
List Price:  DKK kr963.84
You save:  DKK kr275.40
List Price:  NZ$228.70
You save:  NZ$65.35
List Price:  د.إ514.18
You save:  د.إ146.92
List Price:  ৳16,410.04
You save:  ৳4,688.92
List Price:  ₹11,657.31
You save:  ₹3,330.90
List Price:  RM656.90
You save:  RM187.70
List Price:  ₦201,305.62
You save:  ₦57,520
List Price:  ₨38,987.91
You save:  ₨11,140.19
List Price:  ฿5,087.62
You save:  ฿1,453.71
List Price:  ₺4,505.29
You save:  ₺1,287.32
List Price:  B$717.15
You save:  B$204.91
List Price:  R2,545.11
You save:  R727.22
List Price:  Лв252.39
You save:  Лв72.11
List Price:  ₩191,270.87
You save:  ₩54,652.72
List Price:  ₪514.18
You save:  ₪146.92
List Price:  ₱8,124.45
You save:  ₱2,321.43
List Price:  ¥21,898.07
You save:  ¥6,257.04
List Price:  MX$2,326.14
You save:  MX$664.66
List Price:  QR510.64
You save:  QR145.90
List Price:  P1,887.68
You save:  P539.37
List Price:  KSh18,478.68
You save:  KSh5,280
List Price:  E£6,550.13
You save:  E£1,871.60
List Price:  ብር8,046.40
You save:  ብር2,299.13
List Price:  Kz119,061.49
You save:  Kz34,020
List Price:  CLP$124,379.71
You save:  CLP$35,539.60
List Price:  CN¥993.01
You save:  CN¥283.74
List Price:  RD$8,224.84
You save:  RD$2,350.12
List Price:  DA18,836.81
You save:  DA5,382.33
List Price:  FJ$316.51
You save:  FJ$90.44
List Price:  Q1,087.38
You save:  Q310.70
List Price:  GY$29,320.35
You save:  GY$8,377.84
ISK kr13,848.61
List Price:  ISK kr19,388.61
You save:  ISK kr5,540
List Price:  DH1,389.92
You save:  DH397.15
List Price:  L2,473.55
You save:  L706.77
List Price:  ден7,958.15
You save:  ден2,273.92
List Price:  MOP$1,125.85
You save:  MOP$321.69
List Price:  N$2,539.14
You save:  N$725.52
List Price:  C$5,155.83
You save:  C$1,473.20
List Price:  रु18,663.10
You save:  रु5,332.69
List Price:  S/524.70
You save:  S/149.92
List Price:  K544.20
You save:  K155.49
List Price:  SAR525.03
You save:  SAR150.02
List Price:  ZK3,617.21
You save:  ZK1,033.56
List Price:  L642.65
You save:  L183.62
List Price:  Kč3,193.84
You save:  Kč912.59
List Price:  Ft50,002.94
You save:  Ft14,287.57
SEK kr1,072.36
List Price:  SEK kr1,501.36
You save:  SEK kr428.99
List Price:  ARS$124,487.26
You save:  ARS$35,570.33
List Price:  Bs967.89
You save:  Bs276.56
List Price:  COP$536,181.17
You save:  COP$153,205.56
List Price:  ₡71,769.17
You save:  ₡20,506.94
List Price:  L3,461.75
You save:  L989.14
List Price:  ₲1,051,649.55
You save:  ₲300,492.76
List Price:  $U5,378.94
You save:  $U1,536.95
List Price:  zł551.05
You save:  zł157.45
Already have an account? Log In


Greetings, and in this short video presentation, we're going to see how we go about performing a couple of different browser based attacks. In this demonstration, we'll be performing a manual SQL injection. And later in the lab, we'll be doing a local file inclusion and a directory traversal attack. As with every lab, I want to confirm that I have good network connectivity. So I've done an IF config on my Kali machine and I see that I have an IP address of 192 dot 168 dot 145 dot 177. And on my medicine portable two machine, I have an IP address of 192 dot 168 dot 145 dot one to eight.

Now I want to do is ping from my Kali over to the meta supportable using the one to eight address. So at the command prompt on my callin machine, I've typed in ping 192 dot 168 dot 145 dot 128 which is the IP address of my mess portable to victim. I'm going to go ahead Hit Enter, and we see that the response comes back positive, I can break that sequence by using Ctrl plus C, I'm going to go ahead and clear the screen, I can clear now we're ready to begin the lab. So SQL injection is a technique that exploits a security vulnerability within a Pacific application. This type of attack is often used against applications that are data driven, such as SQL databases. This attack is performed by including Pacific portions of SQL statements within the field for the website to pass a malicious SQL command to the database to reveal the contents of the database to the attacker.

Now by default, SQL out of the box comes with about 1500 default settings. And most of those make SQL vulnerable. So you can understand how hard it is for any SQL administrator to go in and harden and SQL Server and still expect it to work. That's why Microsoft Soft sets up those default settings, and there's 1500 of them. And so if you go in there and you start setting up your SQL server to be hardened, there's a high probability that you can turn and that SQL Server into a doorstop very quickly, just by setting the wrong checkbox, or setting the wrong registry entry. Minister portable two has a version of matil de, which is a vulnerable web application that we're going to be attacking the problem is the new version of minister portable two does not have the right database configured for Matilda.

So what we're going to have to do is go over to our minister portable to and make some modifications to our config dot i NC file. So at the terminal prompt for my mess portable two I have typed in sudo because we're going to have to be doing this as their route. So I've typed in sudo space nano, which is Going to be the editor that we're going to use to modify the config dot ANC file. And I've typed in the path, forward slash var slash www for slash Mattila day for slash config dot i NC. Now once I've got everything typed in, and I have double checked it, because I don't want to be doing this three or four times, I'm going to go ahead and hit Enter. And it comes up and it wants to know what the root password is.

And that's the same as the login password for your administer portable to so it's MSF admin, and now we're inside of the file. So what I'm going to do is I'm going to use my down arrow, and I come to that last line where it says dollar sign DB name equals, and I'm going to go across here. Now normally, this doesn't say oh w ASP 10 it says meta splittable. But that's the wrong database. We need to be pointing this database To OW, ASP 10. So make sure that you replace the meta supportable inside of those single quotes with o w, sp 10.

When you're done, just go ahead and hit Ctrl x, say y or type in Y for yes, and then just hit enter. I'm not going to make any changes to this file, so I'm just going to do a Ctrl x. And this brings me back to my prompt. We learned previously by doing an IF config on our minister portable to exactly what the IP address was for that victim. It was 192 dot 168 dot 145 dot 128. Now your IP address for your victim will differ.

So make sure that you do an IF config and find out what the IP address is for your installation of menace portable two. In this next step of the lab. We're going to open up Firefox. I'm going to go up here to my quick launch. to double click Firefox and in just a minute, Firefox ESR, which stands for extended service release will open up in just a moment. Up in the address bar of your Firefox you want to type in http colon, forward slash forward slash the IP address of your Manasquan level two machine, forward slash Matilda.

Make sure you spell everything correctly. And then you just hit Enter. And if you did it correctly, and if everything's working like it should be, you'll be brought up to the Matilda vulnerable webpage. Okay, and it tells you that this is a deliberately vulnerable PHP script. Oh w ASP top 10. So what we're gonna do now, we're going to go over here to the top can o w a s p, o w SP face cam, we're going to go to injection and we're going to go to to SQL, I extract data, user info, I'm going to click on that.

And we're now going to type in some information into this name box here, that's going to allow us to pull off some credit card information by just using some tricky SQL expressions. So matil de is a vulnerable web application that is designed to allow you as either a pen tester or a hacker to practice your craft. So everything in here is going to work for the most part, and it's not going to give us any grief out in the real world, you're going to have to do a little bit more research and a lot more recon to be able to find something that's going to allow you to pull this off, but in this context, it works just fine. So first thing we want to do is want to go to the Name field, right click, we're going to go down to inspect element. Now here inside of the element, we have this line Hear that says sizes 20.

Change that 20 to a 100. And now when I hit enter to the field, notice that the name box expands. To show the increase in size, we can go ahead and close out the element box now, we're now going to use the name field to allow us to inject some SQL expressions to exploit the back end. In this example, we're using the union command to join two separate SQL queries as one and it says union and I want you to join all this and I want you to select the following bits of information for me, the CC ID, the CC number, credit card number, the CCTV, the expiration No, and that means that if there's anything else that I forgot, go ahead and put it in here for me from credit cards credit cards is a table of information that is inside of this particular vulnerable database.

And we know that that is the case. So what we're going to do now is we've got this expression at the end of this piece of syntax. And notice there's a space, there's two dashes. And at the end of this dash, there has to be another space. So make sure you do that. Alright, so now we're just going to go ahead, we're going to hit Enter.

And what we've pulled up here from that table called credit cards, using that name field is the credit card number, the CCV number, and we pulled in the expiration date for the credit cards. And that's how easy that was. So all we did was just use the name field, which allows us to use this front end of the database to communicate with the back end of the database. And because sequel, in this sense, is vulnerable. We were able to exploit the data Based using these simple SQL expressions, in this next portion of the lab, we're going to use directory traversal in our browser to access files that were not properly sanitized, and were not properly configured to prevent us from pulling them up just using a browser. So what I've done is, I've gone up here to my address bar, and I've typed in an IP address on my victim, the web application Matilda for slash index dot php, question mark page equals for slash itself inside the etc.

Directory, and I want the password file. Now when I hit Enter, if this page has not been properly sanitized, then it's going to allow me to have access to it. And this is just about any page that you want on the server if it hasn't been properly protected. And we haven't done our due diligence to protect that file that We can use a web browser just like I've done here to pull it up. And we see that I pulled up the password file here. And we see all of the information that's inside of this password file.

And we can use this to help gather more information about how to further exploit this installation of my SQL Server. Now another file that would be of interest to us would be the SSH or slash authorized underscore keys file located up inside of the root directory. So when I just when I go ahead and I load this into the address bar, this is all taken from the lab I just copied and pasted this from the lab into here into my browser's address bar, we hit Enter, and we see that I bring up those SSH keys. Now of course, now this is all hashed. But I can run this through a decrypting utility of some type and I can Probably over time, crack these keys. So that's that's of interest to us if we want to be able to connect remotely using SSH.

So in this short video presentation, you got to see how easy it was to conduct a manual SQL injection, and a local file inclusion and directory traversal attack using just a browser when a SQL database is vulnerable from the front end. Later on, we're going to see another lab where I'm going to use an application called SQL map. And it's going to do all of this for us and you're going to be amazed how easy it is to access and hack a vulnerable SQL database. That concludes this short video presentation and if you have any questions or concerns about this lab or this video, please do not hesitate to reach out and contact your instructor and I'll see you in my next video.

Sign Up


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.