# Décrypter une intrusion

**URL:** <https://www.debian-fr.org/t/decrypter-une-intrusion/80271>\
**Category:** Support Debian\
**Created:** [Septembre 26, 2019, 2:23 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271 "2019-09-26T14:23:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmchen](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/k/3d9bf3/32.png) [@kmchen](https://www.debian-fr.org/u/kmchen)\
**Post date:** [Septembre 26, 2019, 2:23 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/1 "2019-09-26T14:23:22Z")

</div>

Bonjour,  
Sur mon poste de travail, debian 10, je vois tout à coup passer en interrompu le message suivant:

`[proxy_fcgi:error] [pid 12586] [client 122.189.200.90:50569] AH01071: Got error 'Primary script unknown'`

Mon IP n’étant pas celle là je me demande si ce n’est pas une attaque extérieure. J’ai bloqué avec une iptables -A INPUT -s 122.189.200.90 -j DROP et les logs se sont arrêtés.

Mais je ne comprends pas le :50569 du message d’erreur. Je croyais que ca signifiait le port d’accès mais mon serveur apache local est configuré sur le port 80.

Du coup si l’intrusion passe par le port 50569, comment arrive-t-elle sur le serveur apache ?

Ou alors à quoi correspond ce 50569 ?

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Septembre 26, 2019, 2:39 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/2 "2019-09-26T14:39:09Z")

</div>

