issue163:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue163:c_c [2020/11/28 18:26] – créée auntiee | issue163:c_c [2020/12/07 08:58] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Website: https:// | + | **Website: https:// |
You may have noticed the website link above change, look this one up. *wink* | You may have noticed the website link above change, look this one up. *wink* | ||
Welcome back to another educating experience, demystifying nmap. In this issue, we will be looking at using files with nmap. Last issue, I mentioned, in passing, that one can output your scan results to a file using the redirection operator. However, the ‘correct’ way to do it is using the -o switch. Like many other programs in Linux, -o is usually “output”. This should be as easy to remember as -p is for port. Example: | Welcome back to another educating experience, demystifying nmap. In this issue, we will be looking at using files with nmap. Last issue, I mentioned, in passing, that one can output your scan results to a file using the redirection operator. However, the ‘correct’ way to do it is using the -o switch. Like many other programs in Linux, -o is usually “output”. This should be as easy to remember as -p is for port. Example: | ||
+ | |||
+ | nmap -oN classC.txt 192.168.1.0/ | ||
+ | |||
+ | Site Web : https:// | ||
+ | |||
+ | Vous avez peut-être remarqué que le lien du site Web ci-dessus a changé, regardez celui-ci. *clin d' | ||
+ | |||
+ | Bienvenue dans une nouvelle expérience éducative, qui démystifie nmap. Dans ce numéro, nous allons examiner l' | ||
nmap -oN classC.txt 192.168.1.0/ | nmap -oN classC.txt 192.168.1.0/ | ||
- | Now you can open the written .txt-file with your favourite GUI editor and run regular expression searches on it. Speaking of regex, nmap actually has a grep-able output version. Instead of using the “N” switch in our example, you use the “G” switch. This will drop the file in your current directory, so do a pwd first. Let’s examine the differences (see the images below). | + | |
+ | **Now you can open the written .txt-file with your favourite GUI editor and run regular expression searches on it. Speaking of regex, nmap actually has a grep-able output version. Instead of using the “N” switch in our example, you use the “G” switch. This will drop the file in your current directory, so do a pwd first. Let’s examine the differences (see the images below). | ||
Try grep “open“ router.txt on your machine. (Provided you saved your file as router.txt). Though if I am honest, I prefer the non-grep layout, regardless of the situation; for you it may be different. Try both to see how you like it. | Try grep “open“ router.txt on your machine. (Provided you saved your file as router.txt). Though if I am honest, I prefer the non-grep layout, regardless of the situation; for you it may be different. Try both to see how you like it. | ||
You may not want a .txt-file, so XML format is offered as a choice too. Here we follow the -o with a capital “X”. Example: | You may not want a .txt-file, so XML format is offered as a choice too. Here we follow the -o with a capital “X”. Example: | ||
+ | |||
+ | nmap -oX myscan.xml 192.168.1.0/ | ||
+ | |||
+ | Vous pouvez maintenant ouvrir le fichier .txt écrit avec votre éditeur d' | ||
+ | |||
+ | Essayez grep « open » router.txt sur votre machine. (A condition que vous ayez enregistré votre fichier sous le nom router.txt). Mais si je suis honnête, je préfère la mise en page non-grep, quelle que soit la situation ; pour vous, cela peut être différent. Essayez les deux pour voir ce qui vous plaît. | ||
+ | |||
+ | Vous ne voulez peut-être pas de fichier .txt et c'est pourquoi le format XML est également proposé au choix. Ici, nous faisons suivre le -o d'un « X » majuscule. Exemple : | ||
nmap -oX myscan.xml 192.168.1.0/ | nmap -oX myscan.xml 192.168.1.0/ | ||
- | Other than output files, nmap can also take input files. It may be more of a convenience than actually taking major input, but it is there and I can teach you about it. An example use case is when you have a bunch of subnets to scan and you want to check certain ranges, say 1-10 and 249-254 in each subnet (usually where people put servers and routers). This one is also easy to remember, a good mnemonic is “importing a list”. Example: | + | |
+ | **Other than output files, nmap can also take input files. It may be more of a convenience than actually taking major input, but it is there and I can teach you about it. An example use case is when you have a bunch of subnets to scan and you want to check certain ranges, say 1-10 and 249-254 in each subnet (usually where people put servers and routers). This one is also easy to remember, a good mnemonic is “importing a list”. Example: | ||
nmap -iL myscan.txt | nmap -iL myscan.txt | ||
Ligne 22: | Ligne 40: | ||
Okay, back to the start, I may be old fashioned, or lazy, or both, but I just find it quicker and easier to use the redirection operator. Example: | Okay, back to the start, I may be old fashioned, or lazy, or both, but I just find it quicker and easier to use the redirection operator. Example: | ||
+ | |||
+ | nmap -p 22 192.168.1.1 > scan1.txt** | ||
+ | |||
+ | Outre les fichiers de sortie, nmap peut également prendre des fichiers d' | ||
+ | |||
+ | nmap -iL myscan.txt | ||
+ | |||
+ | Il fera le balayage comme si vous aviez tout tapé à la main. | ||
+ | |||
+ | Bon, pour revenir au début, je suis peut-être vieux jeu, ou paresseux, ou les deux, mais je trouve juste que l' | ||
nmap -p 22 192.168.1.1 > scan1.txt | nmap -p 22 192.168.1.1 > scan1.txt | ||
- | In the Windows environment, | + | **In the Windows environment, |
- | This is rather easy, no? The catch comes when we talk about scanning from outside of the network, like pentesters do, and you have a firewall in your way. Now you need to start getting creative and shape your queries. In the next issue, we will cover customising your requests. We will ramp up the difficulty a little bit more, but not so that you cannot follow along. | + | Dans l' |
+ | |||
+ | **This is rather easy, no? The catch comes when we talk about scanning from outside of the network, like pentesters do, and you have a firewall in your way. Now you need to start getting creative and shape your queries. In the next issue, we will cover customising your requests. We will ramp up the difficulty a little bit more, but not so that you cannot follow along. | ||
Let us build up a cheat sheet (below | Let us build up a cheat sheet (below | ||
Hope you enjoyed this second demystifying nmap article and see you next issue. | Hope you enjoyed this second demystifying nmap article and see you next issue. | ||
- | As always, comments, compliments, | + | As always, comments, compliments, |
+ | |||
+ | C'est plutôt facile, non ? Le hic, c'est que nous parlons de scanner depuis l' | ||
+ | |||
+ | Créons un pense-bête (en bas à droite) au fil des prochains numéros ; ainsi, vous pourrez le conserver jusqu' | ||
+ | |||
+ | Nous espérons que vous avez apprécié ce deuxième article démystifiant nmap et nous vous donnons rendez-vous pour le prochain numéro. | ||
+ | |||
+ | Comme toujours, commentaires, | ||
+ | |||
+ | **HOSTS: | ||
+ | Scan a single IP: | ||
+ | Scan a host: | ||
+ | Scan a range of IPs: | ||
+ | Scan a subnet: | ||
+ | Scan from a text file: | ||
+ | |||
+ | PORTS: | ||
+ | Scan a single Port: | ||
+ | Scan a range of ports: | ||
+ | Scan 100 most common ports: | ||
+ | Scan all (65535) ports:** | ||
+ | |||
+ | |||
+ | HÔTES : | ||
+ | Scan d'une seule IP : | ||
+ | Scan d'un hôte : | ||
+ | Scan d'une plage d'IP : | ||
+ | Scan d'un sous-réseau : | ||
+ | Scan à partir d'un fichier texte : | ||
+ | PORTS : | ||
+ | Scan d'un seul port : | ||
+ | Scan d'une plage de ports : | ||
+ | Scan des 100 ports les plus classiques : | ||
+ | Scan total des 65535 ports : |
issue163/c_c.1606584372.txt.gz · Dernière modification : 2020/11/28 18:26 de auntiee