mod_reqtimeout.so
Apache slowris attack
LoadModule reqtimeout_module modules/mod_reqtimeout.so
RequestReadTimeout header=10-30,MinRate=500 body=10,MinRate=2000
FEATURE(`smrsh’, `/usr/sbin/smrsh’)dnl
FEATURE(`authinfo’, `hash -o /etc/mail/authinfo.db’)dnl
FEATURE(`mailertable’, `hash -o /etc/mail/mailertable.db’)dnl
FEATURE(`virtusertable’, `hash -o /etc/mail/virtusertable.db’)dnl
/etc/mail/authinfo
AuthInfo:[1.1.1.1] “U:yourusername” “P:yourpassword” “M:LOGIN PLAIN”
/etc/mail/mailertable
testmail.com esmtp:[1.1.1.1]
#make
O LogLevel=15
sendmail restart
Apache slowris attack
LoadModule reqtimeout_module modules/mod_reqtimeout.so
RequestReadTimeout header=10-30,MinRate=500 body=10,MinRate=2000
http://wiki.centos.org/HowTos/Xen/Xen4QuickStart
http://wiki.centos.org/HowTos/Xen/Xen4QuickStart/Xen4Libvirt
vi /usr/lib/python2.6/site-packages/virtinst/VirtualDisk.py
replace “tap” ==> “tap2″
python -m compileall /usr/lib/python2.6/site-packages/virtinst/
download android sdk, adt, unzip vao c:\adt
$ android create avd –name avd19 –target android-19
download nodejs http://nodejs.org/download/ , chon windows bin 32 hoac 64 bits, copy vao c:\adt\node.exe
download npm, http://nodejs.org/dist/npm/ , unzip vao c:\adt\
download http://ant.apache.org/ , unzip vao c:\adt\ant , set PATH=c:\adt\ant\bin
C:\> npm install -g phonegap
$ phonegap create my-app
$ cd my-app
$ phonegap install android
$ phonegap run android
$ plugman install –platform android –project “c:\adt\my-app\platforms\android” –plugin org.apache.cordova.device
$ phonegap local plugin add org.apache.cordova.device
DEBUG tool
$
npm -g install weinre
$ weinre --boundHost yourIP
open web http://yourIP:8080/client
put this line to www/index.html
<script src="http://yourIP:8080/target/target-script-min.js"></script>
cd /path/to/dir
find . -type f -name ‘*.html’ -exec grep -l “abcxyz” {} +
find . -type f -name ‘*.html’ -exec grep “abcxyz” {} +
for i in `ls /var/spool/mqueue/qf*`; do grep ‘abcxyz’ $i && rm -f $i; done
enable epel
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install glances
glances
mysql_query(”SET character_set_results = ‘utf8′, character_set_client = ‘utf8′, character_set_connection = ‘utf8′, character_set_database = ‘utf8′, character_set_server = ‘utf8′”);
======= on public ip vps ===============================
#ip tunnel add gre1 mode gre local [public_ip] remote [openvz_ip]
#ifconfig gre1 192.168.1.1 pointopoint 192.168.1.2
#route add [local_ip] gw 192.168.1.2
*nat
:PREROUTING ACCEPT [25003:1664683]
:POSTROUTING ACCEPT [168001:10091407]
:OUTPUT ACCEPT [168000:10091367]
-A PREROUTING -d [public_ip] -p tcp -m tcp –dport 80 -j DNAT –to-destination [local_ip]:80
-A PREROUTING -d [public_ip] -p tcp -m tcp –dport 22 -j DNAT –to-destination [local_ip]:22
-A POSTROUTING -s [local_ip] ! -d [public_ip] -j SNAT –to-source [public_ip]
COMMIT
# /sbin/ip rule add from [local_ip] table gre_1 # /sbin/ip route add throw [openvz_ip] table gre_1 # /sbin/ip route add default via 192.168.1.1 table gre_1
wget http://downloads.powerdns.com/releases/pdns-3.3.1.tar.gz
tar -zxvf pdns-3.3.1.tar.gz
cd pdns-3.3.1
./configure –with-modules=”gmysql” –without-lua
make && make install
vi /usr/local/etc/pdns.conf
launch=gmysql
#gmysql-host=127.0.0.1
gmysql-socket=/var/run/mysql/mysql.sock
gmysql-user=xxx
gmysql-dbname=pdns
gmysql-password=xxx
——– SQL ———
CREATE TABLE `records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain_id` int(11) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`type` varchar(10) DEFAULT NULL,
`content` varchar(64000) DEFAULT NULL,
`ttl` int(11) DEFAULT NULL,
`prio` int(11) DEFAULT NULL,
`change_date` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `nametype_index` (`name`,`type`),
KEY `domain_id` (`domain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
CREATE TABLE `domains` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`master` varchar(128) DEFAULT NULL,
`last_check` int(11) DEFAULT NULL,
`type` varchar(6) NOT NULL,
`notified_serial` int(11) DEFAULT NULL,
`account` varchar(40) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_index` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+—-+————–+——–+————+——–+—————–+———+
| id | name | master | last_check | type | notified_serial | account |
+—-+————–+——–+————+——–+—————–+———+
| 1 | macatung.com | NULL | NULL | NATIVE | NULL | NULL |
+—-+————–+——–+————+——–+—————–+———+
+—-+———–+——————-+——+——————————-+——-+——+————-+
| id | domain_id | name | type | content | ttl | prio | change_date |
+—-+———–+——————-+——+——————————-+——-+——+————-+
| 1 | 1 | macatung.com | SOA | localhost info@macatung.com 1 | 86400 | NULL | NULL |
| 2 | 1 | macatung.com | NS | ns1.macatung.com | 86400 | NULL | NULL |
| 3 | 1 | macatung.com | NS | ns2.macatung.com | 86400 | NULL | NULL |
| 4 | 1 | www.macatung.com | A | 127.0.0.1 | 120 | NULL | NULL |
| 5 | 1 | mail.macatung.com | A | 127.0.0.2 | 120 | NULL | NULL |
| 6 | 1 | macatung.com | MX | mail.macatung.com | 120 | 5 | NULL |
+—-+———–+——————-+——+——————————-+——-+——+————-+
ProxyPass /g2auth http://127.0.0.1:808/g2auth
ProxyPreserveHost On
——————————————-
ProxyPass /cacti http://192.168.205.1/cacti
ProxyPassReverse /cacti http://192.168.205.1/cacti
ProxyPass /nagios http://192.168.205.1/nagios
ProxyPassReverse /nagios http://192.168.205.1/nagios