常规服务器安全检测备忘录

安全检查项推荐工具
Nginx配置安全gixy
Nginx目录权限检查手工
Apache日志安全检测apache-scalp
PHP配置文件安全检测pcc
主机安全审计lynis
rootkit木马检查chkrootkit;rootkit hunter
系统用户排查手工,注意高权限和无需密码账号
线上代码.git泄露检查GitHack
线上代码DS_Store文件泄露检查ds_store_exp

1.Nginx配置安全

官方声明需要python2.7或3.5+

1
2
pip install gixy
gixy ./nginx.conf

删除gixy:

1
pip uninstall gixy

项目地址:https://github.com/yandex/gixy

2.Nginx目录权限检查

可以参考:http://www.cnblogs.com/freeweb/p/4946101.html

3.Apache日志安全检测

1
2
3
wget https://github.com/neuroo/apache-scalp/blob/master/scalp.py
wget https://raw.githubusercontent.com/PHPIDS/PHPIDS/master/lib/IDS/default_filter.xml
./scalp.py -l /var/log/httpd_log -f ./default_filter.xml -o ./scalp-output --html

该工具较老,长期无人维护,但其报告也有一定的参考价值
项目地址:https://github.com/neuroo/apache-scalp

####4.PHP配置文件安全检测

1
2
git clone https://github.com/sektioneins/pcc.git
php phpconfigcheck.php

项目地址:https://github.com/sektioneins/pcc

5.主机安全审计

1
2
3
4
git clone https://github.com/CISOfy/lynis
./lynis audit system
或者
./lynis --check-all –Q

lynis检测过于严苛,不过还是有一定的参考价值

项目地址:https://github.com/CISOfy/lynis

6.rootkit木马检查

chkrootkit:http://www.chkrootkit.org/

长期维护项目,建议学习使用,若将来脱离阿里云平台可以作为定期任务检测

7.系统用户排查

注意高权限和无需密码账号

8.线上代码.git泄露检查

依赖Git,使用前需确保git在环境变量中存在

1
2
git clone https://github.com/BugScanTeam/GitHack.git
python GitHack.py http://www.example.com/.git/

项目地址:https://github.com/BugScanTeam/GitHack

9.线上代码DS_Store文件泄露检查

1
2
git clone https://github.com/lijiejie/ds_store_exp.git
python ds_store_exp.py http://www.example.com/.DS_Store

项目地址:https://github.com/lijiejie/ds_store_exp

10.检测php webshell

1
2
git clone https://github.com/Neohapsis/NeoPI.git
python neopi.py -a -A /var/www/html/

NeoPI会通过信息熵等分析混淆过的webshell文件,针对通过编码混淆的上传式小马检测率较高

项目地址:https://github.com/Neohapsis/NeoPI

php-malware-finder的检测率高于NeoPI,且长期维护,但安装复杂,需要安装yara等,可以先在测试服务器上进行:

安装yara参考:http://yara.readthedocs.io/en/latest/gettingstarted.html

1
2
3
4
git clone https://github.com/nbs-system/php-malware-finder.git
yara -r ./php.yar /var/www
或:
./phpmalwarefinder -v -l php /var/www

项目地址:https://github.com/nbs-system/php-malware-finder

11.多余端口排查

可以先用nmap扫描:

1
nmap -v XXXXX

后在对应线上端口/服务进行排查

12.弱口令排查(应用和服务)

  • Post author: E_Bwill
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值