> [@kmchen](#):
>
> passe par le port 50569

Je ne suis pas certain du format du log, mais je pense qu’elle \>part\< du port 50569, elle n’y arrive pas.  
Verifies si tu as quelquechose qui ecoute avec **netstat -l**?

> [@kmchen](#):
>
> 122.189.200.90

En tous cas, c’est une IP chinoise.

---

<div class="post-metadata">

**Author:** ![kmchen](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/k/3d9bf3/32.png) [@kmchen](https://www.debian-fr.org/u/kmchen)\
**Post date:** [Septembre 27, 2019, 7:13 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/3 "2019-09-27T07:13:59Z")

</div>

> [@mattotop](#):
>
> En tous cas, c’est une IP chinoise.

Avec les VPS la géolocalisation n’a plus de sens, il me semble.

```
$ netstat -l
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat       
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN     
tcp 0 0 joomla-development.:ipp 0.0.0.0:* LISTEN     
tcp 0 0 joomla-developmen:mysql 0.0.0.0:* LISTEN     
tcp 0 0 joomla-developmen:11211 0.0.0.0:* LISTEN     
tcp6 0 0 [::]:http [::]:* LISTEN     
tcp6 0 0 [::]:1716 [::]:* LISTEN     
tcp6 0 0 [::]:ssh [::]:* LISTEN     
tcp6 0 0 localhost:ipp [::]:* LISTEN     
tcp6 0 0 [::]:https [::]:* LISTEN     
udp 0 0 0.0.0.0:bootpc 0.0.0.0:*                          
udp 0 0 0.0.0.0:ipp 0.0.0.0:*                          
udp 0 0 0.0.0.0:mdns 0.0.0.0:*                          
udp 0 0 0.0.0.0:36370 0.0.0.0:*                          
udp6 0 0 [::]:mdns [::]:*                             
udp6 0 0 [::]:1716 [::]:*                             
udp6 0 0 [::]:51950 [::]:*                             
raw6 0 0 [::]:ipv6-icmp [::]:* 7          
Sockets du domaine UNIX actives(seulement serveurs)
Proto RefCnt Flags Type State I-Node Chemin
unix 2 [ACC] STREAM LISTENING 25390 @/tmp/.ICE-unix/1113
unix 2 [ACC] STREAM LISTENING 22292 /run/php/php7.3-fpm.sock
unix 2 [ACC] STREAM LISTENING 18709 /run/cups/cups.sock
unix 2 [ACC] STREAM LISTENING 18712 /var/run/dbus/system_bus_socket
unix 2 [ACC] STREAM LISTENING 9756 /run/systemd/private
unix 2 [ACC] STREAM LISTENING 18716 /run/avahi-daemon/socket
unix 2 [ACC] STREAM LISTENING 22513 @/tmp/.X11-unix/X0
unix 2 [ACC] STREAM LISTENING 9778 /run/systemd/fsck.progress
unix 2 [ACC] SEQPACKET LISTENING 9782 /run/udev/control
unix 2 [ACC] STREAM LISTENING 9790 /run/systemd/journal/stdout
unix 2 [ACC] STREAM LISTENING 27323 @/tmp/dbus-yR3oEvOwem
unix 2 [ACC] STREAM LISTENING 23098 /tmp/passenger.D9TCflv/agents.s/core
unix 2 [ACC] STREAM LISTENING 25189 /run/user/1000/systemd/private
unix 2 [ACC] STREAM LISTENING 23099 /tmp/passenger.D9TCflv/agents.s/core_api
unix 2 [ACC] STREAM LISTENING 23150 /tmp/passenger.D9TCflv/agents.s/ust_router
unix 2 [ACC] STREAM LISTENING 23151 /tmp/passenger.D9TCflv/agents.s/ust_router_api
unix 2 [ACC] STREAM LISTENING 25195 /run/user/1000/gnupg/S.gpg-agent.extra
unix 2 [ACC] STREAM LISTENING 24271 /tmp/sddm-authf1fee1e4-bdda-4380-a91a-7fb782e8d562
unix 2 [ACC] STREAM LISTENING 25198 /run/user/1000/gnupg/S.gpg-agent.browser
unix 2 [ACC] STREAM LISTENING 25200 /run/user/1000/gnupg/S.gpg-agent
unix 2 [ACC] STREAM LISTENING 25202 /run/user/1000/gnupg/S.gpg-agent.ssh
unix 2 [ACC] STREAM LISTENING 22514 /tmp/.X11-unix/X0
unix 2 [ACC] STREAM LISTENING 25204 /run/user/1000/gnupg/S.dirmngr
unix 2 [ACC] STREAM LISTENING 25206 /run/user/1000/pulse/native
unix 2 [ACC] STREAM LISTENING 25209 /run/user/1000/bus
unix 2 [ACC] STREAM LISTENING 24628 /tmp/passenger.D9TCflv/agents.s/watchdog_api
unix 2 [ACC] STREAM LISTENING 26045 /tmp/ssh-NEgpIqEIT7pS/agent.993
unix 2 [ACC] STREAM LISTENING 25391 /tmp/.ICE-unix/1113
unix 2 [ACC] STREAM LISTENING 28236 /tmp/OSL_PIPE_1000_SingleOfficeIPC_9986afaeaf884745bfc18c4522264d9
unix 2 [ACC] STREAM LISTENING 23506 /run/NetworkManager/private-dhcp
unix 2 [ACC] STREAM LISTENING 26096 /run/user/1000/kdeinit5__0
unix 2 [ACC] STREAM LISTENING 23541 /run/user/1000/klauncherNPZzKB.1.slave-socket
unix 2 [ACC] STREAM LISTENING 22524 /run/mysqld/mysqld.sock

```

> [@mattotop](#):
>
> 50569

Je ne comprends pas. J’ai un parefeu qui bloque tous les ports autres que les standards utilisés 80, 22, etc…, et je ne fais aucune redirection de port. Comment est-ce qu’une requête entrant par le port 50569 arrive sur le 80 ?

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Septembre 27, 2019, 7:30 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/4 "2019-09-27T07:30:31Z")

</div>

> [@kmchen](#):
>
> Avec les VPS la géolocalisation n’a plus de sens

A non non, ce n’est pas de la geolocalisation:  
j’ai fait un whois sur l’adresse ip et elle appartient à un ISP à Pekin, donc j’en ai déduit que c’était chinois.  
Mais effectivement l’ip peut être utilisée ailleurs qu’en chine, et elle peut n’être qu’un proxy de quelqu’un situé ailleurs.  
Mais ça ressemble quand même à du script kiddie chinois.

> [@kmchen](#):
>
> Comment est-ce qu’une requête entrant par le port 50569 arrive sur le 80 ?

Relis bien ce que je t’ai dit:  
elle **n’entre pas sur le port 50569**.  
Elle **PART du port 50569** du client et **ARRIVE sur le port 80** de ton serveur, qui est ouvert (normal).

---

<div class="post-metadata">

**Author:** ![Albatross](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/c5a1d2/32.png) [@Albatross](https://www.debian-fr.org/u/Albatross)\
**Post date:** [Octobre 3, 2019, 6:50 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/5 "2019-10-03T06:50:06Z")

</div>

Yes  
Mattotop is right.  
This is not a destination port but a source one.  
Be carefully about what you’re doing.  
When I see this from USA, I am afraid for my country.  
Hope all will be fine for you.

---

<div class="post-metadata">

**Author:** ![kmchen](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/k/3d9bf3/32.png) [@kmchen](https://www.debian-fr.org/u/kmchen)\
**Post date:** [Octobre 3, 2019, 7:53 UTC](https://www.debian-fr.org/t/decrypter-une-intrusion/80271/6 "2019-10-03T07:53:20Z")

</div>

Merci pour vos réponses. C’est clair pour moi maintenant
