start	end	text
0	2060	How y'all doing?
2100	8260	Thank you for joining us here for our reverse engineering talk.
8780	12660	It's my pleasure to introduce Sydney Jones.
12660	23620	She's a cyber security researcher with expertise in reverse engineering, vulnerability assessment and AI evaluation.
23620	41060	Today she'll be presenting RE for the rest of us, an introduction to reverse engineering, a beginner-friendly session that explores both software and hardware, RE using Arduino and Ghidra.
41060	51510	From toggling LEDs to inspecting binary behavior, Sydney will walk you through our fundamentals in a hands-on, engaging way.
51650	54670	Please join me in welcoming Sydney Jones.
54670	55410	Yay!
56630	57990	Thank you.
61240	63040	Hello, hello, everyone.
63220	68300	This is my second talk that I've given at DEF CON, and I'm truly happy that you're all here.
68380	71040	So first to just talk a little bit about myself.
73200	75440	I've already had a great introduction.
76140	77680	I'm currently a Ph.D.
77680	83160	student at Virginia Tech, and reverse engineering is something that I'm starting to learn more about.
83160	87180	And so for me, it's like, as I learn, I want to be able to teach at the same time.
88560	91640	But outside of work and school, I also have some other interests.
91640	93780	My other interests are gaming.
93780	95140	I like Animal Crossing.
95140	97460	That's a picture of my Animal Crossing house.
97520	100880	So it's like all pink, and I've done all the possible upgrades.
101180	104860	Like my bank account on Animal Crossing is high.
106060	108900	And then I love Apothecary Diaries.
109820	112440	That's one of my favorite ones going on right now.
112440	115140	I also like painting, like acrylic and watercolor.
115340	120220	And that's a photo of me when I went to Paris last, and it was amazing.
123270	125610	So to quickly talk about our agenda.
126410	129890	First, we're going to talk about an intro of what is reverse engineering.
129890	136750	But then we're going to have to start doing a lot of exercises, and it's going to go like really fast for us to complete everything.
136750	142130	We're going to do a continuity test on our Arduino board using the multimeters that were handed out.
142310	153010	We're also going to identify the different chips on the board to see like, oh, this is your whole, like, this is the chip, and this is what it does.
153410	157470	We're then going to look at assembly, and look at the executable.
157470	167690	We're going to flash firmware to the Arduino Uno, and then we're going to go use Ghidra, and show the executable code being decompiled.
167690	172010	And then lastly, we'll talk about any takeaways and resources.
174470	182150	So since we are moving fast through this, if you're interested, download Ghidra here.
182230	189270	And if you're interested in flashing the firmware to the Arduino board, go to this GitHub website.
189830	196130	So that's why I have a picture of Anya there, because we're like, she's Russian, and we'll be moving fast as well.
196410	204290	But also, if you have any questions, like, please stop me, because I want us to be very involved, and for everybody to feel like they gained a lot from this talk as well.
204390	213070	Reverse engineering is the process of analyzing an existing item to extract technical information required to reproduce or understand it.
213290	216890	So reverse engineering looks at something to see how it works.
216890	225530	The goal is not only to replicate it, but it's also to understand the security structure, logic, and it could be hardware-based or more software-based.
225530	232510	A lot of times with reverse engineering, we're either starting out with hardware that's broken, or if we do have software, we only have part of it.
232510	234630	So we have source code, but we don't have it...
235350	239290	we don't have the binary yet, or we have binary with no source code.
240130	250930	But also, reverse engineering involves having physical access to the hardware, and a lot of times we look at data sheets, and we try to find any existing documentation.
253030	271830	Hardware RE is the process of actually taking apart a physical device and looking at it bit by bit to examine the components, whereas software RE is the process of looking at the binary source code that we see on the slide and taking it back to something that is human-readable.
272810	278470	It's also useful for analyzing malware, validating software, or recovering lost code.
279570	281410	So physical disassembly.
281410	286170	We have our meme, we have our sandwich, and we have our sandwich disassembled.
286170	295050	So this is when we take apart tools, and we use specialized tools such as a heat gun to physically remove the different components.
295050	300270	Now, we're not going to do that here with the Arduinos, but that's the main point with this one.
300270	303850	This also comes into play when people are fixing cell phones.
304050	307930	They also take your screen off your phone and just replace it.
307930	311130	That's a part of the physical disassembly process.
313630	323530	So another step when it comes to reverse engineering is we want to identify the different components on our IC board, and we want to look at all the part numbers.
323770	326270	We want to look up the data sheets for each chip.
326810	334030	And to do this, we could simply use a Google reverse image search, or we can use sites like Octopart to identify the components.
336750	338930	So this is our first exercise.
339390	344670	You're going to identify the different IC boards.
344850	355450	So on your Arduino board, we're going to pick one component, write or take a note of the part number, look up the data sheet, and then we want to answer three questions.
355590	356810	What does it do?
356870	358550	How many pins does it have?
358550	361970	And what interfaces or protocols does it use?
363870	369370	So I put that on a slide because I know that it was really hard to see on the boards.
370810	376070	And then I also have a zoomed in picture so that everyone could actually see it.
376830	391850	So the goal is we'll take about five minutes, and we'll search up the this part number, and we want to include the maker, which is Atmel, and we want to include all the number here, and then answer those three questions.
392530	393850	What does it do?
393850	395430	How many pins does it have?
395470	397990	And what interfaces does it use?
398390	401410	And then I'll set a timer for like five minutes.
405810	412470	Also, during this time, if there are any questions, you can ask a question related to the exercise too.
413630	434770	And also, as like a cheat code for this, the GitHub link that I did show earlier for my GitHub, it's... if you have the GitHub code, I mean the GitHub link from earlier, you could just go there, and there will be data sheets to search from instead of having to go online.
436170	438330	I can just show that as well.
438330	443770	So like, go to this GitHub, and then there are data sheets there.
444510	447570	Has anybody found... has anybody found one?
450310	450950	All right.
450950	453290	Well, I'll just go... I'll go into it.
453570	454610	Well, actually, no.
454730	457790	Does anybody have a solution for the first one?
458530	464670	Like with the... with this first Atmel Omega 16, what that does?
466950	468030	Yep.
468030	469030	Okay.
469030	469890	Thank you.
469890	471090	Thank you.
471090	472590	All right.
472830	478830	So, this board here, this is a serial... a USB to serial converter.
478830	484870	It has 32 pins, and it uses UART serial as well as USB.
485290	498830	And the reason why I included this picture is because looking at the data sheet does tell me all that information, but also when I look at the board, I can see that all these connections here, they actually connect to our USB port right here.
498950	506270	So, I know that's like, okay, it's some... it probably has something to do with that component, and I know it's connected to this too.
506390	513590	I can see it connects to other stuff, like maybe my oscillator that's right next to it, some resistors.
513610	522510	So, it's like I'm I'm taking my visual knowledge into account, but then also leaning on the knowledge I gained from the data sheet too.
524490	541150	The next one, this is a 16 megahertz crystal oscillator, and this board is going to be present on... this component is going to be present on most chips because it provides a clock signal that drives... that allows timing for your microcontroller.
541150	542790	It only has two pins.
542790	554270	This is a passive timing component, so it doesn't have any interfaces or protocols, but without this oscillator, the processor wouldn't know how to do a wait command or a delay command.
554770	559970	It would... and this is essential for running everything at the right pace.
561250	577230	Then, next, we have a 47... I think it's called a farad, like micro farad, 25 volt capacitor, and this is important for how we power up our board.
577230	589530	So, our board has two different voltage outputs, a 5 volt and a 2 point... and a 3.3, and our capacitor allows both of those supplies to happen without having any voltage fluctuations.
590790	595230	And this also has two pins, and this is also a passive, just normal component.
597290	610450	And then, lastly, we have our 18 mega, and so this allows us to have our... this is the brain of the Arduino, and this handle handles our input and output and controls peripherals.
610450	614330	It has 28 pins and uses UART.
615370	626930	And because of our 18 mega, these are the 18 mega pins here, and these are our digital pins, we see that it actually bridges the connection there, so it's directly connected to the board.
627630	633170	Like, we could see, like, how it's set up by just the... like our circuit setup.
636610	641650	And this is also important for later on when we use our digital write and digital read commands.
644260	651720	So next, to continue our hardware reverse engineering process, we want to check the board's connectivity.
651960	654900	Sometimes you might order a part and you're like, does this really work?
654900	658720	So we have our multimeters here to make sure that it actually does.
658720	665240	So we want to locate voltage and ground, identify our power and ground pins, and then do a continuity trace.
665440	673080	There are so many times where if the board connects... is ever exposed to too much heat, it won't work the same, and then our continuity test will actually end up failing.
673680	676060	So it's important to sometimes check this.
677340	686700	So not only will I tell you the steps, I'm also going to show a video of how to do it, and then for the people that do have multimeters, you can go and also do this test live too.
687140	692860	So first step is to look at the back of the Arduino board and see the soldered traces.
693200	696480	Choose a single line to trace like I have here.
698060	707780	Place one like your positive probe on at one end and the negative on the other, and then you're going to put your multimeter in continuity mode.
708160	711040	I also have the video as well.
712820	717200	And so for this one, our Arduino is not plugged in yet, so we're all good there.
717200	734000	So for this one, first connect your black and red cords to your multimeter, and then you also want to switch to your continuity mode.
734980	739400	And then once it's on, you're automatically going to see a zero L, and that means open loop.
740060	746600	And then... okay, I hear beep, so that means that somebody might have it working.
749100	762320	Then once you hear... then once it is like actually connected right, you know it's connected because you're going to hear a beeping sound, and you're also going to see 0.00, and that means that you have a zero ohm resistance.
763220	772260	But I just want to give everyone like a chance, like and even if you have your multimeter, you could also hand it to someone like close by and allow them to do the test as well.
772580	778440	But I'll just stop for like a minute or maybe two and just have everyone do the test.
779420	784080	For those doing the continuity test, is it going okay so far?
788850	790930	All right, I think we're all good there.
795460	810640	All right, so now that we've successfully completed the continuity test, another test we could do that I'll just show up here for time so that we can get to other parts is that we also want to test our voltage.
810900	818300	Sometimes this is very important as well because we want to make sure that it's actually functioning as expected.
818540	824020	So what I did was I had a... I hear something working, so that's good.
824880	831640	So I had the three point... I'm testing both my 3.3 and my five voltage outputs to make sure that they're working as they should.
832920	840800	And I see that I have my five volts and I see I have 3.3, so this is just important to make sure that your board works.
843260	849060	All right, so now that we've done that, we're also going to locate our diagnostic ports.
849060	851740	This is another step to hardware reverse engineering.
852500	856500	This provides direct access to the device's internal systems.
856860	861960	Many times you'll have UART, JTAG that allow you to read your system memory.
863180	868980	Shout out to everybody who had... I hear the beep, so I know that it was actually... that y'all had it working, which is cool.
869640	879680	These ports... the ports such as UART and JTAG allow you to bypass many security mechanisms and are valuable to extracting and analyzing your firmware.
879800	882340	And in our Arduino board, that's our focus for this one.
882340	889840	We have a USB socket, a USB type B socket, but this I included as well to just show all the different types of USB.
891660	896640	So now that we've done that, we've completed our hardware part.
896640	901640	Just like Ash, we actually want to collect all the possible firmware extraction.
906970	908170	All right.
908170	909530	It sounds like y'all got it.
909530	910330	That's good.
911750	914770	We want to collect all the possible firmware extraction.
919590	927570	But instead of Ash collecting Pokemon, we want to pull all the different firmware and binaries as possible.
927670	934190	So now we're more so transitioning into a more software-based focus instead of before we were more like hardware-based focus.
934410	947570	So typically to extract your firmware on your Arduino, we want to use the USB port, and we're going to extract it from the bootloader.
948550	963030	And we normally would use tools like AVR Dude, or I don't know how most people do pronounce that one, but we're going to use our tools that allow us to take the contents of the microcontroller's flash memory and save it as a binary file.
963030	965170	Now, in our case, I've made this very easy for us.
965170	968450	I already have the ELF file ready for download.
968450	976150	So instead of having to use the tool and pull the firmware from each of these yourself, the binary is already ready to go.
978170	980970	But this is a very important step overall.
981270	987170	Once we have our binary file, we're then going to do flash analysis.
987770	993170	First we're going to extract the embedded files using tools like Flash ROM.
993170	997350	Then we would use Binwalk to identify the file structure and format.
997350	1000850	It's going to tell me do I have an ELF file or an EXE file.
1000930	1005590	Then we're going to analyze any systems present using Ghidra.
1005590	1009150	We might find strings, we might find passwords, stuff like that.
1010190	1015490	And then also we could use tools like Floss or GREP to find more sensitive data.
1019280	1021720	And we will walk through like this process.
1021720	1023800	We're actually going to walk through this later on.
1025700	1030580	Another important discussion to have is to talk about our different binary formats.
1030700	1034100	So for us, we're looking at an Arduino and it has an ELF format.
1034360	1037460	That stands for executable and linkable format.
1037720	1041500	And that is because Arduino is more like a Linux based system.
1041500	1043180	It's also open source.
1044300	1050760	And these type of files could be analyzed using Abijay Jump and GDB.
1051480	1054020	But also EXEs are important as well.
1054020	1056080	And these are more Windows based systems.
1056520	1060240	All tools will still work, but Ghidra and IDA Pro are more popular.
1064170	1067010	So we also got to discuss disassembly.
1067270	1072750	Because any time we have a binary, we must disassemble it so that we can get it back into human readable format.
1073250	1080050	I have this meme here because it's like writing code is one thing, but writing code in assembly is another thing.
1080050	1082510	Like it's a whole different ballgame.
1082510	1094090	This picture here also here shows what regular C code looks like, what our intermediate code such as assembly looks like, and then what binary code looks like.
1094350	1100510	So it's the same file, but it's in three different formats as it is on your system.
1101750	1106110	And I will also show a quick example of this.
1110130	1117030	So for this example, I actually wrote a C code, just something very, very simple.
1117810	1122030	And I'm using Nano just to open up the C code that I wrote.
1122070	1124950	And so all this code is doing is adding two numbers together.
1124950	1127590	It's adding 5 plus 12 and getting 17.
1127590	1129330	And then it's printing it out.
1129370	1130950	Very chill, right?
1134290	1140460	But once we start to see that in assembly and once we start to see the binary and the hexadecimal, it's not going to be chill.
1142250	1147130	This is what it is when I executed the code just to show that it does work, no errors.
1151360	1158900	And then this is the assembly instructions that go with that same code.
1158900	1163240	But even looking at this, although it is a lot, it's not so bad.
1163240	1169980	We still see that there's two functions that are declared called EAX and EBX.
1170180	1172280	We see that they're added together.
1172780	1181020	We see that it calls printf, which is something that might lead us to say, oh, this is C code versus being another language.
1182340	1186520	So even though it's slightly more complicated, it's still somewhat.
1187060	1196100	And I also added some comments here so that I could be able to document and know my thought process here too.
1197700	1201440	Then we're going to look at our binary instructions as well for this.
1208540	1219840	I also use object dump to look at some more of the assembly as well as it gives me a visual of what's happening in memory.
1221300	1223260	But we still see a lot of the same stuff.
1223260	1227400	We see like a lot of the same add and move components of it.
1227580	1232240	And then this is a picture of the hex dump of that same file.
1232440	1235160	And this is more of the binary representation of it.
1235360	1238100	But as we see, this is not as useful to us.
1239860	1242320	So what happens is a lot of time we get this one.
1242320	1243500	We get the binary.
1243500	1247720	But we need to go back and try to get the C of that same code.
1247720	1249220	And it's not easy to do that.
1250460	1256000	But I hope that this was just good to see the different representations of one file that we have.
1256940	1261520	So now that we've done that, we also want to do code analysis.
1261520	1267380	There is static analysis of code that allows us to understand the code without executing it.
1267380	1273120	And then there's dynamic analysis that allows us to run the program to observe behavior.
1278820	1284340	And that dynamic analysis involves executing and watching the code of what it does.
1284340	1288760	That's when we were able to see the print and the add, the 5 plus 17.
1288940	1293840	And our goal whenever we do code analysis is always to understand what the program is doing.
1293840	1296600	And we construct the logic and the architecture.
1298380	1301480	But we also have to stop and talk about documentation.
1303100	1307980	I had this meme because it's like so many times we skip documentation.
1307980	1311720	But documentation is actually the thing that makes this process easier.
1311720	1327420	I also include this memory map because as I'm looking at my different tools such as Ghidra, I want to be able to have a location in memory and have some description of what might be happening.
1327620	1331880	Common tools are flowcharts like is here or a memory map.
1332040	1336200	We also have diagrams and pseudocode that we write.
1339440	1346660	So, we're going into the next exercise where we're going to flash software onto the Arduino.
1349220	1353200	And for this, we will download files and then
1357320	1359980	first download all the INO files.
1360040	1365580	And then this is the steps and process as to how to flash that onto your boards.
1365580	1368140	And I also have a video showing how to do that too.
1369300	1370940	So, we can do this.
1370940	1376160	If you do have everything in front of you, you can do this live or watch the video to see.
1381300	1385820	So, first we're gonna go to our Arduino cloud platform.
1386860	1392020	This actually, this video assumes that you already have all the INO files.
1392020	1396220	The first one that I go into, I named this one blink of an eye.
1396220	1402020	And the purpose of that is just because I have a light blinking on the board.
1402140	1404160	So, that's the function of the code.
1405980	1410660	Another important thing is there's always drivers associated with hardware.
1410700	1416160	So, I must download the Arduino driver to my computer before it can communicate.
1417220	1419540	So, that's what I'm showing here.
1420200	1423200	I need to install the Arduino cloud agent.
1425940	1429900	So, once I do that, then I'm able to talk to the board with no problem.
1446080	1453180	Okay, now that I have that done, I'm going to verify the code and then I'm going to upload the code to my board.
1454220	1460480	And so, once it verifies, you get a notification or it shows you everything that happens here.
1461520	1463540	And this code is actually very simple.
1463540	1472260	It just blinks the LED for half a minute in 200 millisecond intervals.
1474040	1476560	Sometimes uploading does take a little while.
1485190	1487670	Okay, I did not show it actually.
1487910	1491010	It was uploaded, but I didn't show the end of it being uploaded.
1491710	1495760	And then once you have that, the main point of it is to see the...
1496950	1500010	once you upload the code, you'll see your Arduino light blink.
1503560	1512760	And then there's also the other two INO files that can be downloaded from the GitHub are these two as well.
1517870	1524310	So, does everybody have the INO files downloaded from GitHub that is following along?
1528020	1529240	Okay.
1529240	1530400	All right, that's cool.
1530400	1530960	No, it's good.
1530960	1532040	It's good that I'm like...
1532040	1536920	I don't want to race past things or not fully explain.
1540890	1544190	But I'll actually... I can do the same with my computer too.
1548910	1561110	But actually, I'm also going to just go skip to the video that's the last one, because the the INO file, this last one, is actually the most important.
1561110	1562470	I call this one give me the addr...
1562470	1563490	give me the addy.
1563590	1567550	But the point really is because I'm... the addy is not a location like a house.
1567550	1572230	It's like a... it's actually a location in memory that I'm like referencing.
1572270	1575130	So, that's why I use that as the name.
1575450	1587850	But this is the code that is currently a part of the... so, this is the header file also.
1588070	1591670	And this is the INO file that I mentioned downloading.
1592370	1596330	And once this is uploaded, it's going to do two things.
1596330	1601310	It's going to add two integers together, but it's also going to print out the user credentials.
1601470	1604510	And I show that in the video of how this works.
1606750	1623850	And this is the one that we'll use as we go into Ghidra and look at the elf in the binary file, because it actually has... it's the best because it has two numbers that we're going to add in memory, as well as having user credentials that we're going to search for.
1623850	1632670	So, this secret header file, it actually contains... it contains a username for Alice and a password called password.
1632850	1645770	And when I show my header file back before, when I actually look, I declare two constants and I declare them as chars.
1645770	1655130	And this is important because when I'm going in Ghidra and I'm trying to find these two in my reverse engineering process, I have to know the data type.
1657030	1666710	But I'm just going to stop for, like, maybe two minutes, allow everyone to download all the INO files, and then try to flash those files to your board.
1666770	1671930	And then after that, we're going to jump into the Ghidra reverse engineering process more.
1672070	1680550	And then also, like, from the audience, give some feedback of, you know, how things are going as well, for those that are following along with it.
1683000	1692040	Okay, so now that we've successfully flashed to our board, we saw different codes running.
1692200	1698540	We're now going to go to the actual tutorial of analyzing our C code in Ghidra.
1698680	1703060	So, as part of this, we have three objectives.
1703060	1706420	We want to locate the main function in the decompiler.
1706420	1710820	We want to observe how variables are mapped to registers or memory.
1710900	1718160	And then lastly, we want to identify the username and password that we saw in the header file from before.
1719400	1726300	I also had a short tutorial on getting up and running with Ghidra for trying to install.
1726520	1739120	But for the sake of time, I am just going to jump straight in and show everything instead of starting all the way back at the beginning of just installation.
1740740	1742200	It's launching right now.
1742200	1744120	Just give it a second.
1746380	1747300	All right.
1747300	1753500	So, this is the main... when you first launch Ghidra, this is what it looks like.
1756700	1759520	And the text is very small.
1762630	1767370	But the first thing I did is I opened up the...
1770350	1776490	this is what the... so, this ELF file is available on my GitHub.
1776830	1782290	And this is the ELF file of the C file that we saw before.
1782290	1783730	Or the INO file.
1783890	1793230	So, when I showed the give me the addy, like, pick the INO, this is what it looks like in binary and in assembly.
1794490	1797350	Ghidra went in and analyzed it for us.
1799250	1804590	So, on the right side of the screen... or on this side of the screen, we have...
1805990	1809570	I want to make the font bigger because it is kind of hard to see.
1811810	1812150	All right.
1812150	1815210	So, unfortunately, I'm not going to be able to zoom in.
1815210	1819630	So, I'm just going to have to go and try to explain the best with the font being little.
1820630	1825490	But on this side of the screen, this is all of my assembly.
1825570	1827510	Assembly is good.
1827510	1830730	But we're not going to spend a lot of time looking at that.
1831350	1836330	Instead, we want to spend more of our time looking at our decompiled code.
1838290	1839050	All right.
1839050	1840490	So, yeah.
1840490	1842870	I did not mean for that to be that difficult.
1842870	1844990	But this is actually the view that we want.
1848450	1851750	This on the left side is our assembly.
1851790	1858610	And on the right side is our other part of the code, the disassembled code.
1859730	1865210	And I do appreciate everyone for just kind of, like, being there with me.
1865330	1866890	There's going to be a lot going on in the screen.
1866890	1868710	I do have notes up here, too.
1869430	1870530	But it's fine.
1870530	1872310	You guys can see them as well.
1872950	1882150	But just going back, like, here we were able to see that we don't have to do much to find our main function.
1882210	1888670	Because it already tells us, like... I was trying to do too much.
1888670	1890070	But I think this is fine.
1891070	1897350	So, I'm just going to quickly just explain what I was trying to originally explain and try to get back on track.
1897890	1898510	All right.
1898510	1899770	I'm sorry about that.
1899950	1905230	So, first, we have our two different ways of seeing our code.
1905830	1912830	And in our source code, we have four integers that we wanted to that we want to try to locate.
1913270	1916590	The first objective was try to locate the main function.
1916610	1919570	Although it's really small, you can see that.
1920050	1923550	And it also is there here.
1923810	1930070	When we go to ELF and we go to... this is really small, but it says functions.
1930290	1932690	And these are all the functions that's there.
1933050	1935610	And I believe one of these is main.
1935870	1937450	This is main there.
1937450	1941810	It allows you to jump directly to main in the assembly code.
1942130	1949310	From there, we now want to observe and understand how the variables are mapped together in memory.
1949310	1952530	The four variables that we have are A, B, C, and D.
1952530	1953770	A is 5.
1953770	1956390	B is 12 from our previous tutorial.
1956630	1960270	And then we have D and E, which are two hexadecimal values.
1960310	1962970	And I'm actually going to go and search for those.
1963290	1966970	So, to do that, I'm just going to do control F.
1967390	1972210	And this allows me to search for them.
1972210	1973590	One of them was called BD.
1973590	1974970	So, I type it in.
1974970	1979010	You also need to hit all fields.
1979010	1985110	Because just the comments, that's not actually where that variable is found.
1985290	1987370	So, I search all.
1987710	1990330	And it highlights it multiple times.
1991270	2003970	So, from there, I was able to find that whenever I saw this location in memory, I was seeing R24.
2003970	2012130	And I was able to find some relationship between this hexadecimal value and these assembly lines.
2013490	2021490	So, I was able to see that... see a relationship between that.
2022370	2030470	I find that in Ghidra, our value is called also when you search and find...
2030470	2037870	when I do the control F command and I look at my hexadecimal value, it also gives me search results.
2038110	2041390	So, these search results are good because you don't have to go and look at all the code.
2041390	2044010	You're only looking at your search results that you care about.
2044710	2052070	And I find that my hexadecimal value of BD is R24 on their code.
2052250	2053730	And I do that for all of them.
2053730	2055590	I also do that for the other one.
2055590	2061930	And what I was able to find is I was able to break down where addition was happening.
2061930	2065250	So, our other code that we're looking for is A1.
2065730	2070310	So, I search for that and then search all.
2070530	2072770	It will give me some results.
2073290	2075530	It is case sensitive as well.
2075790	2078950	So, searching it out.
2080750	2087850	And then from there, you'll see all of the different lines where it happens.
2097970	2102750	So, now I'm going to go to trying to find the user credentials.
2104970	2114570	And so, what I do for that is I just actually... we discussed a little bit about finding strings in our previous section.
2115150	2122950	So, for there... so, I go to search and I go to four strings.
2126550	2131410	And this is going to find every single string that is in my code at all.
2131410	2134170	I don't have to go through any more work for that.
2134190	2136830	And these are all of my string values here.
2138610	2154270	And, again, sorry for the small font, but what you find is that your username being Alice and your password being password123, that all of that was actually... it was hardcoded into the header file that we saw before.
2154270	2160510	So, because of that, Ghidra is very easily able to track that, even though it only had the binary.
2160570	2169870	So, it only had the binary of the code, but it could still find the actual username and password that we downloaded and that we used with our Arduino earlier.
2173330	2182970	I can also find it in assembly, but it won't be as easy or as nice, but I could also just search for it this way as well.
2184930	2188390	But when I do search it,
2194080	2197080	I have to... first, you need to click on this one.
2206740	2215140	And what this shows is these are all of the different letters or characters of the password broken up.
2216900	2220740	And this is all of the locations in memory where it's actually stored.
2220740	2233520	So, we're able to find that the way our code works is it saves each letter of our password, one character at a time, and every single one is saved at a different location.
2234420	2239520	So, this is my very simple and very easy Guidra tutorial here.
2239940	2243320	It wasn't supposed to be anything too crazy or anything too much.
2243320	2249660	I kind of just wanted to show some relationship between C code, assembly code, and binary code.
2250040	2253440	I'm gonna hop back to the slides to close us out.
2256610	2258650	So, we completed that.
2258890	2261710	These slides actually also will be available on GitHub.
2261710	2266850	So, like, if you do have the time and you have the interest, like, you can walk through each everything as well.
2269050	2271390	And I definitely highly recommend doing that.
2271390	2275450	I also even have a little video of how to install Guidra and do all that stuff.
2276350	2280910	So, for our tips and takeaways, I have my Naruto here.
2280950	2292430	You know, Naruto wants to be Hokage, but it takes time, it takes energy, it takes work, and it also takes some repetition and practice as well for him, just like it does for us when it comes to reverse engineering.
2292630	2296630	It can feel overwhelming at first, but you don't need to know everything to start.
2296630	2302730	Focus on learning a few core tools like Guidra, Binwalk, and ObjectDump.
2302730	2307330	They're all available on Kali Linux, which is free.
2307330	2310850	And then use this to build your experience.
2311150	2314150	And you will definitely gain the skills that's needed.
2314350	2326830	My other tip is to always document your reverse engineering process, because when you find a similar device, it's very helpful if it's already documented, and it will make doing the next task five times faster.
2327190	2329970	And then lastly, practice makes patterns.
2329970	2332330	The more you do this, the better it'll get.
2332670	2341030	Some future learning resources are these two YouTube, one YouTube page, and then one of this GitHub IO.
2341110	2342950	This one is really good for me.
2342950	2348670	I've personally walked through at least about half of these, and I'm working on doing the second half of them.
2348670	2352170	These helped me a lot to gain a lot of skills and experience here as well.
2353150	2363410	And then I also just want to show you my GitHub page, so that you can easily find all this material, like slides, all the files, the headers, everything that you needed.
2364350	2370910	Also, I even had the Guidra exported on my GitHub, so that that will be really good as well.
2371110	2372670	So, this is my page.
2373250	2375830	Well, actually, my page is shown on the slide.
2375830	2378230	So, I'll let you go through that as well.
2378450	2382210	And then this is my LinkedIn also, if you would like to connect with me later.
2382570	2384370	But I definitely appreciate it.
2384370	2389290	I appreciate you all attending and taking your time to spend time with me for the last hour or so.
2390530	2391190	Yeah.
2391190	2396410	And then if there's any questions, I am welcome to answer them.
2406090	2412350	You said, have I thought about doing reverse engineering on stuff that I know has known vulnerabilities?
2412830	2414230	A little bit.
2415150	2415810	Somewhat.
2415810	2417250	I would say, yeah.
2417250	2418470	I mean, it's very helpful.
2418470	2421730	Especially, let's say you have a binary that has a known vulnerability.
2422130	2424590	I would say looking at it that way.
2424750	2430910	Also looking at malware and different executables that I know cause vulnerabilities.
2432170	2432530	Yeah.
2432530	2433290	Definitely.
2434510	2435170	All right.
2435170	2435830	Yes?
2436470	2437270	Okay.
2437270	2444420	That is... that is here.
2454700	2455200	Yes.
2455200	2457560	And again, thank you all for just attending the talk.
2457560	2459000	And I hope you all enjoyed it.
