00:00:00.000 --> 00:00:04.605 >>Let's get started, Brent is going to talk about hacking web 00:00:04.605 --> 00:00:09.243 apps or he has very misleading first slide. Let's give Brent 00:00:09.243 --> 00:00:13.847 white a big hand. [Applause] >> Thanks. All right. Thanks guys 00:00:13.847 --> 00:00:16.917 for coming. Just let you know this is probably going to be the 00:00:16.917 --> 00:00:20.153 most disappointed that you've been in a long time. I'm just 00:00:20.153 --> 00:00:25.926 going to tell you that now. I'll talk about baking Apple pies 00:00:25.926 --> 00:00:30.163 this morning. My name is Brent white. I'm security consultant 00:00:30.163 --> 00:00:35.369 with -- and if you have any questions, I know a lot of you 00:00:35.369 --> 00:00:37.771 have questions about anything I talk about or maybe something I 00:00:37.771 --> 00:00:41.808 didn't mention contact me on Twitter I'll respond to the best 00:00:41.808 --> 00:00:49.516 of my ability. All right. This was not my choice to put this on 00:00:49.516 --> 00:00:53.921 here but for my own protection, thank you for having me add 00:00:53.921 --> 00:01:00.794 this, Michael Borne, everybody got it? Okay, so, basically in 00:01:00.794 --> 00:01:03.196 this talk I'm going to talk about, as a pentester what 00:01:05.832 --> 00:01:10.437 happens from the very beginning all the way to the end for an 00:01:10.437 --> 00:01:15.008 assessment for web applications. I'm not going to be able to talk 00:01:15.008 --> 00:01:18.045 about actual web services but more specifically web 00:01:18.045 --> 00:01:22.482 applications. So, there are a few things that have to happen 00:01:22.482 --> 00:01:26.186 before you legally go and start hacking someone's website. What 00:01:26.186 --> 00:01:30.090 are those things? Well, once that you go through contract and 00:01:30.090 --> 00:01:34.795 scoping and sales, then on to us. We have what is called a 00:01:34.795 --> 00:01:39.700 kick-off call. During this call we talk about what are they 00:01:39.700 --> 00:01:43.537 expecting do they have a specific thing they want us to 00:01:43.537 --> 00:01:47.207 focus on. So, if it's a bank then they probably want us to 00:01:47.207 --> 00:01:51.211 try to focus on getting user data or credit information 00:01:51.211 --> 00:01:54.781 things like that. We talk about exactly what they're wanting, we 00:01:54.781 --> 00:02:00.087 talk about the limits, avoid this webpage, please don't 00:02:00.087 --> 00:02:05.559 delete data or anything like that. Then the scope, that 00:02:05.559 --> 00:02:12.099 actually is what websites, what is the application, the URL. 00:02:12.099 --> 00:02:14.735 Next in case something breaks, all hell breaks loose or 00:02:14.735 --> 00:02:16.870 something you have to have a point of contact, somebody that 00:02:16.870 --> 00:02:20.907 you can call say, didn't mean to do this but your site is down. 00:02:20.907 --> 00:02:25.112 Or whatever might happen. Hopefully that doesn't happen, 00:02:25.112 --> 00:02:30.884 but, you know, its not a perfect world. Remember, a report is 00:02:30.884 --> 00:02:34.654 always expected at the end of an assessment. So, the more 00:02:34.654 --> 00:02:38.158 evidence that you collect the easier your life is going to be 00:02:38.158 --> 00:02:40.627 when you're reporting. Before I get started, there's a few 00:02:40.627 --> 00:02:48.635 things that I like to set up, that way as I'm going along I 00:02:48.635 --> 00:02:52.572 can just copy, paste put evidence as I'm going as the 00:02:52.572 --> 00:02:58.011 report writing, shoot, I forgot to take a screen shot of this. 00:02:58.011 --> 00:03:02.783 So, what do I use? Well, heat note is my actual application of 00:03:02.783 --> 00:03:08.655 choice. It's built in with Kali Linux and for other platforms. 00:03:08.655 --> 00:03:13.026 Again there's several option such as Dratus and other things 00:03:13.026 --> 00:03:16.430 likes that. Whatever works best for you what you're most 00:03:16.430 --> 00:03:21.201 comfortable with. One I like is keep note, that you can easily 00:03:21.201 --> 00:03:24.504 create scripts, you can do scripting for it and it's very 00:03:24.504 --> 00:03:30.210 expandable. You can export it as HTML files to give to a client 00:03:30.210 --> 00:03:36.583 or share with your team members as well. And so just to show you 00:03:36.583 --> 00:03:42.589 how I might group things, the one side it says B.I.-IPs I want 00:03:45.559 --> 00:03:49.963 to make sure that I'm covering each one then I might break it 00:03:49.963 --> 00:03:53.934 out and do a folder for each specific application or IP. Or 00:03:53.934 --> 00:03:58.438 if it's a smaller scope, then I'll just do it by 00:03:58.438 --> 00:04:02.476 vulnerability. And as you can see, I've gone color coded them 00:04:02.476 --> 00:04:07.447 the darker ones are obviously higher risk. And then the green, 00:04:07.447 --> 00:04:11.551 I do that, this is a visual reference of just information 00:04:11.551 --> 00:04:16.189 that I can go back to such as what's the scope or anything 00:04:16.189 --> 00:04:22.529 else that I might need to reference quickly. A few things, 00:04:22.529 --> 00:04:26.933 evidence gathering, whenever you're going to report on a 00:04:26.933 --> 00:04:30.737 vulnerability then you want to try to document the requests and 00:04:30.737 --> 00:04:34.808 response for each vulnerability. When you give the report to the 00:04:34.808 --> 00:04:39.446 client they can try and replicate and try to resolve the 00:04:39.446 --> 00:04:45.318 issue. Any unscheduled down time or issues, so if the client asks 00:04:45.318 --> 00:04:49.289 you to stop testing because there is latency or some issue 00:04:49.289 --> 00:04:52.859 with the application you want to document that for the report 00:04:52.859 --> 00:04:58.798 review call. Changes in test status if you do create test 00:04:58.798 --> 00:05:02.903 accounts or modify, let's say you get into someone else's 00:05:02.903 --> 00:05:05.672 account you modify information. Let them know that way they can 00:05:05.672 --> 00:05:09.009 go back and repair that if you have you happen to be testing in 00:05:09.009 --> 00:05:14.915 a live environment. And then again if you're testing 00:05:14.915 --> 00:05:19.152 something like a bank website or an online store or something 00:05:19.152 --> 00:05:23.190 you're doing transactions, you want to log those, that way 00:05:23.190 --> 00:05:28.094 cancel that give you your money back. And then this next one 00:05:28.094 --> 00:05:31.965 should be pretty obvious. Don't share any screen shots or data 00:05:31.965 --> 00:05:35.035 of any hacks that you found for the client. That probably 00:05:35.035 --> 00:05:39.005 wouldn't make them happy you'll be against your agreement in the 00:05:39.005 --> 00:05:46.079 contract. So, I'm going to apologize, there's so much to 00:05:46.079 --> 00:05:49.549 cover I'm going to try to keep things high level that way those 00:05:49.549 --> 00:05:52.886 who are interested in getting into hacking web apps this is 00:05:52.886 --> 00:05:56.523 more of an outline for you to go back and say, the names of the 00:05:56.523 --> 00:06:01.995 programs and to kind of get you on the right track and how to 00:06:01.995 --> 00:06:05.098 get started. In evidence gathering you want to make sure 00:06:05.098 --> 00:06:08.768 when you do find vulnerability that you get clear, ledgible 00:06:08.768 --> 00:06:12.572 screen shot that have vulnerability. That way when you 00:06:12.572 --> 00:06:16.076 put it in the report you can actually tell what it is. I've 00:06:16.076 --> 00:06:19.579 seen a few reports where it was really tiny, it was a screen 00:06:19.579 --> 00:06:23.717 shot of the entire screen, part that mattered you couldn't 00:06:23.717 --> 00:06:27.087 really read it because it was so small. Just trim out the stuff 00:06:27.087 --> 00:06:29.856 that isn't needed, make it where it's nice and big and you can 00:06:29.856 --> 00:06:36.596 actually read it. The specific issue during the write up that 00:06:36.596 --> 00:06:40.233 way again they can actually see what was sent. You can see the 00:06:40.233 --> 00:06:45.171 highlighted part where, on this particular one I found SQL 00:06:45.171 --> 00:06:51.211 injection I highlighted the pay load or code that was sent for 00:06:51.211 --> 00:06:57.917 the user name parameter. Then again as you're going through, 00:06:57.917 --> 00:07:01.454 say, for example, the SQL injection I was just talking 00:07:01.454 --> 00:07:04.758 about if there are multiple parameters you want to go 00:07:04.758 --> 00:07:11.131 through and look at that for each and every parameter. So you 00:07:11.131 --> 00:07:13.833 actually want to go through and document every parameter that's 00:07:13.833 --> 00:07:19.005 vulnerable to that particular SQL injection, for example. 00:07:19.005 --> 00:07:21.941 Don't just find one and just give them one. You actually need 00:07:21.941 --> 00:07:24.577 to be diligent and go through and look at every parameter make 00:07:24.577 --> 00:07:31.451 sure. Everything is being covered. Then you want to have 00:07:31.451 --> 00:07:37.590 methodology or a checklist to go by. And when I say checklist, I 00:07:37.590 --> 00:07:41.695 want to be very clear here, not limiting you to that checklist, 00:07:41.695 --> 00:07:46.266 that's just merely a reminder, have I -- all of these 00:07:46.266 --> 00:07:50.870 parameters have I looked at this, this is just a thing to 00:07:50.870 --> 00:07:55.508 help keep you on track because as a pentester you're going to 00:07:55.508 --> 00:07:59.079 be doing a lot of things, maybe have several projects going on 00:07:59.079 --> 00:08:04.451 at once this is just a tip to help keep you on track to make 00:08:04.451 --> 00:08:07.487 sure that you're not overlooking or forgetting something. That 00:08:07.487 --> 00:08:10.190 way the client is getting the most value for their dollar. 00:08:10.190 --> 00:08:16.796 You're not trying to go to sleep one night then you remember, oh, 00:08:16.796 --> 00:08:19.165 I totally forgot to look at this whole portion of this 00:08:19.165 --> 00:08:24.170 application. At the end, it does kind of make you happy, I guess, 00:08:24.170 --> 00:08:29.843 had to find a stupid picture for this one. So there you go. Okay. 00:08:29.843 --> 00:08:35.348 Now getting into the actual assessment part. You want to 00:08:35.348 --> 00:08:41.221 look at anything you can find, the Osint, Osint you want to go 00:08:41.221 --> 00:08:47.927 through dues different tools such as search engines. Previous 00:08:47.927 --> 00:08:52.532 compromise, you might find credentials on something like 00:08:52.532 --> 00:08:57.604 case bin. Recon-ng, several different tools for Osint that 00:08:57.604 --> 00:09:02.709 will actually crawl, help save time by calling -- for you and 00:09:02.709 --> 00:09:06.713 finding this data. Again, look for any previous hack that's 00:09:06.713 --> 00:09:12.018 always good thing to tell a client, like you guys have been 00:09:12.018 --> 00:09:18.191 owned you have a lot of cleaning up to do. Any known malware or 00:09:18.191 --> 00:09:22.629 anything. Again this is a manual process, it's very time 00:09:22.629 --> 00:09:27.934 consuming. But it can be very, very rewarding. And why is that? 00:09:27.934 --> 00:09:31.905 Well, I've actually found database types, database 00:09:31.905 --> 00:09:36.409 schemas, test credentials and so much more information through 00:09:36.409 --> 00:09:42.549 archived e-mails, development forums, so many things that have 00:09:42.549 --> 00:09:45.652 pretty much given me the keys to the kingdom for that assessment. 00:09:49.089 --> 00:09:53.326 Talking more about Osint there's a great teal, called discover. 00:09:53.326 --> 00:09:59.199 And you can look at the screen and get an idea of a few things 00:09:59.199 --> 00:10:02.035 that it covers for you, automation tool helps things go 00:10:02.035 --> 00:10:08.141 a little quicker. Okay, so, you might be asking, well, if you're 00:10:08.141 --> 00:10:11.211 a hacker where are you running automated tools? That's not 00:10:11.211 --> 00:10:13.780 cool. You are supposed to go in do everything manually, 00:10:13.780 --> 00:10:16.950 according to Hollywood the type -- faster you type the better of 00:10:16.950 --> 00:10:22.956 a hacker you are, things like that. Well automated tools are 00:10:25.191 --> 00:10:30.463 great because they are a huge time saver. With assessments, 00:10:30.463 --> 00:10:36.236 they cover a wide range of tests very quick. And it really helps 00:10:36.236 --> 00:10:38.505 you define the low hanging fruit. Very clear on this, this 00:10:38.505 --> 00:10:43.710 is something that I know a lot of other pentesters get 00:10:43.710 --> 00:10:48.715 irritated about. A vulnerability scan is not a pentest. Common 00:10:48.715 --> 00:10:53.186 misconception, if you know people that think this, please 00:10:53.186 --> 00:10:57.690 correct them. It's just a vulnerability scan, it's only 00:10:57.690 --> 00:11:01.227 doing what the scanner knows what to look for, it's not 00:11:01.227 --> 00:11:06.666 putting in that human element of manual testing. So, to those 00:11:06.666 --> 00:11:12.672 that -- vulnerability is a pentest, then this is you right 00:11:14.774 --> 00:11:20.780 here. Why use automated scanners they cover a lot of things. Once 00:11:27.820 --> 00:11:31.958 they're finished you still need to go through and validate the 00:11:31.958 --> 00:11:35.195 things they found so you want to weed out any false positives. 00:11:35.195 --> 00:11:41.701 Scanners have tools where you can replay a request to see if 00:11:41.701 --> 00:11:45.271 you can get the same response or maybe modify it to see if it is 00:11:45.271 --> 00:11:49.876 a false positive. Don't just rely on those results because 00:11:49.876 --> 00:11:54.113 there are several that will give you false positives on the same 00:11:54.113 --> 00:11:58.551 vulnerability over and over on several web apps. So, not saying 00:11:58.551 --> 00:12:04.490 anything bad about this, but trust, verify as well. Automated 00:12:07.827 --> 00:12:11.898 scanners, want to talk about a few that I like to use. Some of 00:12:11.898 --> 00:12:17.437 the more popular out there, Nessus by tenable is great. It 00:12:17.437 --> 00:12:20.406 looks at the host, the web app, everything SSLTS layer, does 00:12:20.406 --> 00:12:27.947 basic content discovery. Just kind of looks at it as a whole. 00:12:27.947 --> 00:12:33.953 IBM app scan one we like to use. It's a little more focused. You 00:12:36.189 --> 00:12:40.293 can go in and you can modify a lot of things, parameters that 00:12:40.293 --> 00:12:43.529 you don't want to have looked at. Pages you wanted to exclude, 00:12:43.529 --> 00:12:47.433 things like that. It's a little more focused for web apps. 00:12:51.671 --> 00:12:54.741 Another favorite of mine is Burp suite pro. It has built in 00:12:54.741 --> 00:13:02.382 active scanner that will go in and look at things similar to 00:13:02.382 --> 00:13:07.086 other scanners. You can also spider content. Basically what 00:13:07.086 --> 00:13:11.324 spiderring does is when you load a page anything links or 00:13:11.324 --> 00:13:15.094 anything that are in that page it will visit that and then on 00:13:15.094 --> 00:13:19.432 that page any links -- basically just keeps spiderring out trying 00:13:19.432 --> 00:13:24.170 to go ahead and build the trees and everything for you so you 00:13:24.170 --> 00:13:28.141 can see sort of a layout that have application. Nikto, pretty 00:13:28.141 --> 00:13:34.514 good tool for looking for known vulnerabilities, CBI testing 00:13:34.514 --> 00:13:40.520 quite a bit more. I like to use the stand alone, lot more 00:13:43.723 --> 00:13:49.228 control and really dial down based on that specific web app. 00:13:49.228 --> 00:13:55.501 So, if you're dealing with a framework such as word press or 00:13:55.501 --> 00:14:00.907 Drupal or things like that, there are actually automated 00:14:00.907 --> 00:14:07.780 scanners for those as well. WP scan obviously that's for word 00:14:07.780 --> 00:14:10.983 press. Looks for known word press vulnerabilities, outdated 00:14:10.983 --> 00:14:16.089 plug-ins and so on. The ones for the other platforms also do 00:14:16.089 --> 00:14:23.796 similar things. Look into those, those are all built into Kali. A 00:14:23.796 --> 00:14:28.735 good one for finding sort of -- directories that might not be 00:14:28.735 --> 00:14:34.073 linked in any other way is Dir buster by OWASP, probably hard 00:14:34.073 --> 00:14:40.379 to see I apologize. You can load your own custom lists or use a 00:14:40.379 --> 00:14:45.351 list that come with it. You can go through and just let it run 00:14:45.351 --> 00:14:50.256 and it will try to locate as hidden files and folders, very 00:14:50.256 --> 00:14:52.759 useful. Make sure you give yourself enough time for this 00:14:52.759 --> 00:14:58.498 because it can take awhile. Again there are many more 00:14:58.498 --> 00:15:01.534 preinstalled options of Kali this shows you the directory 00:15:01.534 --> 00:15:04.604 structure where you can go in and find these tools if you're 00:15:04.604 --> 00:15:08.574 not familiar with the operating system. Then there are other 00:15:08.574 --> 00:15:12.845 free operating nexpose and numerous others. Just get 00:15:12.845 --> 00:15:20.052 familiar with these tools, find what works best for you and I 00:15:20.052 --> 00:15:23.723 know on YouTube and other things there are several videos, free 00:15:23.723 --> 00:15:27.660 tutorials that help you learn these specific tools. Sorry I 00:15:27.660 --> 00:15:29.962 don't have enough time to really cover all those things with you 00:15:29.962 --> 00:15:33.666 today but again this is just sort of to help you get going in 00:15:33.666 --> 00:15:38.805 the right direction, get started. Automated scanning, pro 00:15:38.805 --> 00:15:41.908 tips, verify the settings -- settings of the automated 00:15:41.908 --> 00:15:44.510 scanner don't just put in the URL and click. It causes 00:15:44.510 --> 00:15:49.382 problems, not really a smart thing to do, you want to look at 00:15:49.382 --> 00:15:52.552 the settings, make sure that you're not going to do something 00:15:52.552 --> 00:15:57.990 that's going to cause -- clients we found out never like that at 00:15:57.990 --> 00:16:02.061 all. So avoid that. If you need to throttle it back and change 00:16:02.061 --> 00:16:08.868 the number of threads, do that, too. Again, you can add pages or 00:16:08.868 --> 00:16:12.004 function, is that they might want to you avoid, something 00:16:12.004 --> 00:16:15.141 that we found is kind of common with web apps is the client will 00:16:15.141 --> 00:16:19.712 say, hey, this page is our contact page, if you scan it 00:16:19.712 --> 00:16:23.182 we're going to get thousands and thousands of e-mails from your 00:16:23.182 --> 00:16:26.285 automated scanner. That can flood things, it's caused 00:16:26.285 --> 00:16:31.190 problems. Make sure that you ask what do you want us to avoid, 00:16:31.190 --> 00:16:33.292 what pages do we need to stay away from. Because there are 00:16:33.292 --> 00:16:39.298 times where that will cause issues. Then when you're all 00:16:41.868 --> 00:16:46.606 ready set up after you've verified the settings, you can 00:16:46.606 --> 00:16:51.043 start the scan. Now let's talk about some manual testing. This 00:16:51.043 --> 00:16:55.581 kind of bleeds over into automated, so again, once your 00:16:55.581 --> 00:17:00.486 automated scans are finished you have some things to go after 00:17:00.486 --> 00:17:05.458 instead of just verifying, see if you can take those further, 00:17:05.458 --> 00:17:10.296 you don't want to just see, okay, well, there's cross site 00:17:10.296 --> 00:17:16.269 scripting, go and do a pop-up box of one. Pretty lame, if you 00:17:16.269 --> 00:17:21.073 really need to show an executive of why this is important to 00:17:21.073 --> 00:17:24.477 allow budget or something to actually get this fixed, go 00:17:24.477 --> 00:17:30.383 deeper. Look at maybe including key can stroke scripting or 00:17:30.383 --> 00:17:33.352 hooking the browser -- or something like that, the beef 00:17:33.352 --> 00:17:37.223 application. There's so many more things you can do with it. 00:17:37.223 --> 00:17:41.160 Actually look at those results and take them further just 00:17:41.160 --> 00:17:46.532 automated scanner. What would an attacker do, that's what you're 00:17:46.532 --> 00:17:52.972 trying to get across here. Then you actually want to explore the 00:17:52.972 --> 00:17:56.442 applications through a proxy program and again there's burp 00:17:56.442 --> 00:18:00.546 suite pro again, excellent program. All the guys I work 00:18:00.546 --> 00:18:03.049 with that is a standard application for us. Again, 00:18:03.049 --> 00:18:05.418 there's the spiderring and content tools to help you find 00:18:05.418 --> 00:18:12.258 more things that you might not see when you're manually going 00:18:12.258 --> 00:18:18.264 through each page. Then again the Dir buster. A way to sort of 00:18:23.169 --> 00:18:27.773 tailor exploits and see what it might be vulnerable to to look 00:18:27.773 --> 00:18:31.811 at the server response, kind of verify what street this running 00:18:31.811 --> 00:18:36.949 because most of the time, Apache, then the version number 00:18:36.949 --> 00:18:43.990 or IAS or you can see this is how I need to focus my scanners 00:18:43.990 --> 00:18:50.363 or my attacks towards this host. Paramaters. Parameters are 00:18:50.363 --> 00:18:53.065 basically anything that take value and send it on and get a 00:18:53.065 --> 00:18:58.838 response. Want to look at those, you want to -- let's say if the 00:18:58.838 --> 00:19:03.576 parameter is name. Instead of just putting in names, try 00:19:03.576 --> 00:19:07.646 putting in actual -- maybe SQL injection or cross site 00:19:07.646 --> 00:19:12.118 scripting or anything that is not expecting. That's kind of 00:19:12.118 --> 00:19:15.654 the whole point, right? Take something and give it 00:19:15.654 --> 00:19:18.157 information that it's not expecting to try to make it 00:19:18.157 --> 00:19:21.427 behave different. You can do that, start getting different 00:19:21.427 --> 00:19:24.730 responses, that is kind of the rabbit trail you want to go 00:19:24.730 --> 00:19:32.238 down. Cross-site scripting again I've already mentioned that. If 00:19:32.238 --> 00:19:35.074 you're not familiar with cross-site scripting, you got to 00:19:35.074 --> 00:19:38.711 become familiar with it because there are a lot of attack 00:19:38.711 --> 00:19:43.249 vectors and more websites are vulnerable to than we would 00:19:43.249 --> 00:19:49.188 like. Also you want to look up things like cross-site request 00:19:49.188 --> 00:19:55.194 forgery. SQL app injection, local and remote file inclusion. 00:19:58.597 --> 00:20:02.568 You can actually load your own list, if you have a long list of 00:20:02.568 --> 00:20:05.204 cross-site scripting or SQL injection commands that you want 00:20:05.204 --> 00:20:09.075 to throw in a parameter, you can load those in or it comes with 00:20:09.075 --> 00:20:12.178 ones, some pretty solid ones already that you can try. 00:20:12.178 --> 00:20:20.186 Xenotics, however you say that, is also really cross-site 00:20:20.186 --> 00:20:24.690 scripting testing tool. It's for Windows platform. Basically it 00:20:24.690 --> 00:20:28.994 shows three browser types and you tell it the URL and the 00:20:28.994 --> 00:20:33.966 parameter. It will just run and run and run. And it will 00:20:33.966 --> 00:20:37.603 actually go through -- I found a few things from this that other 00:20:37.603 --> 00:20:41.006 schools didn't find or that I couldn't find through some 00:20:41.006 --> 00:20:45.745 manual testing. So, I highly recommend checking that out. 00:20:45.745 --> 00:20:49.548 Then if you think you have SQL, possible SQL injection, save 00:20:49.548 --> 00:20:54.687 that request to a file then you can actually run that through 00:20:54.687 --> 00:20:59.792 SQL map or SQL Ninja, barbecue SQL so many different types of 00:20:59.792 --> 00:21:03.796 SQL injection tools built into Kali or other operating systems 00:21:03.796 --> 00:21:09.802 as well. Something else you want to look for. Whenever 00:21:12.138 --> 00:21:15.774 information is being sent, is it sensitive information. In the 00:21:15.774 --> 00:21:19.712 URL is it showing the user name and the password in clear text, 00:21:21.947 --> 00:21:25.918 as silly as that founds we've found that several times. So if 00:21:25.918 --> 00:21:30.189 someone is sniffing traffic or saved in the history then 00:21:30.189 --> 00:21:34.493 someone's got y know, they can grab that session and become 00:21:34.493 --> 00:21:38.731 your user or if they see you're user name and password or just 00:21:38.731 --> 00:21:42.468 find your user name, you can start brute forcing with 00:21:42.468 --> 00:21:50.442 password lists try to make your way in that way. Okay. Death by 00:21:50.442 --> 00:21:55.481 PowerPoint. Lot of information. Look at this happy dog with a 00:21:55.481 --> 00:22:01.420 hug for a second. Aww. Has anybody seen the video of this, 00:22:04.223 --> 00:22:07.226 by the way? It's this dog just standing there they give it a 00:22:07.226 --> 00:22:10.729 hot dog and it has it's eyes closed it's so happy just like 00:22:10.729 --> 00:22:16.635 wags it's tail for like two minutes. Okay. Moving on. 00:22:16.635 --> 00:22:23.175 Authentication, these are things I'm telling you that you 00:22:23.175 --> 00:22:28.547 actually want to look at for bypassing things to actually 00:22:28.547 --> 00:22:33.052 hack websites. Authentication. Can it be bypassed? What does 00:22:33.052 --> 00:22:37.489 that mean? Well, if there is a URL for admin, can you get to 00:22:37.489 --> 00:22:42.561 that URL as an unauthenticated user or if you're not admin just 00:22:42.561 --> 00:22:45.998 a regular user, can you still view that. Those are things that 00:22:45.998 --> 00:22:50.402 you want to look for. When you log off can you take that 00:22:50.402 --> 00:22:54.974 session token, put it and log use it again or does it create a 00:22:54.974 --> 00:23:00.579 new one every time you log in. This is something else you can 00:23:00.579 --> 00:23:04.550 try for your logged in as one user and log in under the same 00:23:04.550 --> 00:23:09.121 user name in a different browser does it allow multiple sessions. 00:23:09.121 --> 00:23:11.924 Sometimes that's not really a bad thing but as -- given 00:23:11.924 --> 00:23:16.695 certain cases, for example, a bank, you might not want to 00:23:16.695 --> 00:23:20.065 allow the same user to be logged in at the same time on a 00:23:20.065 --> 00:23:23.602 website. You want it to end that session of the other person. 00:23:23.602 --> 00:23:29.041 That way provides a little more security with that. You also 00:23:29.041 --> 00:23:31.977 want to look at password requirements. Can you set your 00:23:31.977 --> 00:23:37.283 password to 1-2-3 or banana or something that is easily 00:23:37.283 --> 00:23:40.119 guessed, very common password. You want to make sure that you 00:23:40.119 --> 00:23:42.521 have strong password requirements for that 00:23:42.521 --> 00:23:46.358 application. When you change your application can you go back 00:23:46.358 --> 00:23:50.296 and use an old password again. Why is that bad. Let's say 00:23:50.296 --> 00:23:55.100 you've been compromised before and that list is on the website, 00:23:55.100 --> 00:23:59.972 someone says, well, okay, time to change my password. Their old 00:23:59.972 --> 00:24:02.274 password is out there then again, I want to use that 00:24:02.274 --> 00:24:06.045 password again. Well, there's a possibility that attacker can 00:24:06.045 --> 00:24:09.448 come by use that list of passwords that was found from a 00:24:09.448 --> 00:24:13.085 previous breach if it's their current password again or never 00:24:13.085 --> 00:24:19.091 been changed you got problems. Look at the host not just the 00:24:21.260 --> 00:24:27.299 web app. Again, what is it running? Is it Apache, is it a 00:24:27.299 --> 00:24:31.503 vulnerable version of Apache. Are there admin portals 00:24:31.503 --> 00:24:36.542 available like C-panel. If so, try default credentials for 00:24:36.542 --> 00:24:42.648 that, brute force it, see what you can do to get in. Also been 00:24:42.648 --> 00:24:46.685 a few times where we found back-up files. Back-up database 00:24:46.685 --> 00:24:50.689 files. You just grab those with no authentication, you go 00:24:50.689 --> 00:24:53.926 through, find the information, user names, passwords, it's 00:24:53.926 --> 00:25:01.567 pretty good stuff for us not for the company, necessarily. Again 00:25:01.567 --> 00:25:07.206 with the host, do they have any dangerous HTTP enabled, such as 00:25:07.206 --> 00:25:11.477 put and copy. You know you can group those together to 00:25:11.477 --> 00:25:15.848 basically compromise the host. Delete, that's pretty obvious 00:25:15.848 --> 00:25:19.651 why that would be bad. You want to look at those things, are 00:25:19.651 --> 00:25:23.622 they vulnerable to direct reversal or shell shock or 00:25:23.622 --> 00:25:29.228 heartbleed or whatever else that is a known vulnerability with 00:25:29.228 --> 00:25:35.234 easily get public exploits. Again, you want to look at SSL, 00:25:37.636 --> 00:25:40.639 TLS settings are they using weak Cyphers with phone 00:25:40.639 --> 00:25:45.411 vulnerabilities, document that, take care of it, let them know. 00:25:45.411 --> 00:25:51.417 Again there are methodologies from OWASP as well as several 00:25:53.819 --> 00:25:59.825 other checklists to help you stay on track. These things will 00:26:02.628 --> 00:26:06.732 let you know kind of how to look for different things. To hacking 00:26:06.732 --> 00:26:14.072 web apps go to the OWASP site look at their methodology and 00:26:14.072 --> 00:26:19.178 that will actually help you walk through exactly what to look at, 00:26:19.178 --> 00:26:22.080 what things to look for, how to assess those and so forth. Then 00:26:22.080 --> 00:26:28.487 practice in the lab. If you are new to this, you do not want to 00:26:28.487 --> 00:26:31.423 be learning this stuff while you're touching a client 00:26:31.423 --> 00:26:36.061 website. Bad things can happen. Just make sure you take the time 00:26:36.061 --> 00:26:39.898 to set up a lab. There is information on how to set up 00:26:39.898 --> 00:26:46.105 labs out there, so check that out if you're not too familiar. 00:26:46.105 --> 00:26:52.344 Then once you're ready, go hack some websites. So that's 00:26:52.344 --> 00:26:57.549 basically it for my slides and my talk. I think we have some 00:26:57.549 --> 00:27:03.489 more time if anybody has questions or anything. [ 00:27:14.566 --> 00:27:17.002 inaudible ] So the question was, is there anything I recommend 00:27:17.002 --> 00:27:21.406 for setting up a lab. You know, it kind ever depends on exactly 00:27:21.406 --> 00:27:24.376 what you're wanting to do. If you're wanting to look at web 00:27:24.376 --> 00:27:30.382 apps there are -- help me. What's the name of the VM -- 00:27:33.018 --> 00:27:36.555 yeah. There's so many different vulnerable VMs that you can 00:27:36.555 --> 00:27:40.792 download that are purposesfully vulnerable so you can go in and 00:27:40.792 --> 00:27:44.930 test things like, SQL injection things like -- basically just if 00:27:44.930 --> 00:27:50.035 you run a VM on your machine that will be enough to get you 00:27:50.035 --> 00:27:56.041 started. Any more questions? My favorite tool? Probably the 00:28:01.480 --> 00:28:08.086 monkey wrench. Burb suite pro is my favorite. Pretty robust. You 00:28:08.086 --> 00:28:10.822 can actually again as I've mentioned there's manual 00:28:10.822 --> 00:28:13.992 testing, automated scanning, throw in your own lists, you can 00:28:13.992 --> 00:28:16.895 craft your own responses. There's so much that you can do 00:28:16.895 --> 00:28:22.901 with Burp suite. I'm sorry. No SQL? Okay. [ inaudible ] For 00:28:34.947 --> 00:28:40.953 like Mongodb things like that? There are tools like that as 00:28:43.889 --> 00:28:47.793 well. I mentioned SQL map and things like that, there are also 00:28:47.793 --> 00:28:51.763 tools written specifically for testing SQL injection against 00:28:51.763 --> 00:28:57.769 MongoDb out there as well. [ inaudible ] Great question. How 00:29:02.774 --> 00:29:07.646 do you help developers recreate these? Earlier when I was 00:29:07.646 --> 00:29:13.185 talking about reporting. In the reporting -- good report it will 00:29:13.185 --> 00:29:17.889 actually show you the requests that I sent to the server. So 00:29:17.889 --> 00:29:21.927 will be the full post or get a request or whatever it was. I 00:29:21.927 --> 00:29:26.632 will actually highlight in there what I sent that was malicious 00:29:26.632 --> 00:29:30.268 and that caused abnormal activity. Give that to you, you 00:29:30.268 --> 00:29:34.106 guys can use something like burp suite or something else where 00:29:34.106 --> 00:29:41.380 you can actually just copy and paste that request. Hit send and 00:29:41.380 --> 00:29:47.386 get the same results. [ inaudible ] A plug in for burp 00:29:55.427 --> 00:30:01.900 for -- [ inaudible ] Yeah, again, that's one of the great 00:30:01.900 --> 00:30:07.339 things about burp because it's so widely used it's being 00:30:07.339 --> 00:30:11.543 actively developed for. There's a great plug-in for it 00:30:11.543 --> 00:30:16.948 specifically for SQL map where there's -- after you go set up 00:30:16.948 --> 00:30:19.518 the tool and everything you basically just send that 00:30:19.518 --> 00:30:23.922 straight into that plug-in and it will run it through SQL map 00:30:23.922 --> 00:30:28.093 and everything for you then if it finds something, a tab will 00:30:28.093 --> 00:30:31.730 open up it will link say, hey, we found something. That way it 00:30:31.730 --> 00:30:36.902 does take time from the manual process of command line from SQL 00:30:36.902 --> 00:30:44.242 map. That is an option. [ inaudible ] What's that? Soap 00:30:44.242 --> 00:30:50.248 APIs? You can use those through burp you can also test those, I 00:30:52.784 --> 00:30:57.723 know IBM app scan also you can throw the thing in there and 00:30:57.723 --> 00:31:03.662 help find those parameters. Is that the question? Okay, cool. [ 00:31:35.193 --> 00:31:37.596 inaudible ] So the question, make sure I got this right. So, 00:31:37.596 --> 00:31:41.032 example that I showed where I found the SQL injection the user 00:31:41.032 --> 00:31:43.835 name parameter is that something I would tell the client right 00:31:43.835 --> 00:31:49.441 away. We have a process where if we find like serious or what we 00:31:49.441 --> 00:31:52.544 consider a critical vulnerability, we escalate that 00:31:52.544 --> 00:31:56.181 right away to let them know, hey, this is here, this is 00:31:56.181 --> 00:32:00.852 pretty easy to find, pretty easy to exploit and we got some 00:32:00.852 --> 00:32:03.522 information we shouldn't have been able to get. It's a good 00:32:03.522 --> 00:32:09.528 question. [ inaudible ] Other than that being pretty common 00:32:12.664 --> 00:32:16.668 and frustrating thing, that's again that's where you want to 00:32:16.668 --> 00:32:20.639 find these exploits and try to take them further and make them 00:32:20.639 --> 00:32:25.544 more real world scenario that way you can say, okay, obviously 00:32:25.544 --> 00:32:30.749 this vulnerability exists. This is what an attacker could do 00:32:30.749 --> 00:32:35.020 with it because this is what we actually did. Here is proof that 00:32:35.020 --> 00:32:40.692 we did this. And then they will argue, I don't see that that's a 00:32:40.692 --> 00:32:44.763 critical risk. It needs to be a low. Something silly like that. 00:32:44.763 --> 00:32:49.201 Basically you go to them, there might be certain cases based on 00:32:49.201 --> 00:32:56.208 the vulnerability where maybe it could be lowered a little bit 00:32:56.208 --> 00:32:58.577 based on their use. But that is just something that you need to 00:32:58.577 --> 00:33:02.147 talk to the client about. Just make sure that you document 00:33:02.147 --> 00:33:06.418 things well. Again, you exploit it to the fullest within the 00:33:06.418 --> 00:33:10.155 scope. And then just let them know, hey, this is how you guys 00:33:10.155 --> 00:33:13.825 can really get screwed over just take the dialogue from there and 00:33:13.825 --> 00:33:21.399 work it out between the client. [ inaudible ] I'm sorry. I 00:33:21.399 --> 00:33:27.405 didn't quite -- basically how do you evade their IDS. This is 00:33:34.379 --> 00:33:40.385 something that we actually talk about here in the kick-off call 00:33:46.258 --> 00:33:52.264 they will take we have this fire wall in place, well, that's 00:33:59.204 --> 00:34:04.809 good. But we only have a week on this project. Time to really go 00:34:04.809 --> 00:34:09.915 through and, you know, craft everything to see if we can 00:34:09.915 --> 00:34:13.952 potentially bypass this. So, you want to let them know, white 00:34:13.952 --> 00:34:19.124 list us, because we don't really -- that's pretty cool if we 00:34:19.124 --> 00:34:24.529 don't have time to do this, just let them know, the time thing, 00:34:24.529 --> 00:34:27.432 let us see what's behind that, that way if an attacker does get 00:34:27.432 --> 00:34:34.839 behind that then we fix those issues. [ inaudible ] One second 00:34:34.839 --> 00:34:40.845 please. [ inaudible ] Never mind. Ask the guy next to you 00:34:46.585 --> 00:34:52.590 that asked that a second ago. He got it. Cool. >> Let me explain 00:34:56.361 --> 00:35:00.031 what's going on. How many first timers are here? All right. We 00:35:00.031 --> 00:35:02.667 have a little tradition at DEF CON. If you speak at DEF CON 00:35:02.667 --> 00:35:06.771 this is your first time you have to take a shot during your talk. 00:35:06.771 --> 00:35:12.777 This is just kind of how we do it here. [ Applause ] First time 00:35:20.251 --> 00:35:26.458 listeners have to bring their own. But thank you. All right. 00:35:26.458 --> 00:35:32.464 >> Welcome to DEF CON! [Applause] >> Thank you guys. 00:35:35.633 --> 00:35:43.174 I'm glad you did that towards the end. [ inaudible ] What do I 00:35:43.174 --> 00:35:49.180 read each week. What do I look at to stay current on things. 00:35:54.219 --> 00:35:58.823 I'll tell you. Might not sound like the most professional thing 00:35:58.823 --> 00:36:02.761 but I get more useful information from Twitter and 00:36:02.761 --> 00:36:06.698 from following info Sec leaders on their fellow hackers, those 00:36:06.698 --> 00:36:10.435 guys, constantly, that's what we do, right? We find something, we 00:36:10.435 --> 00:36:15.507 see an article you might see the same article 15 times in an 00:36:15.507 --> 00:36:19.444 hour. But you saw it, right? Like say, for example, 00:36:19.444 --> 00:36:23.381 shellshock dropped my whole feed, as soon as it came out was 00:36:23.381 --> 00:36:27.185 talking about shell shock. The next hour it was, so-and-so has 00:36:27.185 --> 00:36:31.723 developed a proof of concept or an exploit, check it out here. 00:36:31.723 --> 00:36:35.527 So, within a couple hours of shell shock being announced we 00:36:35.527 --> 00:36:39.664 were -- guys we work with we were trying out these proof of 00:36:39.664 --> 00:36:44.102 concepts and code and then you heard about it on the news or a 00:36:44.102 --> 00:36:47.605 larger thing, maybe two or three days later everyone is freaking 00:36:47.605 --> 00:36:51.609 out about this. But here we are actually already trying it out. 00:36:51.609 --> 00:36:57.615 Twitter is a great resource. [ inaudible ] Yes, there are some, 00:36:59.617 --> 00:37:06.391 actually just quick Google search there's actually few 00:37:06.391 --> 00:37:09.427 tutorials and tests like that that you can go through and 00:37:09.427 --> 00:37:15.934 practice it. Things you can look for. It does have some issues. [ 00:37:15.934 --> 00:37:21.940 inaudible ] I think I got time for a couple more. What kind of 00:37:25.610 --> 00:37:30.748 -- [ inaudible ] Any good application for testing the -- I 00:37:30.748 --> 00:37:36.755 am having hard time hearing like scream it at me like I owe you 00:37:42.160 --> 00:37:48.967 money or something. [ inaudible ] Mean applications, any -- 00:37:48.967 --> 00:37:53.204 testing mean applications. Not right off the top of my head. 00:37:53.204 --> 00:37:59.210 I'm sure I have something I can send over to you. Anything else? 00:38:03.515 --> 00:38:06.851 All right, guys, you've been awesome. Thank you for 00:38:06.851 --> 00:38:11.723 listening. Appreciate it. [ Applause ] Again, if you have 00:38:11.723 --> 00:38:16.427 questions, contact me on Twitter find me outside, I'm more than 00:38:16.427 --> 00:38:18.530 happy to do what I can for you. Thank you.