另一台 LDAP 服务器报告称,有大量尝试读取 LDAP 目录并尝试访问大量用户,所有这些尝试都像是黑客试图读取用户/密码信息。这些情况每分钟都在发生。它报告称,原始 IP 是 Mac OS X 10.4 Tiger Server,它是网络上用于 iMac 的文件服务器。
当我lsof -i:ldap +c 0
在 Mac 服务器上运行时,它返回
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
DirectoryService 60 root 11u IPv4 0x38de228 0t0 TCP mymacserver.com:50106->myldapserver.com:ldap (ESTABLISHED)
跑步ps -Aj
给予
USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND
[...]
root 60 1 60 290c7e4 0 Ss ?? 0:19.00 /usr/sbin/DirectoryService
跑步cat /Library/Logs/DirectoryService/DirectoryService.server.log
给予
2012-02-15 15:01:29 EST - DirectoryService 2.1 (v353.6) starting up...
2012-02-15 15:01:29 EST - Initializing TCP ...
2012-02-15 15:01:29 EST - Plugin <Configure>, Version <1.7>, processed successfully.
2012-02-15 15:01:29 EST - Plugin <NetInfo>, Version <1.7.4>, processed successfully.
2012-02-15 15:01:29 EST - Plugin <LDAPv3>, Version <1.7.4>, processed successfully.
2012-02-15 15:01:29 EST - Plugin <Search>, Version <1.7>, processed successfully.
2012-02-15 15:01:29 EST - Plugin "Active Directory", Version "1.5.8", is set to load lazily.
2012-02-15 15:01:29 EST - Plugin "AppleTalk", Version "1.3", is set to load lazily.
2012-02-15 15:01:29 EST - Plugin "Bonjour", Version "1.3", loaded successfully.
2012-02-15 15:01:29 EST - Plugin "BSD", Version "1.2.2", is set to load lazily.
2012-02-15 15:01:29 EST - Plugin "PasswordServer", Version "3.1.2", is set to load lazily.
2012-02-15 15:01:29 EST - Plugin "SLP", Version "1.3.1", is set to load lazily.
2012-02-15 15:01:29 EST - Plugin "SMB", Version "1.3", is set to load lazily.
2012-02-15 15:01:29 EST - Registered node /Configure
2012-02-15 15:01:29 EST - Registered node /Search
2012-02-15 15:01:29 EST - Plug-in Configure state is now active.
2012-02-15 15:01:29 EST - Registered node /Search/Contacts
2012-02-15 15:01:29 EST - Registered node /Search/Network
2012-02-15 15:01:29 EST - Plug-in Bonjour state is now active.
2012-02-15 15:01:29 EST - Plug-in Search state is now active.
2012-02-15 15:01:29 EST - Plug-in LDAPv3 state is now active.
2012-02-15 15:01:29 EST - Registered node /NetInfo/DefaultLocalNode
2012-02-15 15:01:29 EST - Plug-in NetInfo state is now active.
2012-02-15 15:01:32 EST - Network transition occurred.
2012-02-15 15:01:35 EST - Registered Locally Hosted Node /NetInfo/DefaultLocalNode
2012-02-15 15:01:41 EST - Network transition occurred.
2012-02-15 15:01:41 EST - Network transition occurred.
2012-02-15 15:01:41 EST - Network transition occurred.
(时间是几个小时前服务器重启的时候。)这种情况已经持续了好几天了。
有没有办法查看每分钟调用 DirectoryService 的内容?
我无法使用netstat -p
,因为 Mac OS X 10.4 Tiger 不支持该-p
选项。
我需要禁用这个恶意脚本,但我无法完全禁用 LDAP 客户端,因为用户依赖该服务器进行文件存储和用户 ID。
编辑:
我运行sudo killall -USR1 DirectoryService
以启用调试日志,并且似乎memberd
正在lookupd
调用 DirectoryService。
答案1
通常的情况:
- 从网络拉出服务器。
- 彻底清除,然后从已知安全来源(操作系统光盘)开始重新安装
- 重新安装所有内容。
- 确保你不会犯错误并且修补好一切。
- 从备份恢复数据。
它不是“脚本”,你不知道黑客可能还安装了什么其他东西。