Sehen Sie, welche Datei Postfix verwendet

Sehen Sie, welche Datei Postfix verwendet

Ich habe ein - wie ich glaube Malware - Problem auf meiner Seite. Ich benutze meinen Server, um Spammails zu versenden. Beim AusführenSpitzeUndUMSCHALT+MIch erhalte folgendes:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                          
 4282 postfix   20   0 63368  37m 1496 S    2  3.6   0:07.44 qmgr                                                                                                                              
 3558 mysql     20   0 1024m  26m 7736 S    0  2.6   0:04.28 mysqld                                                                                                                            
 4156 www-data  20   0  323m  20m 3900 S    0  2.0   0:00.41 apache2                                                                                                                           
 2846 www-data  20   0  323m  20m 3964 S    0  2.0   0:01.14 apache2                                                                                                                           
 1578 www-data  20   0  322m  19m 4000 S    0  1.9   0:01.39 apache2                                                                                                                           
 1896 www-data  20   0  320m  17m 3956 S    0  1.7   0:01.25 apache2                                                                                                                           
 4160 www-data  20   0  319m  16m 3948 S    0  1.6   0:00.29 apache2                                                                                                                           
 4599 www-data  20   0  319m  16m 3752 S    0  1.6   0:00.12 apache2                                                                                                                           
  666 www-data  20   0  319m  16m 3948 S    0  1.6   0:01.26 apache2                                                                                                                           
 2366 www-data  20   0  317m  13m 3976 S    0  1.4   0:01.19 apache2                                                                                                                           
 3545 www-data  20   0  316m  13m 3912 S    0  1.4   0:00.34 apache2                                                                                                                           
  654 root      20   0  309m 8436 6428 S    0  0.8   0:00.06 apache2                                                                                                                           
 1918 www-data  20   0  320m 7092 3972 S    0  0.7   0:00.74 apache2                                                                                                                           
 4335 postfix   20   0  115m 2904 2012 S    0  0.3   0:01.15 proxymap                                                                                                                          
 4386 postfix   20   0 44308 2888 2212 S    0  0.3   0:00.07 smtp                                                                                                                              
 2751 root      20   0 73316 2876 2752 S    0  0.3   0:00.07 sshd                                                                                                                              
 4349 postfix   20   0 44296 2872 2200 S    0  0.3   0:00.04 smtp                                                                                                                              
 4285 postfix   20   0  115m 2852 2008 S    0  0.3   0:00.74 proxymap                                                                                                                          
 4317 postfix   20   0 44320 2848 2212 S    0  0.3   0:00.05 smtp                                                                                                                              
 4292 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.07 smtp                                                                                                                              
 4298 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.07 smtp                                                                                                                              
 4327 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.08 smtp                                                                                                                              
 4332 postfix   20   0 44296 2836 2212 S    0  0.3   0:00.05 smtp                                                                                                                              
 4355 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.04 smtp                                                                                                                              
 4356 postfix   20   0 44300 2836 2212 S    0  0.3   0:00.09 smtp                                                                                                                              
 4375 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.09 smtp                                                                                                                              
 4387 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.06 smtp                                                                                                                              
 4388 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.05 smtp                                                                                                                              
 4394 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.08 smtp                                                                                                                              
 4405 postfix   20   0 44188 2836 2212 S    0  0.3   0:00.08 smtp                                                                                                                              
 4300 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.05 smtp                                                                                                                              
 4303 postfix   20   0 44304 2832 2212 S    0  0.3   0:00.08 smtp                                                                                                                              
 4304 postfix   20   0 44188 2832 2208 S    0  0.3   0:00.05 smtp                                                                                                                              
 4314 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.06 smtp                                                                                                                              
 4340 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.02 smtp                                                                                                                              
 4357 postfix   20   0 44188 2832 2208 S    0  0.3   0:00.04 smtp                                                                                                                              
 4373 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.08 smtp                                                                                                                              
 4379 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.04 smtp                                                                                                                              
 4389 postfix   20   0 44188 2832 2212 S    0  0.3   0:00.02 smtp                                                                                                                              
 4293 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.07 smtp                                                                                                                              
 4295 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.09 smtp                                                                                                                              
 4306 postfix   20   0 44188 2828 2212 S    0  0.3   0:00.04 smtp                                                                                                                              
 4318 postfix   20   0 44188 2828 2212 S    0  0.3   0:00.02 smtp                                                                                                                              
 4320 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.06 smtp                                                                                                                              
 4331 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.07 smtp                                                                                                                              
 4364 postfix   20   0 44188 2828 2212 S    0  0.3   0:00.05 smtp                                                                                                                              
 4369 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.05 smtp                                                                                                                              
 4374 postfix   20   0 44188 2828 2212 S    0  0.3   0:00.04 smtp                                                                                                                              
 4395 postfix   20   0 44188 2828 2212 S    0  0.3   0:00.06 smtp                                                                                                                              
 4399 postfix   20   0 44188 2828 2208 S    0  0.3   0:00.06 smtp                                                                                                                              
 4299 postfix   20   0 44188 2824 2208 S    0  0.3   0:00.07 smtp  

Wie finde ich heraus, welche Datei Postfix ausführt?
Mein System ist Debian, Apache2, MySQL

Antwort1

Um solche Dinge aufzuspüren, müssen Sie eine Art Auditing aktivieren, wenn sie passieren. Sie können entweder eine Prozessbuchhaltung durchführen (was meiner Erfahrung nach kaum sinnvoll ist) oder auditd so konfigurieren, dass es Systemaufrufe wie execve prüft.

Sobald das Ereignis von auditd protokolliert wurde, können Sie den Execve oder Fork für die betreffende Binärdatei finden und ihn einfach zu einer bestimmten Shell oder einem bestimmten Skript zurückverfolgen. Es kann jedoch zu den Servicedateien zurückverfolgt werden. Wenn ein Angreifer den Postfix-Dienst manuell über die Befehlszeile startet, erfahren Sie, mit welchem ​​Benutzernamen er sich zuerst beim System angemeldet hat und von wo aus (Konsole, Hostname des Remote-Systems usw.).

Diese Antwortauf SF bietet eine gute Einführung in auditd. Die meisten auditd-Benutzer scheinen RHEL zu sein. Wenn Sie also danach googeln, werden Sie auf viele RHEL-bezogene Informationen stoßen, aber viele der Fähigkeiten sind offensichtlich zwischen Distributionen übertragbar.

verwandte Informationen