1. SSH Protocol Version 1 Supported
Dengan openssh, tinggal edit sshd_config supaya menghilangkan support versi 1 dengan mencantumkan hanya:
Protocol 2
Cara verifikasi:
# ssh -v -1 localhost
2. PHP PHPInfo Cross-Site Scripting Vulnerability
Disable fungsi phpinfo() dengan memasukkan baris berikut di php.ini:
disabled_functions = phpinfo
Cara verifikasi:
# telnet localhost 80
GET /info/phpinfo.php HTTP/1.1
Host: anything.com
Connection: Keep-Alive
3. "test-cgi" CGI Vulnerability
Karena ngga' butuh CGI lagi, hilangkan sekalian map ke /cgi-bin/ di apache httpd.conf
Cara Verifikasi:
# telnet localhost 80
GET /cgi-bin/test-cgi
Host: anything.com
Connection: Keep-Alive
4. Apache HTTP Server 413 Error HTTP Request Method Cross-Site Scripting Weakness
Solusi termudahnya adalah mengubah default error message untuk 413 di apache httpd.conf
ErrorDocument 413 "<h1>413 Error HTTP Request Method Cross-Site Scripting Weakness</h1>"
Cara verifikasi:
# telnet localhost 80
<script>alert(document.domain)</script> / HTTP/1.1
Host: anything.com
Connection: close
Content-length: -1
5. Hidden RPC Services
Buat semua RPC services nonaktif (got the list idea from here). Untungnya ngga' ada service NFS yang dipake jadi portmap, nfs, nfslock, rpcidmapd, rpc* bisa di nonaktifkan pake chkconfig
/sbin/chkconfig portmap off
/sbin/chkconfig nfs off
/sbin/chkconfig nfslock off
/sbin/chkconfig rpcidmpd off
Cara verifikasi:
# netstat -an | grep ":111"
# netstat -an | grep ":1024"
6. Web Directories Listable Vulnerability
7. Web Server HTTP Trace/Track Method Support Cross-Site Tracing Vulnerability
Untuk apache dengan banyak vhosts, solusinya dengan mod_rewrite dan harus rajin nambah satu-satu di masing2 vhost configuration (read more here):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
Cara Verifikasi:
# telnet localhost 80
TRACE / HTTP/1.1
Host: anything.com
Via: tulis apapun di sini akan di ulang di body
8. printenv Script
9. ICMP Timestamp Request
Nah ini agak masuk ke firewall. Tambah aja kurang lebih seperti ini:
/sbin/iptables -A RH-Firewall-1-INPUT -p icmp --icmp-type timestamp-request -j REJECT --reject-with icmp-host-prohibited
/sbin/iptables -A RH-Firewall-1-INPUT -p icmp --icmp-type timestamp-reply -j REJECT --reject-with icmp-host-prohibited
/sbin/iptables -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
10. expose_php Set On in php.ini
Tinggal ubah php.ini jadi
expose_php = Off
Cara Verifikasi:
# telnet localhost 80
GET /?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 HTTP/1.1
Host: anything.com
Connection: Keep-Alive
11.Apache Web Server ETag Header Information Disclosure Weakness
Tambah httpd.conf dengan
FileETag None, atau
FileETag MTime Size
Cara Verifikasi:
# telnet localhost 80
HEAD / HTTP/1.1
Host: anything.com
Connection: Keep-Alive