Good morning. Good morning. That might have been a really premature guys. Let's see. So thank you for being here It's like freakishly early in the morning like 10 a.m. And I'm really not a morning person, but I really hope that you all are that might help me a little bit So the presentation is going to be about procedural fantasy city creation using geometry nodes Super quickly about me. My name is millis. I'm the union. So I have like two minute long surnames So I'm not gonna waste half my time explaining it, but I'm a digital math painter I'm a concept artist and an environment artist all these kind of general roles and I spent maybe five or six years working in London at the big VFX houses on movies this kind of stuff and Over the last couple of years I've gone freelance and been working on smaller projects But the cool thing that that's enabled me to do has been to Create my own pipeline quote-unquote where kind of blender has ended up at the center of it and This presentation is sort of about my journey over the past you're to learning it and you know kind of experimenting with geometry nodes and I really hope that You can take something from this because I learned a lot and I hope that you can all enjoy now Let's see if the clicker works It does okay, so These are like a selection of screenshots that I kind of made with the basis of this procedural 3d city that I made in blender and Throughout the process I kind of had I guess a theme for it Or you know, maybe I just came up with that like for this presentation But I did have a premise or a goal and kind of questions that I wanted to ask and I hope wanted to answer and The main one being can like an untrained monkey sort of typing You know Shakespeare's works learn the general geometry notes from scratch over the course of Whatever amount of time, but hopefully reasonably quickly And you know having no technical skills. I'm not a programmer. I can maybe write hello world this kind of stuff but I'm just using the provided tools and kind of going from scratch and The next kind of premise being Can I go beyond the typical scattering approach when it comes to creating cities because I always used to just you know Scatter a bunch of houses, but if you zoom in nothing really conforms to the ground these kind of things So could I use geometry nodes to create something with like a little bit more order and or you know Hopefully more controlled chaos something like this and Take it a step further for my workflows and you know if you can fit into my pipeline all these kind of things and In many ways the project was definitely not maximally efficient I went down a bunch of rabbit holes that you know I couldn't get out of and couldn't figure my way out of and I had to back out and learn different things and there are certainly a lot of creators in this community with far better skills than me and As I talk if you have any ideas don't shout them out But afterwards, you know, you can tell me and I'm open to hearing suggestions for how I could make things better This kind of stuff. So big. Thank you to the community for you know all the help and support even though usually I kind of just invisibly stalk the forums and Kind of giving a disclaimer on this whole project I'm a big cheater and I use Photoshop. I use comp to make my images look prettier and I don't want to disguise that fact in any way but Blender has kind of been the Workhorse of this entire project. I would say 90 plus percent has been done in geometry nodes And then as you can see here, you know, I have photo bashed in some people this kind of stuff on top For like a little bit of concept art. You could take us a step further, but you know time limitations all this kind of stuff and I kind of developed this manual procedural manual Sandwich way of working where you know, hopefully I can do some sketches some simple blockouts of something I want manually and then use that as a base to do a bunch of procedural work and then, you know, go the last mile doing manual work again and My goal right now is to give like an honest assessment of this whole project And I hope that you can join me on the personal journey as I go through this Next slide Okay, so here's a bunch of buzzwords. I only think in buzzwords I you know throughout the whole process obviously I'm not having natural thoughts and this is totally not just for the presentation to make it look smart or something, you know all these words but the basic idea was to kind of start the work from a simple base which was the central ring and Kind of grow the city out of it. So I have an anchor that is manually placed. I can manually control it you know, it can be a square or whatever and I Generate the city out from that the cliffs are kind of generated from the bottom faces of all the buildings or all these tower structures, so Usually I think in the real world, you know, the ground comes first and then you kind of build on top But here I just did it backwards because it seemed to me like the city was The the main part of the show and you know the landscape kind of just then how to conform to that and I made a bunch of sand and stuff at the bottom and Okay, stick into reality was not my primary concern with a lot of these formations But I guess that's also something we say when we fail to hit photo realism. So then it becomes a style and Yep So, you know, there's some judgment that maybe you can throw my way on that But I kind of like this idea of these ridiculous cliffs holding up these buildings that kind of stuff and You know the rule of cool and all of this kind of stuff but the whole process was really a big exploration and Kind of like with all my projects in blender, you know there was a lot of playing around involved and kind of treated the whole thing like Lego modularly and whatever and so the basic setup actually for this is that I Did like a really redneck DIY loop of you know, the central ring generating some towers from which I spawn some bridges from Which has four more towers from which has four more bridges and you know having sort of like this fractal layout or pseudo Fractal and then at the end you kind of can go through all of the generation noises and do some seed cherry picking Which takes like three weeks to settle on one because you know, that's kind of like a really addictive part and I think I kind of went with the top left one and Here's like an example of you know without any buildings on top without any houses, whatever just a setup of the Towers and the bridges and This terrain is just sort of like that taken remashed Kind of just with some shaders applied to make it look like rocks Here's a bunch of nodes that I made for this project. I was supposed to count them. I have like X written down so that many maybe a few more actually and thank God you cannot read anything because this nonsense and Geometry knows kind of enables this creation of little groups things like this from which then you can build bigger and bigger and bigger things and And kind of really stack your whole project, you know where you can start from like really simple basic building blocks and Kind of put together something really big and as you go this process accelerates because you have more and more stuff to work off of and you know, some of these even made made it through the whole process to change too much and Certainly there are creators in the community who are really really good at this and better than me and there has been some overlap in that But I think it's really rewarding to kind of understand the inner workings of your own stuff So then when something does explode, you know how to fix it and So I kind of roughly let's say split them out into levels I mean mainly just for the presentation. It's kind of arbitrary, but you know at the base level you can have something really simple just like selections Some very very fake bevels some subdivisions that are random whatever and then from those you can build like a next level of stuff Which is sort of targeted material of applications Let's see what else kind of some scattering stuff mesh island based selections and then from those You can kind of build the next level which here I have You know stuff like laundry wires fences stairs, which then you know, you can see how that starts becoming like basic solid building blocks of buildings and stuff like this and then from those you do make houses you can make What else minarets markets Temples all this kind of stuff and then stacking those together you can kind of have your overall big city layout I'm really glad this one is too blurry to see And yes, I did do those connections manually I'm kind of really hoping for loop nodes to come out and and kind of make this obsolete and of course then you have this when you go back to your old nodes and You know, I think we've all kind of like gone through this spider web process Usually with other people and you know here see I didn't put like an output on this node so there's no escape that little detail and Here's a bunch of work in progress stuff. So obviously Blender has much more to offer than just Geometry nodes and there's still all sorts of stuff going on like modifiers and I use vertex groups and shading to accomplish some things and We're still in this intermediate stage on the way to I guess everything nodes I hope where I have along the way found some bottlenecks where I kind of end up being like okay I need to decimate something and you know squash down the setup into a decimation and And then kind of expand further but funnily enough You know, I would leave the project for a couple of weeks and then come back and realize half my setups are obsolete because Just the software is evolving so fast and it's gotten like 10 updates since I last opened it and I have to update I mean, it's either that or like Someone else in the community comes out with some node set up similar to mine But infinitely better because they have like a three digit IQ and I don't And so, you know, I kind of you know, then steal stuff from them and Keep it really quiet, but that's why I'm not gonna publish some of it because I don't know where it starts and ends so yeah, I definitely went through a lot of versions of this project and kind of a learn as I went along and At this point of no return it's time to make some mood boards because you know, once you're in the middle of the project that is the correct time to start and I don't know if any of you work professionally, but that's how we do it in big leagues That's not a joke Here you have some photos that I took From Alhambra mainly in in Granada, Spain For the fourth that was a huge inspiration and for the city itself a lot of stuff from India and Nepal I mean, I think the inspiration is really clear and You know, it always helps to have some real life reference to aim towards the kind of see the level of detail this kind of stuff and I did do some shading.  No evil speak no evil. I don't Jesus Christ. I don't touch that everything is tri-plane art and I kind of had this experience where I went With having more and more and more materials as I expanded and then you know kind of I made this on a laptop So at some point it overheated and I had to scale it back down a lot to just having a limited number of materials Which I'm gonna call Giga shaders not because they're good because they covered a lot of things and You know, you can have at the scale that I'm working out here one wood texture or something like this and Based on object ID, you can vary it a little bit and suddenly like it seems like there's a lot of different types of wood All these walls are taking from my photographs. So based on location height normals I can adjust them to kind of You know conform to what I need. Here's a lot of trim textures sort of stuff I used for fences which was more efficient than doing a lot of stuff in geometry Thank God the video works So this is kind of like, you know speaking of variety this is a selection of the kind of Buildings I made for the tops of these tower structures and you know for the texture stuff actually a lot of it comes just from modeling detail lighting stuff like this so you can Kind of rely on that at this scale quite a lot and so I wanted to have a lot of variety so I made some temples and parks some housing districts markets minarets and a lot of them are connected with bridges wires all this sort of stuff just to kind of you know Have it hopefully look more organic and you know one is I'm the only guy who zooms in no one ever does People just scroll through our station. So no one's going to see this anyway and Here's like the house setup that I had made Which here I'm kind of showing with like a floor plan that I'm Adjusting as I go along But in the project it's sort of the tops of those huge tower structures that I plug in and use as a you know base Okay, I forgot I had this so that's kind of like how my whole explanation of this feels you know the step one step two and You know there is obviously that kind of Element to this explanation of it, but you know It's not that much more complex. You kind of just take the floor plan assign some island indices to kind of Determine how many floors the building is gonna have extrude it that amount Subdivider sides to make some windows and doors and then draw the rest of the owl And you know around you can do some markets and some other stuff And I'm totally glad to explain this but I'm think I think I'm talking too slow or I have too many slides But you know here I have it sped up 2x and I'm not gonna lie I was not planning to say that I was planning to pretend that the setup is much faster than it is But now I kind of feel embarrassed now that I'm here So it is slightly bit you know slower than this But you know you can just create a whole city based from this and it's kind of like you know some Grebals on steroids really and I'm not scattering anything. Everything is actually just extrusions and stuff from that base so You know using vertices faces edges you can create different stuff like fences wires poles the markets and Here is the This is the video. That's not gonna work. All right be like that so this is the same setup applied with a different I guess coat of paint which is you know also different Kind of types of windows and doors and all this sort of stuff But you know, I'm trying to make it versatile so I can reuse it in the future and as I'm going along I am trying to make it more Coherent and stable, you know if I create a new building currently the previous stuff still gets affected in some ways so with this I was really trying to fix that it does work and There's you know some stuff flickering so I think I need to merge more vertices by distance, which is the Band-aid to everything and Here's another screenshot. I don't have a title. I just put this in so I can like breathe because I'm not good at breathing I'm talking at the same time So in large part I made two overarching setups for the city and the castle area just because they required slightly different Approaches, but you know, they start from the same base different stuff happens in the middle and at the end a lot of the These tools that I had made are reused and whatever doesn't look good gets hidden by fog and stuff like this That's the master tip So this is sort of like that same thing showing the central structures, you know for the castle and the idea was that you know I can plug in any sort of base and Have the castle formation all these buildings actually conform to them perfectly whereas if you just scatter stuff, you know, you're gonna have these kind of Connection problems and obviously when I show it like this, you can tell which ones are sort of generated from the same base whatever but My argument is kind of that if you go to a real castle, it is kind of generated, you know All the towers are generated from the same Setup I guess and then affected by whatever is underneath them and actually like here with the toppings title I wanted to be really funny and put like a pizza slice, but that would be too cheesy I'm sorry And then okay, so another sort of filler slide, but you know, there does come a point when I start thinking I'm kind of tired and let's do some things in a way that's slightly more cheaty and So that I think kind of happens around this connection point in the middle And you know perfection is the enemy of progress all this kind of stuff And I want geometry nodes to be another tool in my belt rather than you know Replacing everything and so I think with the castle itself That was the perfect point to sort of illustrate this approach where okay, the towers are procedurally generated You know the terrain all this but there's stuff in the middle. That's actually from the Plaza de España in severe Spain Just from the Google Earth data, which is another really interesting kind of worms But I don't have the time for that sadly, but you know the focal point is then organic and so If you do too much in procedural setups, you have like these diminishing returns So if you only have to mix one of something probably better to just kind of bash it out manually and whatever you have a lot of then You can do that stuff procedurally and So I forgot all of my words No, okay, so there does I Don't know. Yeah, like there does come this point where You kind of go. Okay. I've made enough procedural stuff and Maybe it is better to kind of try different approaches and I think you know the official answer to that Is to say something like okay, there is a time cost calculation, you know all this which there is But also there is just an element of okay. I'm tired of this. I have a craving to upload something and get some likes on art station and Yeah, and so at this stage I kind of did that and I've played around with a lot of interesting new tools I mean everyone's kind of seen stable diffusion, so I've been using photo bashing and and that to create the spaceships and whatnot In all of this I did have a spaceship set up kind of done But the reality is that it was not as good as some of the other ones that I have seen at this presentation, so I'm not gonna put it in mine is extremely extremely janky and Yeah, so this is kind of like a good example of you know, just the paint over stuff And I think like look I'm one guy working on a laptop half the time on the kitchen counter with like a fun printer at my laptop and so You know, I don't have huge resources, so I kind of cut it there But the cool thing is you know, I've managed to render this out And this is kind of like an emperor has no clothes moment where you see it without all the fog But I kind of made the camera fly really fast so that you know, you can't focus too much on the details, but You can do some really cool virtual photography using kind of procedural city approach because you know you're in this process of discovery, right and You know, you can kind of peek around corners take some photos and I really enjoy that and You know, I hope that this kind of illustrates where I was At this stage where I finished the 3d so some lessons to be I kind of learned I guess You can separate elements into individual project files and that really Kind of enables you to work faster on smaller things You know, I wanted the host house setup. I kind of did it in a whole different setup and that really helped and You know just for speed this kind of thing because if you work in one project it explodes Yeah, so small atomic building blocks Better than giga ultra combo nodes. That's why I kind of did all this stuff where I You know made everything kind of procedural and bite-size and and and that kind of has really worked well for me and It's unhealthy This does not match No one cares this procedural seed you use because I always spend like hours and hours on this and in the end they all kind of look the same and Yeah, I mean, yeah, people just scroll through stuff really fast So, you know, if your overall setup looks good, the seed doesn't matter too much and More wires are always better. So just laundry and telephone cables and all of this kind of stuff How am I doing for time because oh? My god That's not and then if in doubt add more volume metrics You know and I kind of tried this in 3d. It was a little bit heavy. So I did it mostly in 2d and Booleans are not your friend. So I've made this mistake a lot and lastly, okay, just to wrap this up Blender is still not fully a hundred percent of my pipeline You know, I still do this stuff in 2d whatever but it has really eaten up Everything else that I was previously doing in other softwares in 3d. So that's been amazing And I'm kind of really, you know refreshing the developer pages like come on come on come on Do more stuff I'm really ungrateful because I don't contribute. I just talk but You know guys, this is the slide where I would put my contact details But I'm like minus nine thousand skill level at self marketing.  I wanted to say obviously. Thank you to the community. You're fantastic clap for yourselves my way Even better, thank you to the devs and now you can start at the end. Thank you very much


