How to Save Nmap Results?
A free video tutorial from FeltSecure Labs
FeltSecure Labs: Cyber Security Courses with 10000+ Students
3 courses
20,718 students
Lecture description
Saving Nmap scan results using different formats.
You can save nmap scan results with "output" switches.
Learn the types of nmap outputs and save it to your disk!
Learn more from the full course
Practice Your First Penetration Test: Kali & Metasploit Lab
Learn ethical hacking with Kali in your own lab, scan targets with Nmap and exploit victims with metasploit!
02:46:35 of on-demand video • Updated August 2017
Install and configure Kali Linux
Prepare virtual lab environment with Kali and victim machines
Scan networks with Nmap
Discover vulnerable applications
Exploit Linux and Windows servers with Metasploit
English [Auto]
We have already run many commands. So you might be asking, Hey, we are running the same commands again and again. This doesn't make sense in a real life test. So how can I prevent running the same commands? Well, of course you can save the results. Let's take a look at how it can be done. The keyword here is output. Let's look. If there is anything in the guide we can use. So let me clear my screen first and then type and map dash, dash app pipe grep and then output. Okay, there is this append output stylesheet. No stylesheet. But I'm actually looking for something else. So keep in mind this grep is case sensitive, so I will add this. And then press enter again. And now I have it. These two first lines. It tells about how you can save the output, like in normal XML or other versions like script kiddie. By the way, let me explain one thing to you. Of course I know the parameters for Nmap output. Probably. So do you. The idea is to do some practice with grep function which which is very useful for pen testing and in Linux world in general. Furthermore, there are tons of parameters in Nmap as in many other security tools. You can't memorize them all at least when you are beginner. So it's a good idea to do some practice with this grep function. For example, you can use man and map to search through tons of pages of detailed help guide. Anyway, let's continue from where we left off. There are mainly three types of output formats in Nmap. Normal one. This one is XML based and grabbable. There is also one more master output format which gives out all these three types together. This one. Okay, so let's give it a try. Open the command we run previously like this. Okay. And then add this parameter. O a and then type something like scan results. Okay. And then press enter. When completed type L or. LZ dash l a r t to list the files here. Okay. You see this XML extension Nmap and Nmap extensions. Actually, these are very self explanatory. Regular results. This one and map XML results. This one and Grabbable results map result this one. Some tools like Metasploit can import these outputs, but in some cases you would want to grab the outputs by yourself. So it's a good idea to have them all three. But let's stay organized a bit. Check your current directory by typing PWD. We are on the root now, so let's change the directory to desktop by typing CD desktop. Okay. Now create a directory by typing mkdir make dir nmap results. Okay. And then go back by typing CD space. Dot dot. You can also use this CD Dash to move back to the previous directory, which you were in. Okay, now we are on the root. If I type ls again, so I see my scan results here. So let's move the files to the folder we have just created. Type MV and then type scan results. I press tab to autocomplete saving time and then simply press star. Put a space and then type desktop. And my results. And then press enter. If you list the files here, you won't be able to see the files here. But under desktop and Nmap results. Here we have it. Can add this shortcut to the profile so that you won't have to type this. LS l a r t. Okay. Let's do it together to save time. Okay, let's open this bash RC. And then by pressing ctrl and F, come to here. Okay. I delete this by pressing x and then I press a to add some more keys here, like escape, save exit and then log in again to make the changes enabled and then type and I see my output. Okay, great. So let's wrap up this section.