Edit Default Library Path on solaris 10 type “crle” for list Default Library Path crle Configuration file [version 4]: /var/ld/ld.config Default Library Path (ELF): /usr/local/lib:/lib:/usr/lib Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default) Command line: crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib type “crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib” to change Default Library Path crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib
Archive for the ‘linux security’ Category
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); curl_setopt($ch, CURLOPT_PROXY,”$host:$port”);
snmptranslate -IR tcpPassiveOpens.0 TCP-MIB::tcpPassiveOpens.0 snmptranslate -On TCP-MIB::tcpPassiveOpens.0 .1.3.6.1.2.1.6.6.0 snmptranslate .1.3.6.1.2.1.6.6.0 TCP-MIB::tcpPassiveOpens.0
netstat -tan | grep ‘:80 ‘ | awk ‘{print $6}’ | sort | uniq -c
คำสั่งดรอปการโจมตีจาก ip ด้วยคำสั่ง route บน linux route add xxx.xxx.xxx.xxx reject คำสั่งตรวจสอบว่าทำการปิดกันเรียบร้อยหรือยังถ้าแสดงข้อความแบบด้านล่างแสดงว่าได้ปิดกั้น ip นั้นเรียบร้อยแล้ว ip route get xxx.xxx.xxx.xxx RTNETLINK answers: Network is unreachable ใช้คำสั่งด้านล่างเพื่อดู ตารางการ route [root@demo01 ~]#route -n ใช้คำสั่งด้านล่างเพื่อยกเลิกการปิดกัน ip ดังกล่าว [root@demo01 ~]#route del -host xxx.xxx.xxx.xxx reject หมายเหตุ xxx.xxx.xxx.xxx คือ ip ที่ต้องการปิดกั้น
การยกเลิกใช้งาน function อันตรายและไม่จำเป็นใน php
Posted: 25th May 2009 by admin in apache, phpTags: php function
แก้ไขที่ php.ini หาบรรทัดที่มีข้อความว่า disable_functions = โดย เพิ่มข้อความเหล่านี้ไปหลัง เครื่องหมาย = แล้วจัดการเซฟ escapeshellarg, escapeshellcmd, exec, passthru, proc_open,proc_close,proc_get_status, proc_nice, proc_terminate,shell_exec, system,apache_child_terminate, apache_get_modules,apache_get_version,apache_getenv, apache_lookup_uri, apache_note,apache_request_headers,apache_reset_timeout, apache_response_headers,apache_setenv, getallheaders, virtual, popen, pclose สั่ง restart apache
การป้องกัน user แอบดึง file ข้อมูลในระบบโดยใช้ local infile ผ่าน mysql
Posted: 25th May 2009 by admin in mysqlTags: local infile
ให้ทำการเพิ่มข้อความด้านล่างลงไปใน my.cnf แล้วทำการ restart mysql local-infile=0
how to install mod_rpaf – reverse proxy
Posted: 25th May 2009 by admin in apache, Linux How toTags: reverse proxy
How to install mod_rpaf – reverse proxy wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz tar -xvzf mod_rpaf-0.6.tar.gz cd mod_rpaf-0.6 apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c add this to httpd.conf and save it LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so #Reverse proxy RPAFenable On RPAFsethostname On RPAFproxy_ips 127.0.0.1 xxx.xxx.xxx.xxx <– set your public ip xxx.xxx.xxx.xxx RPAFheader X-Forwarded-For restart service apache #/etc/init.d/httpd restart