we have Dennis here. He just gave a talk at a main track and this is a continuation of his talk where he's going to do a quick review and then he's going to get into some of the stuff with the Xiaomi firmware and the ARM Cortex-M. I said that in a weird order. Sorry for my Yoda. All right, and with that, are you ready? Awesome. Here's Dennis. So, yeah, thank you. So who are a few have been actually in the Flamingo and saw the ever talk? Oh, okay. So I'm sorry the first 10 slides might be a little bit, you know, like coming, might be a little bit similar to the main track, but yeah, I mean I tried to get quickly over that. So the outline for the talk would be like the following. So I give you a short motivation, give you an introduction to the Xiaomi cloud and then we go to the devices and now the important part comes the step by step binary patching. Some information about me. I'm a researcher at an official university in Boston and I'm working with Professor Gewaerner Bier. I'm also a grad student at the TU Darmstadt in Germany and working there with the Zmolab. The main stuff what I do at the moment is I do reverse engineering of interesting devices, interesting devices in terms of devices which I can use in my home, for example, or use on me. So IoT at the moment is very interesting for me, smart locks and as a lock-paker, of course, also physical locks. Okay, let's start with your motivation. So why do we reverse IoT? And this is like more or less depending on like the so-called attacker model. Some people do that to find and exploit vulnerabilities to hack other people, but the more interesting stuff for me is I want to give you the possibility to disconnect your devices from the vendor's cloud. They have been like a very famous incident I think in May this year where the company Yee-Link just disconnects all the European users of the LADBOPS, by the way, just this company, disconnected all the European users of the LADBOPS because they thought like, yeah, the GDPR is risky for us because we're collecting a lot of data, so we just kill it like for all the people from Europe out of our cloud, which make all the LADBOPS in Europe more or less useless. But like two weeks later, they created like a European cloud, especially for the European users, so now it's okay again, but the thing is like it shows us that IoT devices are strongly relying on the vendor. Another thing is we want to get more functionality, for example, adding new features or localization. Devices like the smart home gateway speak Chinese, I don't, so it would be better if it would speak English or German or whatever. Another thing is also geo-blocking. Some of the devices are only working in specific countries, so if you try to connect specific IP cameras like in U.S., they won't work because they rely on Chinese servers which block U.S. IP addresses. So to avoid that, you need to do reverse engineering there.  In May 2017, I started with Daniel Wigema, and he is sitting in the front row here, and with the vacuum cleaning robots and the Xiaomi Mi Band, which is a smartwatch like this, which is also from Xiaomi, and we continue to work on the smart home gateway, the LADBOPS, mostly all the stuff that you see in the front of me, but even more, so over the time, a lot of devices were coming around. Okay, so how about the Xiaomi cloud? Xiaomi claims actually to have the biggest IoT ecosystem worldwide, so way bigger than Google or Samsung. They have over 85 million devices and 800 different models. The most interesting model that I saw so far is a smart toilet seat, actually, which has Wi-Fi and Bluetooth and can recognize the person who's sitting on it and setting up the temperature and making some lightning stuff. If you buy a product which is working with the Xiaomi cloud, then the chances are very high, but it's actually not produced by Xiaomi, but by a third party vendor. So what the cloud ecosystem is doing, it connects different vendors in one ecosystem, and all the devices are using the same protocol. This cloud system also supports different technologies, and for us as a risk engineer, the most important thing is the implementation is different from manufacturer to manufacturer. So if you see a device which is like super secure and they have all the stuff enabled like secure boot and so on, doesn't mean that it has to be the same case for all the other devices which are in the same ecosystem. Also the software quality is very, very different, so you see sometimes very stupid things, the best thing that I saw is like some file which was copied from Stack Overflow or something with some example for a batch script, so you see everything there. So this is some overview about the clouds. So what we see here is the main three technologies which we use, Wi-Fi, Bluetooth LLE and ZigBee, and the central component if you have this kind of devices, it's your smartphone actually. So on your smartphone you usually have the Mi Home app installed, and the Mi Home app is making sure that the devices get their initial setup. So you enter your Wi-Fi credentials in your smartphone, then your smartphone is talking to the IoT devices, and as soon as this is done they create their own connection to the internet. So after that they connect it directly to the internet without like the smartphone. So you can walk around with your smartphone, but the devices have still a connection. So in next step I take a look at the cloud protocol for the device to cloud communication. To connect to the cloud you need two credentials, and the one credential is the device ID, which is unique pair device. For the Wi-Fi devices it's like an 8-digit number. For the other devices it depends, for ZigBee devices it's I think some MAC address for the Bluetooth devices is also some number. And there are two kinds of keys. There's a cloud key. This is used for the cloud communication, so device to cloud communication, and this key is also static. For most of these devices it's burnt into the one-time programmable memory, so you cannot change it yourself. Every time you boot up the device it gets loaded from the one-time programmable memory, and if you do updates, if you do provisioning and so on, it always stays the same. For the token it's a little bit different. This is used for the app to device communication. For example, if you want to control the vacuum cleaning robot in your local network, it's a little bit time critical, so you don't want to wait like one second for the command to go over the cloud, so you can speak also directly with the device. And for that they use also a key, which is dynamic. That means every time you connect it to a new Wi-Fi this key gets regenerated, so it's a different key, like every time you create, for example, a new Wi-Fi or if you provision it newly. The payload itself, this protocol can speak TCP and UDP depending on what you block. So if you block TCP, then it just will happily talk over UDP, and this is how it looks like. The payload is encrypted, and the encryption key is more or less depending if you're speaking with the app or if you're speaking with the cloud. The important thing here is if you have an unprovisioned device, which you take just fresh off the packet or you have done a factory research, then the device tell you the token, which is like the second secret key, in the checksum field. So this is required that your smartphone is able to provision the device. As you see here, they do some integrity thing. This is so the checksum is also protected with the key and all the other stuff is encrypted with AES. One interesting thing here is we have this epoch timer, maybe I see it here. This thing here, which is a UNIX timestamp, and this is also used for time synchronization, because usually if you boot up a device when it doesn't have time, so over this thing, they can also synchronize the time. The protocol itself is JSON for method messages, and every packet is more or less identifiable with a packet ID, and you have two different structures, more or less, methods and parameters. This could be like commands or results. For example, if the cloud asks you something, when you send a result to the cloud, or like the vice versa. The thing here is every command and response is confirmed by the receiver. So you always make sure that the command has actually reached. I have here one example for such a command. This is the actual login, more or less, of the device to the cloud. So what happens here is if you see here, it tells the cloud which kind of Wi-Fi you have, which is the SSID of your Wi-Fi access point, what's the local IP address, and so on. For example, also the version number. So let's take a look at how these devices do their updates, and there are three different methods how they can do firmware updates. There's one thing where they can do app updates, which is the main software, more or less. So the cloud tells the device, hey, here's the firmware update under this URL, and the ND5 checks them, but you should expect us like this. The second kind of updates are MCU or Wi-Fi updates, in case of like some devices that's for example the firmware for the ZigBee part. Here is also telling like, here's the URL where you get the firmware update, but they have no integrity checks. So basically we don't tell the device what kind of ND5 has to be expected. So if you change anything there, like for example, you modify the firmware, why it gets downloaded to the device, they have no way to figure out that something was going wrong. And there's also sub-device updates. For example, if you have this smoke detector, it gets updated over ZigBee over the gateway. Then it's more or less the same thing. Instead, they have an additional checksum, which is the CRC32. They give you also the ND5, but the ND5 is actually never checked. So the protection for this kind of firmware is CRC32, which is, who thinks it's safe? Okay. So one example for communication relation here is between the light bulb and the cloud. So this is just to illustrate again, the light bulb itself connects directly to the cloud and have their own, all the stuff encrypted, but it can also connect over your smartphone. And the keys are different, of course, in terms of, it depends on the communication. Okay. So how we can disconnect these things from the Big Bad Xiaomi cloud? And for this, we developed last year a software which is called DustCloud, which acts more or less as a proxy. And this is the way how it works. So basically, it is in the middle of the communication between the device and the cloud and can act as, has different modes for it in this case. The exact modes are the following. You can use the DustCloud as a proxy. So what happens here is it takes the commands which are coming from the device to the cloud and forwards them to the cloud. Or you can just use it as an endpoint. So the commands are not forwarded to the cloud. The device thinks that it's a legit Xiaomi cloud. So it's a perfect emulation of that. You can read the traffic in plain text so you know what's going on, which data is sent to the cloud. You might even send your own commands to the device. For example, if you want to do firmware updates, switch on the lights, switch off the light. And the things what you can do also is like you can change and suppress messages which are coming from the cloud or going to the cloud. One interesting question here is, for example, if you do firmware updates and the cloud wants to push firmware updates onto your device, you can just block it or it can just change the URL or the MD5 checks for your firmware. To make the DustCloud work, you need a few things. And the first thing you need is the device ID. Then you need the cloud key so to be able to decrypt the traffic or to create the traffic. And then you need to do the DNS direction so that the whole traffic is like coming actually to your DustCloud. Okay, let's take a quick look at the products. So I'm sorry for the people who wear the other talk, it's like the same slide. If you use the Mainland China server on your smartphone, which most of the people do because the server supports most of the devices, then your smartphone supports 260 different models of devices. And this device could be Wi-Fi, ZikB, Bluetooth Ali or even combinations of that. And so this 260 are more or less depending on your server location. If you are coming from Taiwan and using the Taiwanese server, then it's like less than 100. If you are in U.S., it's a thing like 20, 25. The thing here is the models are not always compatible. So I have a rice cooker which I bought in Taiwan like two weeks ago. And I cannot connect it directly to the Chinese cloud. So I have to modify a few things because they make sure that you stay in the regions. Like I said, not all the products which are actually sold for the Xiaomi cloud are actually from Xiaomi. So this is like, I mean, this is not very official. So the thing is I just found it out by configuration files. So that most of the products are actually by the company Lumie, which are producing all kinds of different sensors like smoke detector, motion detector and so on. And also the gate base. Xiaomi itself has only 11% and most of the time they are like the Wi-Fi routers. Then we have also Yeelink, which is making like all the lightning stuff. One important information here is in this cloud, the smartphones are not connected. So basically if you have a smartphone from Xiaomi, it's not connecting to this cloud. It's like a complete different system. So we're connecting here only the stuff, everything which is like smart home in your like fridge and so on. It's not the smartphones. Okay. So now you might ask, okay, about how many devices I can you give you actually any information. And from the student 6C models I have actually 42. And my inventory is more or less 99 devices, which I bought myself for using or was engineering. Okay, let's talk about the architectures which I use usually in this kind of IoT devices. We have the Cortex-A CPUs, which are more or less the same stuff which you have in your smartphone or Raspberry Pi for example. Then you have the Cortex-M's, which are embedded devices and they are like two flavors, the one which have like Wi-Fi. So if you have a device which has only Wi-Fi, then it's very likely that it's a Marvel chip. If you have devices which can do both things like Wi-Fi and produce early, then it's very likely that you have a media tech chip. There's also a thing called MIPS, which are mostly used in IP cameras or in some routers and extensor, which some of you might know as ESP8266 or ESP32. And the focus of this talk will be more or less this. If you want to know more about the Cortex-A CPUs when you need to watch the recording of my other talk. There's one good news. I mean, we have a lot of vendors, but there's one good news and vendors are always lazy. So after looking at a lot of firmware's, what I assume what the development process is looking like, they're just taking the SDK or tool chain from the chip vendor. In this case, for example, Marvel. They add some SDK which is coming from Xiaomi. And they're just looking for an example which fits the best. For example, okay, we want to switch on the light and or switch off the light. So we need to control GPIO. So in this case somewhere, there's an example like, okay, how to switch on a GPIO. So we're taking this example, change a little bit the source code, compile it, it runs, publish a firmware. So the good thing about that is all the firmware's are more or similar. The memory layout, the functions, the strings. If you know one of them, then it's very likely that you know, that you get a better impression about the others as soon as you see the others. So with one point which I always love to talk about, why I hate ESP8266. Every time I buy a device and I see the following, I open the device and I see it's ESP controller, I'm always very, very sad. And the reason is the following. This extensor architecture is like a very weird architecture. It's like difficult to reverse engineer, not because it's secure, but the thing is, it's very hard to find a decompiler for that. I don't know if actually any decompiler is existing. This assembler support is also very limited. So there's a community plugin I think for IDA, but that's all. And most of the time you can't really use JTEC because the GPIOs are reused for other stuff. And I think the JTEC support is actually not existing more or less. The good news is it's very easy to replace the firmware. And there are two reasons. You have most of the time you have some connections. In this case you can connect to the serial or you have the pins which you need to ground to make it more or less slow to firmware. So the people here who worked with ESP8266 probably know that. And the other thing is speaking about updates, you can push the update over UART or you can just create your own OTA update. And the reason here is we don't use SSL and they transmit their unencrypted firmware over HTTP. And they don't check for the MD5. So, wow. Yeah. But reverse engineering of that stuff is not making a lot of funds. So this is like a desk lamp that they have from e-link and you have to sort of stuff and yeah, not so nice. There's one thing. If someone of you knows how to reverse engineer ESP8266 firmware and can show me and it works for me, you can win this very nice light bulb, smart light bulb which is not in ESP, I promise. So if anyone knows that, then come to me and you can get this very nice light bulb. Okay. Let's start with our devices. So here we're talking about the smart home gateway, the loud bulbs and all the added D strips. I put it in one group because they have the same processor, they have the same chip, they have the same layout so it's quite easy to work on them. So to remind you, these are the devices, for example, so they have the Wi-Fi connection directly and if you take a look at the hardware, we see the following. So we have a Marvel CPU which is a Cortex-M4F with 200 megahertz. We have a little bit of RAM, like 512 kilobyte of RAM. And depending on the device which we have, the light bulbs for example have 4 megabyte of SPI flash and the gateway has 16. All of them have Wi-Fi core and for all of them, the device ID and the key is stored in the one fingerprint memory. So if you dump the flash memory, the SPI flash for example, you don't get the key because it's on the chip. Especially for the gateway is that it has an NXP ZigBee chip. So this is like a special different controller on the device which takes care of all the ZigBee stuff. Okay, so this is like also an overview about the chip itself. So what you see, so an interesting thing here is more or less that this Marvel CPU has two ARM cores more or less. So you see one, it's the Cortex-M4F which has also this communication processor which takes care of all, like for example, Wi-Fi and so on. For the gateway, the question is okay, what kind of ZigBee devices you can connect to that and from Xiaomi, or like from the Xiaomi cloud where like a lot of devices are available. For example, door sensors, temperature sensors, power plugs, motion, detector sensors, buttons. One of my favorites is also the smoke detector which is always a thing like, hey, let's put security related, safety related devices into the cloud, what can possibly go wrong. Or like some smart door locks. Okay, so let's get a little bit more technical. So if you taking a look at the partition table of the gateway for example, you will see that they have the typical thing what nearly all of the IoT providers do. They have multiple copies of the operation system. So basically here, the application firmware, this FW is existing twice. The Wi-Fi firmware is also existing twice. And you have a boot sector and some partition which holds all the config variables. Right. Oh yeah, so the important information here is also that if you have a firmware update, it's actually the image of one partition. So if you do a firmware update, then it's just overwrites complete partitions. It doesn't replace single files because there's no files available, but it just completely replaces the partition. So, how we can get the keys? It depends a little bit on the device. So for the smart home gateway, which I have actually open here, so if you want to take a look later, it has a lot of test points and it has SWD enabled by default. If you ever have this kind of device, then here is the layout of the pins. We have SWD, we have a serial port there, so we can get some information. And the information we can get is actually as soon as the device is running, we can connect over SWD and just dump the whole memory and get the key from there. If you connect over serial, then you can get access to a CLI. And I mean, this is like a long list of commands, but the most important are this one. So you can, if you connect it over serial, you can update the firmware directly without any need to manipulate like manual models or whatever. So you can just send your own server there. So while it's very easy to get access to the gateway, it's a little bit more difficult if you have, for example, a light bulb. And then the question is, hey, can we get access to this thing without a hardware attack? And a hardware attack, what I mean with that is, so the light bulb that you see here in the picture is actually at the end of the day, if you want to extract the chip from there, you have to sort it open because it's like, you know, a little complex to open it. So this is usually the case which you don't want to use after that, after you get access to this device. So what we want to do is we want to get some access on the device without soaring the device open. And the good news here is again, the firmware are not signed, so what we can just do is, hey, just create a modified firmware which gives us the key automatically. Okay. The bonus of that would be we don't need a hardware access, but there's a big problem. And the problem is in a difference, for example, to the vacuum cleaner which runs a complete Ubuntu operation system, this light bulbs have a bare metro as, so basically you have no, so you have just one binary which is running and no like file system where you can change like individual binaries. So we need to patch the binary. Okay. So let's talk about binary patching. So if you have a binary, what happens quite often is that we have some, in our original code, we have some function which is running and at some point you have some for example branch links which are jumping in some other code. Our goal if you want to modify this thing is that we have some patch code and we somehow manipulate this branch link that instead of going to the original code it goes into the patch code. To not break the functionality after that, we want to go back at the end so we want to call the original function after that again. So what does it mean? So we need to modify the program flow, we need to add existing additional code, but the trick here is also we need to use existing functions because all the things which are not present in the firmware we need to bring somehow into the firmware. Okay. So why is binary patching so difficult? Especially for ARM it's the case so as soon as you overwrite branch instructions the new address is more or less dependent on the program counter so you cannot work with fixed addresses in the branch links. Most of the time if you want to modify binaries you need to write new code in assembly which some people can do but I think most of the time it's a little risky especially if you have a light bulb they have only one shot to put your firmware on it. If it crashes then the light bulb is done. Also what you need to do is to model the address space so you need to have some idea what the ram does look like if you want to access the ROM and so on and you need to make sure that you have specific free space for patches later and you need to call existing functions and now the problem is because we have a lot of devices you need to handle different firmware versions and different devices so luckily for us there's a great great tool for that and which is called Nexmon and this takes care of most of this problems. So what's Nexmon? Nexmon was initially developed by Danny Wiegema and Matthias Schultz at the Zemo Labs and at the TU Dammstadt. Danny is also here in the first row so if you have any questions for him he is happy to answer that it's a C-based firmware binary patching framework and it supports Cortex-A and Cortex-M binaries so you not only can modify Cortex-M firmware but you can also modify Cortex-A binaries in your Linux system for example and the main use case of this framework was to modify the full mag Wi-Fi firmware in for example smartphones or like an Raspberry Pi so what you can do with that is you can modify the ARM firmware in your smartphones Wi-Fi chip so for example the idea of that is to enable monitor ports so you can see a Wi-Fi traffic which is not supposed for you or you can do other stuff for our use case we want to use it to modify IoT firmware Nexmon itself is quite black magic so it contains a lot of make files scripts and GCC plugin so this is more than the map what it does for the Wi-Fi firmware but for us we don't need so much so for us the simplified version is absolutely okay the interesting thing here is that what Nexmon does for us is taking our patch and it makes sure that it gets linked to the correct functions which are already existing in the code so we don't care of all the linking and so on so we don't need to do it manually the requirements for that are the following so we need at some point we need to have the firmware of the binary of course then we need to know the memory layout so where the functions are or how the binary is loaded for example or how the memory is looking like if you want to write patch code then we need to have free space on the flash for the patch code if you don't have enough free space the flash chip is already full then you need to make some free space in terms of delete functions which are hopefully not used and if you want to reuse functions you need to know the function names and the signatures and you need to know where they are okay like I said this is a step by step approach let's start with step one and between the firmware so the whole time I've been talking about the smart home gateway but it's more or less the same for the laptops and for all the other products which are based on this chip okay so how we get to firmware there's one possibility if you open the device you can just dump the SPI flash for example JTEC SWD or the solder the flash a helpful tool if you want to use JTEC or SWD you can use Raspberry Pi it's absolutely sufficient for that and open OCD the good thing is Marvel gives you all the tools already to connect to this chip over SWD JTEC if you disordered the chip you can read it out with flash run the other possibility is that you intercept the traffic by the firmware update but here the idea is the following it's very advised that you actually block the updates that you get that you intercept the firmware update but you block it for the device because you don't want the device to actually update the firmware and here Xiaomi gets a little bit sneaky so if DNS is failing if they try the first time to update the firmware over with the DNS address and it fails when they sent the command again this time with IP address so if you're clever enough to redirect the host names in your router then in the second time this device will be updated for some devices not for this lightning stuff but for our devices if they use SSL most of the time you can just use fake certificates or what they experience if you block SSL at some point they fall back to HTTP and they do the update to HTTP the goal of this whole thing is to retrieve the special URL for the firmware update and the reason is the following if you want to download the firmware the file names are not easy guessable because the file name of the firmware update has the MD5 checksum of the firmware update as you usually don't know it you can download it the other thing is where CDN is using authentication so basically you get some kind of token to download the firmware which is a thing valid like for two months or so but still you need to have this token to be able to download the firmware if I just give you the URL with the file name you can download it you get the access denied so you need this URL let's assume that you have it already so you intercepted it for example the fire shark or you have the firmware image the next step what we need to do is we need to pass the firmware firmware has the bad altitude that they have proprietary format and it's like difficult in idar pro for example and you need to know where the segments are what the segments are, how big they are and where the entry point is so our goal here is to convert the firmware to some kind of elf format or elf file because the elf file has some description and it tells you where the segments for example are so we need to understand how it works and the idea here is the typical thing what you do all the time so you get some kind of SDK from the vendor for example for Marvel you can download their Amazon SDK and you just compile a sample firmware and you just look okay so at some point you have the elf file and then you look okay what's the output and then you try to figure out what's going on there and for Marvel it's the case that it creates at some point the elf file and they're using then later in the script the tool which is called EFX to a firmware which converts the firmware to a binary format so we did back then the RIS engineering for you so this is how the header looks like from the format format and we have a tool which can go from this binary format into the elf format and from elf back to binary there's one fun thing which I never tested but if someone of you has the smart Barbie doll it has the same chip actually so this is for the people of you who don't know that it's not from Xiaomi it's from the Barbie company whatever Barbie is doing it's actually a doll where your kids can tell your Barbie some stories and then as parents you can listen to the stories on your smartphone so if your kid is telling your Barbie a secret then you as parents will know that a little bit scary but yeah in case of media tech the format is looking quite similar again we have some kind of segments this time we use some kind of checksum while the Marvel firmware has no checksum in there basically if you change specific like if you change the URL in the binary then you can upload the binary and it should be fine so let's take a look at the workflow for Marvel so let's assume we have intercepted the firmware we download the firmware ourselves how we get the how we pass the firmware so as soon as we run our parser tool what it does is it figures out where the sections are and creates for us the sections as individual files and two kinds of scripts and one script is the description of the sections for the LD command which is later important for manufacturing to rebuild the firmware and the second script which you get out of our tool is that it gets commands for the object copy and also the LD command so if you run the builder command then at the end of the day you have an L file which is built up correctly as an example here this is the command which I run for the firmware which I downloaded like a few days ago and I actually yeah it's a quite new firmware you see the build date this is the data where we build actually the firmware and you see it has three sections and when we run this is how the thing looks like and as soon as I run this builder script you see there at the end of the day we get an L file which is also correctly working and in theory you could take this L file and run it on a Linux but I think shouldn't do anything at least yeah so having the L file now what can we do next while we can load it in a disassembler so I use IDER because I got at some point an IDER license I think most of you will use a different disassembler to load the file into IDER and you can figure out where the interesting areas are what I figured out at some point is that you have some spaces in the firmware where at some point the data from the one-time programmer memory is copied into this space so basically what you see here are the three main interesting fields tag MAC as the place where the MAC address is stored later tag DID is the address where the device that is stored and the key below there there's also the model number so theoretically you could get the model number but the model number is known and there's also an area for the server for example if you have a Taiwanese device when it's like TW there or if you have Chinese device it's empty right so now we need to prepare all the data for next month I showed you the partition layout in the beginning so what we figured out is that the partition has a size of 614 kilobytes and the size of the original firmware is only 569 so basically we have a lot of space for our patches so the trick is as we need space for our patches we just append 1280 null bytes which is that bad in hex so we end with a new section file we have chosen section file 2 because it contains all the code where we have the original section and we have the patch code so this is looking like this so now we have some space to put our patches in if you do it in Linux it's quite easy you can just use DD to do that so at the end of the day we have some space for our patches now the next step is we need to figure out the function names and for example for every function but you want to use later in the source code in your own patch you need to figure out if it's existing already in the firmware or not or you have to introduce it later so how we do that again we take the SDK we compile an example project which more or less contains all the stuff which we need later and because it's compiled with debug symbols what we can do is we can load the binary bindiff between our unknown executable and our example executable for either there's a free plugin which is called bindiff which you can download for me only the version 4.2 works so 4.3 is somehow completely bugged and doesn't work for me so how does it look like so you see here on the left side the name primary these are all the unknown functions which are in the binary on the right side the name secondary these are actually the functions which I used for my example project which I compiled myself so basically I can align all the functions all the unknown functions into my unknown firmware I think 70% of the functions are unknown after that so for our example for this gateway I have chosen a few functions which are interesting for me there's a PC get command which is doing a get query to a web server I found out what the address is for that there's a bind to hex command as nprintf is also quite useful the nprintf is a console output so if you connect it over serial then this command is used to output anything over serial and for the Xiaomi cloud specific there's a command called or a function called otu timer info and this is actually rocking command to the cloud if the device is connected over UDP so like I said this device can communicate to the cloud over TCP and UDP so if you patch the UDP function and something goes wrong we have still the TCP function so we can maybe unbreak the device if we did something completely horrible wrong what we use here in this otu timer info function there's at some point an snprintf and this is like the address of the snprintf this is also useful for later ok so after that we have the binary we have we know how the memory layout looks like because the header file of the firmware told us more or less where the segments are loaded at which memory addresses we created more free space for the flash of the patch in the flash for the patch and we know now the functions function names and the signatures so we need to configure our nextmon so nextmon like I said is consisting of a lot of different scripts and now I give you a step-by-step thing what you need to do if you want to add a new device the first thing is there's a firmware version file where you just need to create define a number for the device it could be any number just some number which is internally used by the gcc plugin of nextmon you can find a new device and maybe a new firmware and the next step we need to tell nextmon if you create a device where it can find everything so for example where is our original code this information we know from a deposit tool and also we need to tell where is the space for the patch code and for both things we need to tell how much space is available especially the patch size so you don't want to go over over this I actually don't know what happens if the patch is bigger than this but usually it should never happen so the next thing is now we want to define the existing functions so like I said for me the interesting function was httpc get so here you see the device sorry the function name and the signature arguments that it has and what you do here is and this is the important thing is you tell more or less the nextmon framework at which address it can find this function in the firmware and the same stuff we do for the binterx function we do it for nprintf and we do it also for this vmprintf which is giving us the console output so by this we telling it can find the stuff for this one particular device and for this one particular firmware version okay so let's write our patch compound rebuild so this is one of one of my example patches so what I do here is I actually do http request to my server so we saw in Ida where the interesting memory areas are so here are the addresses of the MAC address device at the key I created a buffer and what I do here is I convert the key into some hex format and I run just http get on my server so later on if I look at my server log I can see the key hopefully in Kleatex the important thing here is that we need to tell the nextmon framework where it has to to patch this thing so in this case this address is more or less the original branch instruction the branch link because we don't want to break the functionality of the device so here you see also we return actually in the original printf again so basically we every time if the snprintf is called in this otu info function we jump into this patch we extract the key and when we jump we go back to the original program flow so the device is still functional of that now we have our patch so if we do the rebuild thing if you compile everything with nextmon we get the sections again and then we build the firmware again and we can use the marvel tool to build the original firmware which is then patched okay so now we need to apply that and at this point I should say it before but obviously your rarity is void after that every time you open the device actually it's a problematic thing so how we do that the first step and this is the step which we can't avoid at least for the devices like the light bulbs we need to have a new firmware update it must be available so if you're already sitting on the newest firmware update it's not possible so the as soon as we get like this otu update command from the cloud then it's a good sign that means actually there's a new firmware update so we can somehow manipulate that and how this is done is actually sorry this animation is broken this would be a usual way so we would made a HTTP request to the cloud server and we would get the firmware but we don't want that because we don't want to have the newest version on the device instead what we're doing here is we're using some kind of DNS switch and we're switching this thing to our IoT village CDN so our patched firmware is downloaded to the device and then the device is very happy about that. I tried to prepare a demo but the thing is it's nearly impossible to have Wi-Fi here so I didn't want to break the devices but if you're interested you can take a look later on the devices and we can try something out there's one also one interesting thing if you get the SDK we have also some very interesting demo applications there for example with P2P demo where the devices can make some P2P network over Wi-Fi there's a Wi-Fi frame inject demo or like a Wi-Fi sniffer demo so you can use this kind of demos for your patches if you're interested in doing specific things okay so for the summary what we can do we can modify the firmware we can route the device and we can do it remotely and this is the most interesting integrity checks so we don't check for the MD5 we don't have any signatures in the firmware what we can do then is we can read all the cloud communication in plaintext because as soon as we have the key we can decrypt it and we can run it for example also with our own cloud there's one thing where I told tell everyone at the end of my slides and this is like the thing never leave your devices unprovisioned I know people who buy the light bulbs somewhere in their home and just use them as normal light bulbs but it doesn't make sense for a Wi-Fi connected light bulb what happens is this device is unprovisioned so everyone who is in proximity of this light bulb can provision that for you and install some malicious software on it also be careful with devices which you buy at Amazon or eBay and so on you have no idea what kind of firmware is installed and the thing is you can't actually check that so they have no possibility like with a laptop to figure out whether it's malicious and so on you can't do anything with the firmware there so for the conclusion the best practices for IOT devices or like in general for embedded devices are not used so we have no Md5 verification if we use HTTPS when it's broken or we don't use HTTPS at all the certificate verification is also broken the hardware security features are missing so some of the chips actually have features like secure boot or where you can some verification of the firmware in hardware they're not using that the good thing for us is we can modify devices but the bad thing is everyone else who have some knowledge about that can do that too alright so I want to thank a few people Daniel Wiggema who did the next month framework and helped me with all the research also Professor Nabeer from the Northeastern University the Zemo lab with Professor Matthias Holek from the TU Dammstadt and Rossellers and his team from the Boston University CyberLog Clinic and there's a particular reason why he's there because in the US to publish specific things is a little bit tricky with the law so basically they make sure that I'm not getting into trouble so I'm special thanks for them and that's all for my presentations and I'm happy to answer your questions or if you need any contact data you just can I created especially for the Defconn Twitter account so you can send me Twitter messages tweets whatever about me or telegram ok thank you very much


