友链
导航
These are the good times in your life,
so put on a smile and it'll be alright
友链
导航
# 查找空口令 $ sudo perl -F: -ane 'print if not $F[1];' /etc/shadow # 查找 UID 为 null 或为 0 的所有行 $ sudo perl -F: -ane 'print if not $F[2];' /etc/passwd
# 查找setuid程序的脚本 # 以防程序被攻击者替换 $ /usr/bin/find / -user root -perm -4000 -print | /bin/mail -s "Setuid root files" netadmin
Pluggable Authentication Modules,可插入式身份验证模块。
概念是:需要验证功能的程序(如login、sudo等)只需要知道有一个模块可以用来替他们执行验证功能就行了。
PAM 模块通过 /etc/pam.d 目录下的文件(如 /etc/pam.d/login )来进行配置。
linux - What is the canonical way to store iptables rules - Server Fault
#!/bin/sh IPTABLES=/sbin/iptables echo "[+] Flushing existing iptables rules..." $IPTABLES -F $IPTABLES -X $IPTABLES -P INPUT DROP echo "[+] Setting up INPUT chain..." $IPTABLES -A INPUT -i lo -j ACCEPT $IPTABLES -A INPUT -s 192.168.0.0/255.255.255.0 -j ACCEPT
-i lo
$ chmod ug+x iptables.sh $ ./iptables.sh
$ iptables-save > /etc/iptables.rules
# Generated by iptables-save v1.4.12 on Sat Jan 5 20:19:55 2013 *filter :INPUT DROP [35:3155] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [447:55160] -A INPUT -i lo -j ACCEPT -A INPUT -s 192.168.0.0/24 -j ACCEPT COMMIT # Completed on Sat Jan 5 20:19:55 2013
pre-up iptables-restore < /etc/iptables.rules
## set default policies to let everything in iptables --policy INPUT ACCEPT; iptables --policy OUTPUT ACCEPT; iptables --policy FORWARD ACCEPT; ## start fresh iptables -Z; # zero counters iptables -F; # flush (delete) rules iptables -X; # delete all extra chains
面对 XSS 漏洞, 可使用 Laruence 的 php 插件 taint 检测.
短期造成很多请求
面对 Web 的 DDoS 可以如下方式实现: 自己创建一个内容非常吸引人的页面,或者利用一个访问量较大但是存在跨站脚本漏洞(XSS)的页面,在页面中加入一小段对最终用户不可见,但是会自动发送一个 Post 请求到目标站点的 JavaScript 脚本,你的拒绝服务攻击(DoS)就成功升级为分布式拒绝服务攻击(DDoS)了。而访问这些页面的普通用户,则会在不知情的情况下成为帮助你继续攻击的“僵尸”群。