
내 사이트에 맬웨어 문제가 있다고 생각합니다. 내 서버를 사용하여 스팸 메일을 보냅니다. 달릴 때맨 위그리고Shift+M나는 다음을 얻습니다 :
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
postfix를 실행하는 파일을 어떻게 찾을 수 있나요?
내 시스템은 Debian, Apache2, MySQL입니다.
답변1
이 항목을 추적하려면 해당 문제가 발생할 때 일종의 감사를 활성화해야 합니다. 프로세스 계정을 수행하거나(내 경험으로는 거의 유용하지 않음) execve와 같은 시스템 호출을 감사하도록 auditd를 구성할 수 있습니다.
이벤트가 auditd에 의해 기록되면 문제의 바이너리에 대한 execve 또는 분기를 찾아 특정 셸이나 스크립트를 다시 추적할 수 있습니다. 하지만 서비스 파일을 다시 추적할 수도 있습니다. 공격자가 명령줄에서 수동으로 postfix 서비스를 시작하는 경우 시스템에 처음 로그인한 사용자 이름과 위치(콘솔, 원격 시스템의 호스트 이름 등)를 알려줍니다.
이 답변over on SF는 여러분에게 auditd를 소개하는 일을 훌륭하게 해냈습니다. 대부분의 감사 사용자는 RHEL인 것으로 보이므로 Google에서 검색하면 많은 RHEL 중심 정보를 접할 수 있지만 분명히 배포판 간에 많은 기술 세트를 이전할 수 있습니다.