A byw'r gweithredu nhw o'n wych yn cyffordd cyfnogi neu'r gwasanaethau yn gwasanaeth canfiannol? Curaf – ond lle mae o'r grannu gwneud. Felly mae'n gweithredu'n gweithredu sy'n gweithredu yn gyffordd arall, mae mwyaf arwad am y cyw мехano'r newydd llai na o'r ffordd. Felly mae'n gweithredu nesaf o ble ni'n ei gweithredu ridei, maen nhw'n cee'n cael ei fod yn edrych.  Felly mae'n meddygu i'r bobl eich bod yn cychynny o'r cumfynol... I've got an eye for goal, so hopefully more to come. You mentioned the supporters, over a thousand in here today for the first time in 16 months. It must have been great for you guys to come out here and hear them and feel them playing for them. Yeah, it's lovely to have fans back. I think football without fans is boring. You get that excitement as a player, as a winger. I like to excite the fans as well and they give you a nice bit of drive. It was good having them back and hopefully we'll see more of them coming soon. Pre-season generally, how's it going? I guess on days like today with the weather like it is, it's testing you in every single way. To be fair, it's been tough. We've had double sessions and things like that, running constantly. But it's good. It shows here the fitness is good from the boys. Some of the boys played 75 and looked really good as well. We're getting the fitness is improving all the time. How much encouragement do we take going forward? Doncaster, a league above the app in there for two or three years now. To put in a performance like we did today and to look right at home. I suppose we gave a good account of ourselves. Exactly. Obviously, Doncaster in league one. Keep the ball very well. And like our defensive shape as well, something that we've worked on today. Because we had less of the ball. That was good to see and gives us encouragement. Our attacking play was very good. We created a lot of chances. So that's a good plan forward. So yeah, hopefully we'll just build on that.


