start	end	text
720	3540	Woooo! Yeah, DEF CON!
6600	11440	I'm Max. I go by Strikeout, as you can see by the backwards K on my hat.
11660	17100	This is hacking the Zero NAS, or however you say that, from the perspective of a noob.
18000	23100	Have you ever felt down? I mean, really down.
23420	26900	Overwhelmed? Tired? Not enough?
28660	34620	But, at realizing your defeat is a sense of calmness.
34700	39300	I don't have to fake my greatness anymore. I can see myself for who I truly am.
39580	42660	This is where growth happens.
43120	47320	You see, my first DEF CON last year, I spent most of my time at IoT Village,
47320	51300	and I was absolutely horrified of how much everyone knew compared to me.
51660	56200	But, I saw a path that looked awesome. I saw directions I could go.
56200	61080	I saw that IoT hacking didn't have to be some crazy hardware glitch kind of thing.
61080	63840	This could just be a web interface, which is fairly common.
64780	67620	I started watching the ISE live streams.
67960	72460	And I went, huh, I can do this. This is something I could actually do.
72540	74640	And that's why I named it from the perspective of a noob.
74640	77840	I had virtually no idea what I was doing before I started this,
77840	80360	besides some software dev background.
80360	83760	But, I had virtually no experience hacking itself.
86620	88700	I'm going to go into a lot of technical details,
88700	92860	but one thing I really miss about most presentations is they talk about the exploit,
92860	95440	but they don't talk about the methodology of how they found it.
95520	99100	Finding the exploit is most of the time the hardest part.
99100	100960	Exploiting tends to be the easier thing.
101260	105440	To me, hacking is understanding and then manipulating.
105740	108460	Take, for example, this classic SQL injection.
108460	109600	Super common.
110420	114400	Yeah, you can throw this into a login field, and it might work.
114400	117700	But how does this actually work, is what we should actually be asking.
119940	123800	I want to give an actual example of something I found on a site.
125100	128260	I'm going to an interview. I am so excited.
128260	131260	I'm blaring one of my favorite security podcasts,
131260	134480	and all of a sudden, I rear-end a guy.
134500	137960	And I am furious. My insurance rates go up.
137960	140400	I have to pay for a bunch of stuff in the guy's car.
140460	146140	I miss my interview. I then have to be taken home by a tow truck,
146620	148620	which is another fee in itself.
148620	151540	And then I get online, and I have to pay a freaking ticket.
153080	156060	That really bothered me. Really did.
156100	158080	So, what do you do when you're pissed off?
158080	161520	As a hacker, you probably shouldn't do it, but you start looking at what you can find.
161740	167020	On the site, there was a birthday field where you could find your ticket as well as your name.
167020	170600	I just took out the birthday field and saw what happened.
170600	171960	Nothing different happened.
171960	176000	So then, I casually started taking more and more characters off my name.
176000	179360	I went from Doolin, to Dooley, to Dool, all the way to Dee,
179360	183240	until I had a full page of identifying information.
183620	187140	And this is where the understanding really comes in here.
187140	191280	Based upon the query, I thought it was going to be a like clause.
191280	198240	For those who don't know, a like clause with a percent sign there will return X,
198240	202120	like the letter X in this case, the input you give it, and then anything else.
202120	205800	So this will return like xylophone, as far as anything else starts with X.
206540	209820	So I said, well, what happens if I put another percent sign here?
209820	212380	And boom! Well, nothing happened.
212380	214800	Funny thing. You're supposed to laugh.
217260	219700	I walked away, I came back a couple minutes later,
219700	224640	and all of the ticket information for every digital ticket that had ever been given out by this county
224640	226220	was now on the screen.
226320	231100	The percent sign wasn't a very normal thing for this,
231100	233240	but it was a classic SQL injection.
233240	238280	By understanding how this worked, I was able to manipulate what I wanted to get out of it.
238660	240740	And side note on the ticketing system,
242720	246680	that information you could actually use to log in as someone,
246680	251800	and then schedule court dates and send more documents towards you.
251800	254280	It's a very subtle thing, but it worked out.
254820	257640	So, going with my methodology,
257640	260180	the first thing you have to do is understand how the device works.
260180	262560	If you don't understand how something works,
262560	264680	you can throw payloads at it, you may find stuff,
264680	266340	but you're not going to find very cool things.
267540	272080	The first thing I always do is, like, what the hell is a NAS in the first place?
272320	274820	It stands for Network Attack Storage Device.
274820	278920	I think of it as a USB drive that you can just connect to from the internet.
278960	280920	That's all it really is. It helps you manage files.
281020	283000	There's a bunch of other administrative features on it,
283000	285900	but that's pretty much all there is to it.
286720	290180	So, after you kind of research, like, what is the use case of this,
290180	291720	I just start clicking around the site.
291740	294020	What's on the site? What is the site meant to do?
294180	296060	What kind of user privileges are there?
296060	298000	I click through every link I can find.
298000	299740	I start reading through user documentation.
299980	302300	I start looking at firmware notes,
302300	304740	because a lot of times they'll add new features or something.
307180	310300	After that, I start looking at the tech stack.
310620	314000	So, what kind of web server is this using?
314000	315680	What kind of language are we using here?
315680	318160	Just understanding how the device works.
318720	320560	One thing I noticed that I thought was fairly interesting
320560	322740	was there were two different APIs.
322800	327480	One was for file upload, file download, and logging in,
327480	330080	and then there was an entirely separate API for everything else.
330080	333660	Understanding how they're accomplishing what they're doing is very important.
334600	338880	At this point, I SSH onto the NAS, because you can do that,
338880	344920	and I realized they were using Python, but they were in PYC files.
345060	349340	So, I just grabbed all the PYC files, took them off the NAS,
349340	352660	and, for those who don't know, it stands for Python Compiled,
352660	357320	and there's actually a tool that will take PYC files back to Python files,
357320	359780	and it includes comments and everything.
359780	360720	It's incredible.
361060	363260	Uncompile 6 is the name of that tool, if you're curious.
364540	366660	So now, I have the source code.
366660	369880	I'm looking through it, and I notice it's using Cherry PY,
369880	373000	which is an older Python kind of thing.
373900	378020	Now, well, there's information being stored on this.
378160	380100	What can I see on here?
380100	384320	So I start changing directories, want to know how the file system works, what's on it,
384320	385800	and I see this file.
388140	389920	Thank you for laughing this time.
391940	394680	Clearly, there's going to be nothing secretive in here.
394820	399000	So you look on it, and it's a base64 encoded admin password.
400560	402680	Yeah, that's really bad. Don't do that at home.
402700	404800	You shouldn't be doing that. It's kind of sad.
405020	407200	But it was a nice find to find that.
409660	410960	Next talk, yeah.
411080	414540	So, to build on this, I was just...
414540	418020	So, from our constants, I just started taking strings that I saw in URLs
418020	420960	and started sticking it into Google.
420960	424520	And I found that this thing actually can host a website.
424720	426660	And that part wasn't done very well.
426660	431840	And you could actually direct request this file on the person's server
432540	435200	and just log in as admin if you wanted to.
435240	438600	So, looking over everything that's on the device, how it works,
438600	442600	is the most important thing before you start hacking on something.
444540	447480	At this point, we've talked for a while, there's been no actual hacking involved.
447480	449580	We've just looked at how something works.
449820	452300	And that's... I mean, I probably spent a week just understanding
452300	453640	what was going on in the device.
454840	457500	Now I'm going to do some actual hacking, which is fun.
461670	463930	So, the first thing I thought was kind of odd
463930	467110	was I was looking over the normal API calls,
467110	470710	I noticed that they were using a file name and a function name
470710	472450	for all their API calls.
472450	474630	And I learned that just by grepping.
474630	476590	It's a common theme. I use grep a lot.
476590	479410	Just in the file system.
479450	480990	So, I was like, why is it doing that?
480990	484510	So, I went to the spot where these APIs were actually being called
485430	486970	and I found this.
489410	493890	So, anytime you see an eval in anything that doesn't validate user input,
493890	495650	it's a pretty good attack factor.
496290	497630	I'm not that smart, though,
497630	500430	so I initially tried doing some really crazy directory traversal shit
500430	501910	to call whatever I wanted.
502390	503870	And it took me a while to realize this,
503870	507370	but this will actually execute Python native code.
507470	509410	It's going controller,
509410	512530	which we had an MVC or a model view controller set up.
512970	515510	The first parameter is going to be the file name.
515510	518230	The second parameter is going to be the function name.
519630	521630	So, with this knowledge, I said,
521630	524770	okay, I understand how this request works.
524770	528010	Now, is there a way I can manipulate this to do whatever I wanted?
529610	531950	I came to this little sketch of mine.
531950	534970	So, the eval is essentially calling a file name.
534970	536830	There's a file name, a function name,
536830	539350	and then it passes in JSON as parameters.
539690	543750	This was my understanding of how this request worked.
543970	546570	And this took me some time to fully figure out.
547430	549570	So now, what can I do with this?
549810	552550	First thing I tried doing is I noticed that there was a file
552550	555890	that had everything imported from OS, just import star.
555910	558430	So, I was curious if I could call the OS package.
558630	560370	So, I called this really simple function
560370	564330	and I got int object not callable.
565470	566950	What the hell does that mean?
567070	570350	So, I did a similar function and got a string returned.
570890	573390	Cool. I still don't know what that means.
573550	575030	And then it hit me like a brick.
575070	578170	This is returning whatever I'm calling from the OS function
578170	580210	and then executing it.
580710	582570	So, I knew I had some sort of RCA.
582570	584930	I just had to figure out how to actually weaponize this.
585230	587710	Next thing I wanted to understand,
587710	589910	I wanted to completely validate it.
589910	592790	So, when it returned, it gave you the type,
592790	594730	but it didn't actually give you any sort of feedback
594730	596170	on what it actually looked like.
596170	598690	So, I wanted to get some sort of timing issue.
598690	600170	So, I turned on the yes command.
600170	602470	I did os.system with yes.
602470	605210	And this will just go on forever.
605210	607550	Yes just prints yes forever.
608330	612630	So, I make the request and burp just freezes.
613430	615210	It just doesn't do anything.
615210	616190	I log on to the NAS
616190	620390	and I run ps, which shows all processes,
620390	621670	and I see the yes command.
621890	625410	So, now I figured out that I had a remote code execution.
625410	626650	I was very confident.
626810	629910	Now, I wanted to create a backdoor,
629910	632870	which is kind of like the quintessential thing you have to do.
632910	635270	I own this. I ran whoami.
635270	636570	Otherwise, it's not real.
637850	640030	So, I was going to show the code for that
640030	641370	and then show the exploit.
645320	647720	So, for this API call here,
647720	651060	this is the backup main, which is just the name of the file.
651300	653640	I'm calling it os.package with system.
654720	658420	And then, I threw in this backdoor I found online.
658420	659720	Like, I didn't write this.
659720	662000	Some really smart guy did that. I just found it.
662000	663020	Put it in there.
664100	664760	Yeah.
665140	667720	Now, I will show this off.
667720	668920	Hopefully, it works.
669360	671940	I set up a Netcat listener on a server I control.
672500	675200	And then, hope this works.
675200	675900	Cool.
676300	677180	Who am I?
677980	679400	This is when you're supposed to clap.
679400	680100	It's an RC.
680100	680880	Come on.
680900	681780	Thank you.
681780	682660	Thank you.
684820	685540	Cool.
686740	691640	So, the simple bug in the routing led to a very bad thing.
691720	694180	But now, the next question we should ask that...
699950	700310	Okay.
701570	704770	One thing we don't do very well as hackers is we tell people when they've effed up.
704770	706150	We don't tell them how to fix it.
706150	707910	We just kind of assume people know what they're doing.
708210	710130	So, I want to talk about mitigations, too.
710130	713850	In this situation, running the eval command is a terrible idea.
714130	715410	That's sort of user input.
715410	718090	There should be virtually no scenario where you want to do that.
719270	722290	However, telling them not to use eval is just completely unrealistic
722290	725110	because they'd have to rewrite their entire API from scratch.
725110	730130	So, what I recommended was whitelisting all of their file names and all of their function names
730130	732990	so that they wouldn't have an issue.
733570	737290	They don't want to be able to call anything malicious because it would just be thrown out.
740490	746290	So, the next bug was in the package installer, which for some reason lower privileged users can run.
746290	749230	I don't know why that's the case, but that's how it worked.
751330	754390	So, I'm not sure if you guys know, but ISE runs this place here
754390	757530	and they have a bunch of really good live streams and a lot of good blog posts.
757690	759930	And I just started to turn on the live streams.
759930	764470	And one thing they kept showing in the NAS devices was a bunch of command injection issues
764470	767050	with stuff directly interfacing with the OS.
767530	769590	So, I went searching for that.
769590	772490	And I did it in a very sophisticated way.
772490	774010	I just started grepping again.
775590	779730	I started grepping for exec, OS.system.
779730	782850	And I found lots of matches, but they were all dead code.
782850	785610	After like 20 or 30 times of finding dead ends,
785610	790710	I found one function which was at the very end of my grep list called execute script.
792550	794110	So, I like analogies.
794110	797690	I'm going to explain why I think this came about with an analogy.
797690	799010	Have you guys ever played telephone?
800290	802270	It always goes really well, right?
802690	805710	No. Telephone never goes well.
805870	809190	The premise of telephone is you're trying to get, like you talk in a circle,
809190	813710	you're trying to get the message from the first person to the last person.
814150	815990	It never gets to the last person.
816150	817450	And in the correct form.
817450	819010	This was similar to this vulnerability.
819270	823310	The execute script function was probably written a long time ago by a developer.
823310	827730	And then it was six function calls below the API call that was being called.
827970	832810	That sort of indirection can create a lot of issues.
832810	834190	Because the original developer probably thought,
834190	837070	we don't need to escape shell meta characters.
837070	839310	Why do I need to do that? Someone else can do that for me.
839370	841930	By the time it gets to the person who wrote the API,
841930	845930	they just had no idea that was the assumption that they had made.
848390	850630	So this was what the command looked like.
850630	852210	I'll show the exploit in a second.
852210	855490	It was a package installer binary.
855890	858350	And there was a package name that had to be called.
858870	861230	And then there was a command that had to be passed into it.
861230	864130	The package name had to be an actual package.
864130	866850	Otherwise, it was a whitelist thing, so it couldn't do anything else.
866850	871510	But the command had no filtration whatsoever.
872230	875190	And that's where I put the payload at.
875710	877150	So I'll go back to the code.
883480	886480	So again, we have the portal main file.
886480	888720	We have the package init command.
888820	890380	This is the function name.
890380	892800	We throw in the package, which is a valid package.
892800	896080	And then we have the actual command here.
896080	897420	Sorry, this is the package name.
898820	901680	I again just put a shell I found online.
901680	905540	The one little trickier thing about this is I had to put ticks right here,
905540	908180	so it would execute slightly out of band.
908380	911960	I could have put a command and then a semicolon or something.
911960	913840	This is just the way I chose to do it.
913840	916460	And I put an ampersand so it would run in the background.
917720	920540	So it didn't screw up what I was doing in my code.
922020	923480	So now I'll show this off.
931510	933890	I have all the functions at the bottom here.
946550	948170	We have root again.
957450	959830	Talking makes my mouth really dry, so...
959830	960630	Give me a sec.
967600	970180	So the next thing I started looking at...
970180	971600	Oh, sorry, mitigations.
971600	973720	In order to mitigate this,
973720	976740	you really should just whitelist those commands for the package installer.
976780	979660	There was only like four or five commands to do with this.
979680	982880	Even if you couldn't whitelist the commands itself,
982880	984620	you could whitelist characters.
984620	988140	I doubt you're going to need backticks or semicolons and a command name.
988320	990620	So that's something that was pretty easy to do.
994990	997250	So this is probably my favorite of the vulnerabilities.
997250	999110	Not because it has the most impact,
999110	1000690	but it was the most interesting,
1000690	1002510	and it took me the longest time to figure out.
1002510	1004490	So we see arbitrary file share.
1004490	1006850	The first thing is, like, what the hell is a file share?
1006890	1008610	In this sort of situation.
1011110	1012190	Here we go.
1012270	1015090	So you can view all of your files,
1015090	1019150	and a file share essentially is a folder that is abstracted with privileges.
1019510	1023650	So the music, photo, and video are shares, essentially.
1023650	1025070	And you don't see this right now,
1025070	1027750	but there's an admin user who has access to other things
1027750	1029690	that you can't see here.
1029850	1030890	So there's some sort of boundary
1030890	1033410	between what you control compared to other users.
1040120	1040760	Yeah.
1040940	1042040	All right, so I was...
1042040	1043620	I wanted to find a direct address
1043620	1046580	or cross-site scripting in this page.
1046580	1049260	So I was looking through, and they did a very good job, actually.
1049300	1050460	While I was looking through the source code,
1050460	1051980	they were checking for the absolute path
1051980	1053760	and see if it was owned by the right person.
1053800	1056100	I was very impressed with how good of a job
1056100	1057660	they did locking this down.
1058880	1061420	So when this gray box kind of approach failed,
1061420	1062700	I decided to take a white box approach
1062700	1065140	and see if I can find anything in this file.
1066260	1068140	And I started looking around,
1068140	1070660	and I started seeing functions I had never seen before.
1070660	1072520	They were very odd to me.
1072800	1073920	And what ended up happening was
1073920	1076580	there was a file that had...
1076580	1078280	or an API that had
1078280	1081220	no usage in the entire UI.
1082500	1084200	This is where my...
1084200	1085520	another analogy comes in.
1085520	1087520	I'm the king of analogies when I talk.
1088460	1089760	So when you're on a diet,
1089760	1091920	and you are really focusing on protein,
1091920	1094280	you're going to get a lot of protein.
1094280	1097500	But you may not get enough vitamin C or something.
1097920	1099060	That's an issue.
1099140	1099560	Because...
1100800	1103380	in the actual code here,
1103380	1104700	these people focus on securing
1104700	1106960	the APIs they actually meant to be public,
1106960	1108740	but not the ones they weren't looking at.
1108740	1110140	So as soon as I saw this API
1110140	1113560	that wasn't used at all,
1113560	1115120	I kind of started drooling a little bit
1115120	1117240	because I knew something was going to be wrong with this.
1122920	1124980	The issue, though, is because this wasn't used,
1124980	1126240	I had to reverse the API.
1126360	1129100	This is the actual source code trimmed down a little bit.
1130540	1133300	So the first thing is there's an action parameter that I saw.
1133300	1134560	This action parameter dictates
1134560	1137500	if you're going to create a folder or rename a file.
1137680	1140080	The create folder didn't seem super interesting to me,
1140080	1142600	so I went on the rename file path,
1142600	1144620	and I followed this down,
1144620	1146400	reversed the API,
1146400	1147700	added all the proper parameters,
1147700	1150960	and eventually I was able to rename files using this.
1151660	1154180	I noticed there was no absolute path check,
1154180	1156040	which meant this was likely going to be vulnerable
1156040	1158140	to some sort of a directory traversal.
1161050	1163270	So now I have a directory traversal.
1163270	1165030	I can move file from any share.
1165030	1166070	You're probably thinking,
1166730	1168090	you're done, right?
1169150	1170290	Nowhere near done.
1170290	1171870	This is where I felt like Alice
1171870	1174570	and I just went way down the rabbit hole.
1177450	1179710	I want to make this a really deadly sort of thing.
1179710	1181430	What if I can move the admin password
1181430	1184890	I just found into one of my shares
1184890	1187730	and so then I can just take over everything I want to.
1187890	1189290	That was my thought.
1189290	1191050	However, whenever I tried moving
1191050	1193330	outside of the shares, it didn't work.
1193330	1194830	And that was the most infuriating thing.
1194830	1196470	I wanted to understand that.
1196470	1198950	So I decided I was going to turn on logging.
1198990	1201430	The issue was that it was a read-only
1201890	1203410	partition on this part of the drive
1203410	1205130	where the code was at.
1205470	1206650	I want to bypass that.
1206950	1208610	I couldn't figure it out.
1208610	1211330	I tried remounting partitions.
1211330	1212670	I tried altering the bash RC
1215090	1217270	I tried altering the boot scripts.
1217270	1218330	No matter what I did,
1218330	1219730	I couldn't get any of it to work.
1219870	1221750	If anyone has any ideas, I'd love to talk to.
1221750	1223290	It would be something fun to know.
1223490	1224810	The whole point, though,
1225450	1227010	of this was just get the logging working
1227010	1228670	and then after like four days
1228670	1230530	of banging my head against this,
1230530	1232110	I eventually decided I can just
1233170	1234370	put a Python file
1234370	1235890	in the root directory
1236570	1238850	and just call the function I needed to call.
1238870	1239970	Because I can write there.
1239970	1241870	It was a really simple fix,
1241870	1244010	but it just wasn't something I really thought of.
1244190	1245810	So I did that, and I got
1246830	1247230	erno18
1247670	1249270	invalid Christ device link.
1250110	1251650	You guys know what that is, right?
1252590	1253390	No.
1253550	1255210	You're not really supposed to know what that is.
1255210	1256610	I had no idea. I googled it.
1256610	1259790	You can't rename files in Python 2.7
1259790	1261150	across partitions.
1261710	1263250	It's just something that happened.
1263930	1265870	I think you can actually do it in 3 for some reason,
1265870	1267230	but not 2.7.
1268330	1269330	So even though
1269330	1270910	I didn't actually get
1270910	1273130	all I wanted out of this vulnerability,
1273130	1274110	I learned a lot.
1274390	1276630	I actually encourage people to go down the rabbit hole
1276630	1278090	if you're just trying to learn.
1278090	1280930	Because now I understand how BusyBox works a lot more.
1280930	1281930	I learned a lot about
1283150	1285810	how BusyBox boots.
1286210	1287190	A lot about how
1287190	1289050	partitioning works. I had no idea how that worked.
1289050	1291530	And that rabbit hole was really beneficial for me.
1292410	1293050	So now
1293050	1295810	I'll show off my vulnerability.
1295810	1298470	I'll explain the parameters first.
1299890	1302010	The first thing you see is the URL.
1302010	1302710	And the URL
1303950	1305830	is just the command
1305830	1307690	you're calling. The JSON is where the interesting
1308630	1309830	black magic starts
1309830	1310690	to happen.
1310690	1313730	The share in this situation is just
1313730	1314930	photo.
1315450	1317710	The photo share is something that
1317710	1319630	the test user has access to.
1320930	1321770	The action
1321770	1324570	is the rename action, which is what we were talking about.
1324570	1326190	The user is the test user, because that's
1326190	1328610	the user we're logged in as in this account.
1328610	1330350	The target path is the
1331470	1332770	file location,
1333110	1334650	but it's actually just the photo,
1334650	1335990	like the share, with
1336490	1339050	the file name. In the example I'm going to show,
1339050	1340770	I use nonce.txt.
1341690	1342810	And the interesting
1342810	1344810	thing is the path.
1344810	1346430	So it's a very classic
1346430	1348190	directory traversal. I move
1348190	1350270	outside of my photo share.
1350370	1352510	I go into the admin share
1352510	1354450	and I move the nonce.txt
1354450	1356570	file into my share.
1358330	1358690	I'll
1358690	1360050	show that now.
1360330	1362370	This one can be really finicky, so
1362370	1364250	this is the one I've been worried about.
1364270	1366370	Don't make fun of me too much if it doesn't work.
1370450	1371050	All right, just got
1371050	1373130	to comment this out.
1374030	1374950	Turn that on.
1379110	1379650	Cool.
1379650	1381470	So I think that worked then, if it gave you the okay
1381470	1383610	message. I guess I didn't really
1383610	1385530	show you what was... So this is
1385530	1387730	the admin one. If we reset this,
1388450	1389490	we'll... assuming they're
1389490	1391390	still logged in, then
1391390	1392730	you should notice that
1393950	1395570	the nonce.txt
1395570	1397530	file is now gone. And if we go
1397530	1399510	to the regular test user, which is what
1399510	1401590	I've been using for everything else, we go to the photo
1401590	1403450	share, the nonce.txt
1403450	1404550	is now there.
1404870	1406190	Thank you.
1411710	1414070	Cool. So again,
1414070	1416230	we should probably talk about mitigations
1416230	1417870	because this is important. If you're
1417870	1419870	at my job, that's
1419870	1421770	mostly what I do, is I find something that's
1421770	1423810	remotely considered vulnerability, I write it up,
1423810	1426190	I tell them how to fix it. That's the important thing the client needs.
1427170	1428110	So as far as mitigations
1428110	1430010	go, if they were just doing an absolute path
1430010	1431830	check, checking for privileges, like they were
1431830	1434250	doing initially, that would have worked wonderfully.
1434630	1435850	But they just forgot to
1435850	1437750	add that on there. So that would have been a really
1437750	1438730	easy fix for them.
1440450	1441810	There were a couple other things I wanted
1441810	1443110	to talk about that weren't really
1444710	1446230	worthy of their own sections.
1447330	1447990	So,
1447990	1450070	the company won't fix this.
1450170	1452230	I emailed them, and they got back pretty quickly
1452230	1454850	but they're like, yeah, we don't really care, these are all authenticated.
1455370	1456330	And I wanted to bring
1456330	1458010	to light an actual attack scenario.
1458010	1460430	So this site also had no Csurf protection.
1460850	1461930	For those who don't know,
1461930	1464230	it stands for cross-site request forgery.
1465110	1466230	An example of this would be
1466230	1468090	if you have facebook.com,
1468090	1470230	your cookies, when you make some sort of
1470230	1471830	action on Facebook, are automatically
1471830	1474190	sent with the request.
1474190	1476850	Which you assume, and it's really nice.
1476910	1477350	But,
1477910	1480170	if you make it from a malicious website,
1480170	1481930	that's also in your browser that you visit,
1481930	1484410	it will actually use those cookies
1484410	1485630	even though it's
1486070	1487990	not the same site you're running on. So an example
1487990	1490250	would be on my bad website,
1490250	1492730	I make a call to Facebook to delete your profile.
1492730	1494530	If it's a git request or something.
1494770	1496490	Which, this is bad.
1496490	1497910	So in theory, someone
1497910	1500030	in a targeted attack could
1500030	1502310	have a Csurf-based
1502310	1504330	website that would then call this
1504330	1506330	API with any sort
1506330	1508970	of user and it could completely take control over it.
1511090	1512370	Another interesting note
1512370	1513310	is that there was
1514410	1516370	a cross-site scripting bug, but it was
1516370	1518330	I didn't really feel like showing it off because I literally just
1518330	1519770	put script alert script
1520190	1522170	in a description and it worked.
1523270	1524870	Wasn't really that cool.
1525630	1526290	This was
1526290	1528290	over HTTP for some reason.
1528670	1530350	Don't know why, but the web server
1530350	1533110	you could host it with was over HTTPS.
1533190	1533910	I don't know why,
1534610	1535970	they clearly knew how,
1535970	1538390	they just chose not to make this over HTTPS.
1538830	1539830	It's kind of odd.
1539990	1542430	The other, also kind of fun thing,
1542430	1544270	was when you turned it on, it had
1544270	1547070	the default password, admin1234.
1547610	1548630	And it forced you
1548630	1550510	to reset it as soon as you got on there,
1550510	1552450	but if you knew someone was going to set this up,
1552450	1554150	you could potentially just log on there,
1554150	1556250	reset the password for the person.
1556770	1558410	It's kind of hypothetical,
1558410	1559310	but at the same time,
1559310	1561670	you could really screw with people doing this.
1569860	1571000	Cybersecurity does not have
1571000	1572140	to be horrifying.
1572940	1574920	Everything I did here was with known tools.
1574920	1576960	I even used Notepad++ people.
1576960	1577760	Come on.
1578440	1580700	I used Python, Burp,
1580700	1582580	Grep, Google,
1582580	1583760	and uncompile 6 tool
1583760	1587320	to decompile the source code.
1587320	1588220	Other than that though,
1588220	1590480	I used everything that was super basic.
1590480	1592080	Everything I found
1592080	1594000	were very known vulnerabilities.
1594000	1595740	A lot of them are in the OS top 10.
1598140	1600100	This is not block magic.
1600200	1601940	The key to all this stuff
1601940	1604320	is understanding how stuff works
1604320	1606520	and then manipulating it.
1607000	1609440	That's hacking. Thank you.
1616080	1618460	Also, I work at Security Innovation.
1618520	1619840	We do web app
1619840	1622400	pen testing. We do a fair amount of IoT stuff too.
1622420	1623360	Amazing company.
1623360	1624700	Just started working there pretty recently.
1624700	1626080	I just graduated from college.
1626080	1628760	If you're interested, come talk to me.
1629680	1631480	Anybody have any questions?
1631960	1633960	I'd love to talk about stuff.
1638900	1640300	I could.
1640820	1643280	All these exploits are on my github.
1643280	1644480	It's mdoolin2.
1644480	1645660	I didn't put it up there.
1646260	1648100	All the exploits are on github.
1649080	1650580	If you want to look at this,
1650580	1652940	my github account is mdoolin2.
1653180	1654680	Go crazy, folks.
1659750	1662250	I listen to Dark Knight Diaries,
1662250	1664110	Malicious Life,
1664110	1666410	and I also listen to Security Now.
1666690	1667930	I've really only been doing
1667930	1668930	this security thing for
1669850	1672350	a year and a half, maybe two years at the most.
1672350	1673830	Security Now is how I learned
1673830	1675110	to talk the game.
1676310	1677790	It's like a two-hour podcast.
1677790	1679770	I'd just listen to it walking from my house
1679770	1680890	to school.
1681270	1684030	That was really helpful for me for talking the lingo.
1685590	1687050	Any other questions?
1692710	1694290	If there's no other questions,
1694630	1696250	I would love to talk afterwards.
1696470	1698270	There's a lot of other things you can find on this device
1698270	1699230	if you're interested.
1699470	1702110	If you want to talk about how to get a job,
1702110	1704070	or you're depressed or something,
1704070	1705250	come talk to me.
1705390	1707250	I'm a pretty happy and chill guy to talk to.
1707250	1709430	If you have any other questions, feel free to come up and talk.
1709430	1710150	Thank you.
