issue164:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue164:c_c [2020/12/28 13:54] – créée auntiee | issue164:c_c [2020/12/29 15:37] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Website: https:// | + | **Website: https:// |
This time, the website is different, to reflect what we want to do with nmap. | This time, the website is different, to reflect what we want to do with nmap. | ||
Ligne 5: | Ligne 5: | ||
Please read this article, and you will be much wiser as to how nmap is used. | Please read this article, and you will be much wiser as to how nmap is used. | ||
- | Welcome back to another educating experience: ‘demystifying nmap’. So, last issue, we talked about customising your ping sweep, but we did not say how. If you read the linked article, you will know the why. However, if you don’t know how ICMP works, I have good news for you; you will learn something new. You don’t have to remember the whole table, but get an overall feel. Please peruse the table (0-18) here: http:// | + | Welcome back to another educating experience: ‘demystifying nmap’. So, last issue, we talked about customising your ping sweep, but we did not say how. If you read the linked article, you will know the why. However, if you don’t know how ICMP works, I have good news for you; you will learn something new. You don’t have to remember the whole table, but get an overall feel. Please peruse the table (0-18) here: http:// |
- | Now, it is true that you don’t need to know what electricity is to use it, and I suppose the same can be said of nmap. The fact of the matter is, if you knew better, you would not do things like the outlet challenge either: https:// | + | Site Web : https:// |
+ | |||
+ | Cette fois-ci, le site Web est différent pour s' | ||
+ | |||
+ | Merci de lire cet article pour que vous deveniez beaucoup plus avisé sur l' | ||
+ | |||
+ | Je suis ravi de vous revoir pour une autre expérience éducative : « démystifier nmap ». La dernière fois, nous avons parlé de la personnalisation de votre balayage de pings, mais nous n' | ||
+ | |||
+ | **Now, it is true that you don’t need to know what electricity is to use it, and I suppose the same can be said of nmap. The fact of the matter is, if you knew better, you would not do things like the outlet challenge either: https:// | ||
I will refer to this table, and you can simply look it up if networking is not your thing. | I will refer to this table, and you can simply look it up if networking is not your thing. | ||
Ligne 14: | Ligne 22: | ||
Let’s make another ping sweep.. Do you still remember how? In this category, we have PE; PP; PM (ICMP ping types) that we use to modify our query. Like so: | Let’s make another ping sweep.. Do you still remember how? In this category, we have PE; PP; PM (ICMP ping types) that we use to modify our query. Like so: | ||
+ | |||
+ | nmap -sP -PP 192.168.1.0/ | ||
+ | |||
+ | Bon, il est vrai que vous n'avez pas besoin de savoir ce qu'est l' | ||
+ | |||
+ | Je me référerai à cette table et vous pouvez la consulter si la gestion du réseau n'est pas votre tasse de thé. | ||
+ | |||
+ | Note : Ce sera notre première demande dans nmap nécessitant des privilèges de root/sudo. (Sous Linux, seul root est généralement capable d' | ||
+ | |||
+ | Faisons un nouveau balayage de pings. Vous rappelez-vous comment le faire ? Dans cette catégorie, nous avons PE; PP; PM (les types de ping de l' | ||
nmap -sP -PP 192.168.1.0/ | nmap -sP -PP 192.168.1.0/ | ||
- | Nmap can send the standard packets sent by the ubiquitous ping program. Nmap sends an ICMP type 8 (echo request) packet to the target IP addresses, expecting a type 0 (echo reply) in return from live hosts. Unfortunately for us, many hosts and firewalls now block these packets, rather than responding as they are supposed to. The ICMP standards also specify timestamp request, information request, and address mask request packets as codes 13, 15, and 17, respectively. While the ostensible purpose for these queries is to learn information such as address masks and current times, they can easily be used for host discovery. In our example case, we can use type 13, and we will tailor our request as follows: | + | **Nmap can send the standard packets sent by the ubiquitous ping program. Nmap sends an ICMP type 8 (echo request) packet to the target IP addresses, expecting a type 0 (echo reply) in return from live hosts. Unfortunately for us, many hosts and firewalls now block these packets, rather than responding as they are supposed to. The ICMP standards also specify timestamp request, information request, and address mask request packets as codes 13, 15, and 17, respectively. While the ostensible purpose for these queries is to learn information such as address masks and current times, they can easily be used for host discovery. In our example case, we can use type 13, and we will tailor our request as follows: |
- | sudo nmap -sP -PP 192.168.1.0/ | + | sudo nmap -sP -PP 192.168.1.0/ |
- | Go on, try it on your local network. (Again, don’t try it on the police services website?) | + | Nmap peut envoyer les paquets ordinaires envoyés par le programme ping répandu. Nmap envoie un paquet avec le type ICMP 8 (demande d' |
+ | |||
+ | sudo nmap -sP -PP 192.168.1.0/ | ||
+ | |||
+ | **Go on, try it on your local network. (Again, don’t try it on the police services website?) | ||
Okay, back to our ping sweep. Remember that I told you the ACK flag was set on the TCP packet? We can change that to a SYN, to fool stateful firewalls. The default destination port is 80. Alternate ports can be specified as a parameter. Note that if you specify an alternative port, there is no space between the PS and the port number. The SYN flag suggests to the remote system that you are attempting to establish a connection. Normally the destination port will be closed, and a RST (reset) packet sent back. If the port happens to be open, the target will take the second step of a TCP three-way-handshake by responding with a SYN/ACK TCP packet. Nmap does not care whether the port is open or closed. Either the RST or SYN/ACK response tell nmap that the host is available and responsive. What will that look like? Try this: | Okay, back to our ping sweep. Remember that I told you the ACK flag was set on the TCP packet? We can change that to a SYN, to fool stateful firewalls. The default destination port is 80. Alternate ports can be specified as a parameter. Note that if you specify an alternative port, there is no space between the PS and the port number. The SYN flag suggests to the remote system that you are attempting to establish a connection. Normally the destination port will be closed, and a RST (reset) packet sent back. If the port happens to be open, the target will take the second step of a TCP three-way-handshake by responding with a SYN/ACK TCP packet. Nmap does not care whether the port is open or closed. Either the RST or SYN/ACK response tell nmap that the host is available and responsive. What will that look like? Try this: | ||
- | nmap -sP -PS 192.168.0.0/ | + | nmap -sP -PS 192.168.0.0/ |
- | You are doing great so far if you have been following along. We can also skip the port scan, by specifying -sn. We are also able to spoof our egress port, with the -g switch that we tack on right at the end of our query. | + | Allez-y, essayez sur votre réseau local. (Une fois encore, n' |
+ | |||
+ | Bien, revenons à notre balayage de pings. Vous souvenez-vous que je vous ai dit que le signal ACK est actif sur le paquet TCP ? Nous pouvons le changer pour un SYN, pour berner les pare-feux dynamiques. La destination par défaut est le port 80. Des ports alternatifs peuvent être spécifiés comme paramètres. Notez que, si vous spécifiez un port alternatif, il n'y a pas d' | ||
+ | |||
+ | nmap -sP -PS 192.168.0.0/ | ||
+ | |||
+ | **You are doing great so far if you have been following along. We can also skip the port scan, by specifying -sn. We are also able to spoof our egress port, with the -g switch that we tack on right at the end of our query. | ||
For example: -g137 will tell our target the request came from port 137. | For example: -g137 will tell our target the request came from port 137. | ||
Ligne 36: | Ligne 64: | ||
It goes without saying that if -PS is the SYN flag, -PA is the ACK flag. | It goes without saying that if -PS is the SYN flag, -PA is the ACK flag. | ||
- | Our cheat sheet is shown below. | + | Our cheat sheet is shown below.** |
- | Nmap even allows you to get more creative with your packets! But, more on this in the next issue of FCM. Hope to see you there. | + | Jusque-là vous faites du bon travail si vous me suivez. Nous pouvons aussi sauter le balayage des ports en spécifiant -sn. Nous sommes aussi capables d' |
+ | |||
+ | Par exemple : -g137 dira à notre cible que la demande vient du port 137. | ||
+ | |||
+ | Rien de plus facile à faire ! | ||
+ | |||
+ | Il va sans dire que si -PS est le drapeau SYN, -PA est le drapeau ACK. | ||
+ | |||
+ | Voyez l' | ||
+ | |||
+ | **Nmap even allows you to get more creative with your packets! But, more on this in the next issue of FCM. Hope to see you there. | ||
Hope you enjoyed this third demystifying nmap article and I'll see you next issue for something new. | Hope you enjoyed this third demystifying nmap article and I'll see you next issue for something new. | ||
- | As always, comments, compliments, | + | As always, comments, compliments, |
+ | |||
+ | Nmap vous permet même d' | ||
+ | |||
+ | J' | ||
+ | |||
+ | Comme toujours, tous vos commentaires, | ||
+ | |||
+ | **Tableau de la page 14, en bas : ** | ||
+ | |||
+ | HÔTES | ||
+ | Scan d'une seule IP : nmap 192.168.1.1 | ||
+ | Scan d'un hôte : nmap www.myserver.net | ||
+ | Scan d'une plage d'IP : nmap 192.168.1.1-20 | ||
+ | Scan d'un sous-réseau : nmap 192.168.1.0/ | ||
+ | Scan à partir d'un fichier texte : nmap -iL list_of_ips.txt | ||
+ | PORTS | ||
+ | Scan d'un seul port : nmap -p 22 192.168.1.1 | ||
+ | Scan d'une plage de ports : nmap -p 1-100 192.168.1.1 | ||
+ | Scan des 100 ports les plus classiques : nmap -F 192.168.1.1 | ||
+ | Scan de tous les ports (65535) : nmap -p- 192.168.1.1 | ||
issue164/c_c.1609160045.txt.gz · Dernière modification : 2020/12/28 13:54 de auntiee