The presidential candidate after Labour Party Peter B has ruled out his governance agenda to Nigerians in Daspura. Speaking on the theme, Nigeria Daspura and capacity building in Michigan United States on Monday OB stated that if elected president, his administration would drastically reduce the cost of governance which according to him would help reduce the nation's debt and tackle corruption. He also said his administration would pursue a drastic reduction in corruption, improve the ease of doing business to attract FDI to jumpstart industrialization and when borrowing is unavoidable it would be strictly for regenerative purposes and production.


Welcome back team is your biggest fan the real Casadero and I realized that in the first part of this series That I didn't explain a couple of the extensions that I'm using Inside a visual studio code. So what I'm going to do right now is I'm going to show you those Extensions that I'm using so you have access to those as well Some of you guys already figured it out But if not I'm going to show you exactly what those extensions are team So you can have those inside a visual studio code as well And then we're going to go in and we're going to set up our development environment for those of you who If you didn't install xamp, no problem This video is going to walk you through going through installing xamp And it's actually going to show you how to set it up So you can have your local web dev server going and then we're going to move forward And we are going to set up a small php application that is going to act as a back end So we're going to have this system on our computer that will allow us to uh to basically pretend That we are working with some sort of remote server somewhere and this is what developers do All day every day because sometimes it's not as easy to work with remote servers Now I use what's called the jam stack and what that does well And I say I use the jam stack. I use that term loosely Because I'm not building new websites every day using the jam stack, right? I'm not even building new websites every day But the jam stack allows us to sort of we don't have to worry about the back end stuff And that's way down the road team, but we'll get to that point. The goal is is to Is is as you learn stuff, you're able to go out and build stuff. So like just from the very last Video, you know how to set up a html form so you can go in and you can start start experimenting You can build a html page. You can put some basic text on there Throw some form fields on it see what it looks like team and then in this video and this in this second part You're actually going to see what you can make a form do and when you put that form out on the internet If you set it up, right? It'll do what you want it to do now We aren't going to go all the way that far just yet team But we will get to that process if you stick with if you stick with this series if you sign up or Or if you sign up to the code 365 startup lab to support the channel You're going to have access to all this same stuff as well Is just that it there'll be there'll be more segmented And a little more detailed team, but for the most part like all this stuff the same I'm pulling these videos literally right out of The the the html mastery, but anyway team that's enough of that. Let's get to it So I am now down here in the lower left hand corner as you can see and I shouldn't be impeding anything down here When we're really getting to the coding stuff But what I'm going to do is I'm going to hit the windows key and I'm going to type in a code And this is going to bring up visual studio code and I'm just going to show you those extensions. I was talking about We don't need this and I'm just going to bring this up and I'll zoom in so you guys can see Well, actually let me close this window by hitting control w and now a whole control And visual studio code is different. It doesn't let us zoom, but if we do a control in the plus key We can zoom in on everything And we'll go right over here to these boxes off to the the right side of the screen click on those And then at the very top you just type a live server And live server 5.6 point one will pop up you just click there and then you can go right over here and you can just hit install team And also we're going to be installing. I think it's rainbow brackets r a i n b o w Brackets or is it? Yeah rainbow brackets right here rainbow Rainbow b r a c k e and so we got rainbow brackets right there zero point zero point six and this This isn't this isn't what I was looking for There's a there's a different program. Hold on. I think it's called indent rainbow indent Yeah, there it is indent rainbow version seven point Four point zero and indent rainbow what it does is adds those colors next to our our code so we can see Where our indenting is and if you guys don't understand the the whole idea of indenting It's just so that we can it makes our code easier to read So we can read it better another human being can read it better That's it, but those are the two main extensions you're going to see and if i'm using some other extension Hopefully I remember to call it out, but also what you can do is as you learn more stuff You can just go over in here and you can just look around at the extensions There's all kinds of stuff you can install you can install Stuff to do timers and to do lists and i'm talking about just like With the application like you can keep track of I mean there's The point is there's all kinds of extensions and then A lot of you you'll reach the point where you'll be able to go in here and write your own extensions And and other people will be able to get them and use them But those are the the two things that I saw that just stood out that uh that I didn't tell you guys about Apologize about that team, but now we're going to get into the second part of the series And we're going to set up our local web dev server. All right team. So let's get to it All right team. So we are here on the desktop. I'm going to hit the window Well, we don't need the windows key We're just going to right click here on my face and we are going to go new folder and in new folder We are going to read. Well, we're going to rename this folder to html input in put elements ellie mints All right team. Now we got it. Well, we already got a folder with that name We're just going to say yes and now we got this empty folder here. So we're good We're going to double click this folder and there is a this isn't what I want. This is I'm going to take this out of here Actually and uh because this is the footage for this course I'm going to put this down here And then so this is the intro video and then this is the video I'm recording right now So inside this folder, we're just going to click open with code And we are going to double click to make this full screen And we've got this basic html document here and you guys you guys understand this You remember how to make this using the asterisk symbol. I'm sure so we're going to hit save And it's going to ask us for a name. We're just going to name this index And hit enter and I spelled it wrong. So we got to go over here We got to rename this and we just go index. All right team. So now we're going to do We're just going to make a basic form element And We'll the we'll we'll leave the action blank for now and we will go down here And we're just going to add a couple fields just like we did before input fields team Just regular little input fields and I don't like it when there's red here So what I'm going to do is I'm going to right click and I'm going to say format document and that looks a little better All right. So inside of our format, we're going to type input and now we have an input We're going to have a text type. We're going to give this a hold on team Move this back Control Z. Let's do this again input. There we go. And we're going to have a text type And we're going to give this a Value is it do we need a value team? We got text type. We need a we need a name That's what we need. We need name is going to be equal to we're going to call this username username And Down underneath that so we're going to hit alt shift and hit down to duplicate this and where it says text We're going to make this p a s s w r d and over here where it says name. We're just going to say P a s s w r d and actually we could do something like if we want to we could do We name these any things we want anything we want so we could say user password So now we've got a name input and a password input in every form needs a button so we could go input And we can give this a form of input And then we have to set the value of this input. So right inside of here We just go value and we're going to set that value to submit and actually This isn't supposed to be input. This is supposed to this is supposed to be submit Submit so now when we save we don't have our live reload here So we're just going to alt f4 and close out visual studio code and then we will right click and we will say Right click inside of this folder will say open with code and this will open in visual studio code And then we will get our live reload at the bottom of the screen So when that's set up, we'll just hit go live And it's going to open in another browser window for me because that's how it all gets down over here We'll bring that onto this screen. We'll hold the windows can hit right bring that off to the right And then we can just arrow through all these open windows and we're just going to select Visual studio code and then we do a control b and make that go away And now we have our our input up here now. We don't know what this this says. So, right? Let's give this um, let's give it a label. We'll say pat. Well, we'll say username And we'll add that right there and down here. We'll do the same thing So we'll just go down to this line hit control enter to make a line beneath it and we're going to say pass word pass W hardd man. It's getting late team. It's getting late. All right. So we'll save and so now we got a username and a password now if we because username And password and all these input fields that we're using they're all in line elements So they just they naturally just line up next to each other If we want to one atop another then we got to go about this in a whole different way We could use brakes so we could just go br tab And save and now we got this field underneath username Password we could do the same thing if we go br tab save and now Password but but look right because we don't have a br right there So we got to go br tab save and now it looks good Kinda because our buttons in the in a in a real janky place And so we go here. We're going to move this button right same thing b r tab save Now we can make these block level elements But we use css to do that and so right what i'm what i'm just showing you is that we don't have to go and use css for Everything when we need to build something we just start building team We go into css and we can refine it if we need to now we can go up here We can add another br by hitting alt shift And save and now we got a little space and our form looks fairly decent team. There's nothing wrong with this This is a this is a decent. It's a decent Good-looking form now that we've covered the basic elements. We got text input. We've got a password input And and so indeed and so here's the deal team. These are all these are all Well, they're all inputs obviously But they're these are all text inputs team and there's different There's different attributes that we can give each of these to make them do different things So like we gave this just a regular text attribute a type of text What we can do is we can go up here and like when we type a name It just shows up but in password It's blocked out so nobody can see it now This doesn't mean it's like super secure. It's encrypted or anything It just means that nobody can look at it the computer the browser just doesn't show this Because if somebody's standing over your shoulder, you don't want them to see your password, right? But you get this little dot right here the browser Uh, I think it took it away But sometimes you get this little symbol here at the end and it'll be like hey Do you want to show your password? You know what I'm saying team? So these are two of the input fields All right team so for us to move on and and really get the full experience here What we're going to have to do is we're going to have to set up a php server And I can't remember if we've done that already So we're going to do is we're just going to go over into our browser window And we're going to hit control t and we're going to type in xamp And our search result is going to bring up the x amp installer for patchy friends But what we're going to do is we're going to go Yeah, we'll just go here a patchy friends.org and on this main page We pick our operating system and what it's going to do is it's going to open this other window And I'm going to say hey, what do you want to do and in this case? We're going to say yo, we want to save this and we'll go save as and we'll just save it to Our download folder, so we'll save boom And it is running the security scan and then it's going to open up team And we are going to install xamp and what xamp is going to do is going to give us a full php server environment So we're going to say yes When it's done downloading To open it and if it just down if it just downloaded it probably went into your downloads folder So you're going to go into your downloads folder and says important because an active because an activated user Account control uac or your system some functions of xamp may not work It's just a window security thing right and so you go through here and we're going to install install everything So you're going to well not don't install everything team can install you can install my sequel We don't need file zilla. We don't need mercury or mailer. We don't need tom cat You can install pearl if you want maybe you want to learn the pearl programming language at some point Um, but let's let's walk through these so file zilla is just the ftp server But we're working locally so we don't need an ftp server and then of course we got a mail server And I have no idea what tom cat is team Uh php, that's why we're downloading this whole thing so we can use php In order to return us some data when we submit our form and then we're going to need uh php My admin that's going to give us an admin panel for php. We don't need web Eliza and we don't need fakes in mail team so you Hit next and it's just going to put this right on your c drive in the x amp folder now I already have this installed so i'm not going to continue from this point on i'm just going to close this out But when you continue That folder is going to end up on your c drive So what we can do is we can hit the um the windows key and we're going to hit I think it's windows Windows e to open up explore and if we go to our c drive, we will see this x amp folder And in the x amp folder you have this folder called ht docs But before we get to there and almost forgot team We're going to open up our x amp control just by double clicking that and you may get a windows security alert Just say okay, and you're going to go in here. You're going to make sure your apache server is started So it needs to be green and you're going to make sure your mysql server is started and it needs to be green Now we're not going to be using mysql server We're just going to be using the apache web server which is going to give us access to php So if that's green, we are good to go team And if you look over here, it's going to give us two ports It's going to give us a local host port 80 and a local host port 443 and if you guys can't see that I apologize. It's really tiny But just make sure you got your stuff set in green and then when you go back to your browser All you have to do is type in local host colon 80 And this is going to open up.  What did I do wrong? So let's try this again local host colon 80 All right, and that opens up our local host now minds is already set up But I'm going to show you guys how to go in and set yours up to team So that's how you get to that local host and we can also use local host 443. I believe so we go 443 enter Oh object not found Let's see local host 443 the request that you are was not found on the server If you entered the ur manually, please check your spelling Try again. Oh it's because we have a dash instead of a colon So we'll go back put a colon there Enter and let's see bad request. Let's try this one more time Uh, your browser or proxy sent a request to this server cannot send a request the server cannot understand if you think this Is a server error. Please contact the web master. Oh boy team Uh, so we're going to stick to port 80 for now. The deal is is port Port 443 is the HTTP port. It's a secure port So we may we have to access that in a different kind of way, but right now we're going to stick to port 80 So what we're going to do Is once you have everything set up and you get your x amp folder and you got everything running You're going to go into this folder ht docs, which is where is it at ht ht ht ht There we go ht docs And in here, right? I already have these files because I moved them over. That's why you saw my php page when I ran local host But if we go back into our browser now, I'm just going to hit windows and type in edge And if we go to local host locl local Host and we go into port 80 We should get this is what we should get we should get nothing team So what we're going to do is we'll take this and we'll just put it We'll just minimize it for now And we can go back to our main Folder, which is right here and we're just going to copy both of these controls see And we'll go back into our ht docs folder and we're going to paste them here, right? And so I have this php folder. I'm going to get rid of this just to demonstrate how this is done And so we'll save And now when we bring up our local host We should see well, let's close these both out Now if you got if you got your index.html inside of the ht docs folder, that is a web server It's the same kind of thing that we've been using over here In our live server and we might sort of turn off our live server now because we aren't going to need it So we'll open up our web browser again, and I'm using edge right now So I'm just going to grab edge. We'll bring that over to the side And we're on local host. Let's just hit enter and it brings up that page now if we put some information in here Nothing's going to happen, right? It's just we hit submit and nothing goes down And that's because this this doesn't do anything like the action says to Well, I have post in here, but let's take this out All right team. So we've got we've got our action there. We'll hit save and we got to get rid of that semicolon I mean not the semicolon, but that quotation mark will hit save with control s go back over here refresh our page And we're going to retry and now we'll try this again Submit and see nothing happens team. So what we're going to do is we're going to write a basic php file That will return us some sort of data when we submit our form team So I will see you in the next video where we build our simple php Form team well not our simple php form, but our simple php application that will return us data when we we send our form


All right. Ben is up with our first quick tip. He says, I love this. I had no idea this is the beauty of the quick tip. In messages on macOS, there is a tap back last message command in the edit menu with the keyboard shortcut of command T. After invoking tap back with the command or a long press on a message, you can then use numbers one through six to select among the six responses instead of having to click one. That means if you're in messages typing back and forth and you want to like love their last message or thumbs up it or whatever, you don't have to jump to the mouse or the trackpad, you do command T and then use the numbers on your keyboard to select the responses from left to right and it will just do that to their most recent message. I tested it, it works. I had no idea that this was there. Thank you, Ben. This is awesome. Perhaps my favorite tip of the week. Right? I mean, there was a reason I put it first. Yeah. I couldn't help it. Yeah.