Wall of Shame

Overview

Openwrt is already installed and you have internet access to the the router.

Step 1: ettercap

ipkg install ettercap

Step 2: lighttpd

ipkg install lighttpd lighttpd-mod-cgi
Edit lighttpd.conf
vi /etc/lighttpd.conf
uncomment mod_cgi (around line 17) and the block of code around it
server.modules = (
#       "mod_rewrite",
#       "mod_redirect",
#       "mod_alias",
#       "mod_auth",
#       "mod_status",
#       "mod_setenv",
#       "mod_fastcgi",
#       "mod_proxy",
#       "mod_simple_vhost",
        "mod_cgi",
#       "mod_ssi",
#       "mod_usertrack",
#       "mod_expire"
)
Change the Document root (around line 28)
server.document-root = "/public_www/"
add index.php and default.php to index-file.names (around line 35)
index-file.names = ( "index.html", 
                     "default.html",
                     "index.htm",
                     "default.htm",
                     "index.php",
                     "default.php")
enable cgi.assign and add php (around line 154
cgi.assign = ( ".pl"  => "/usr/bin/perl",
               ".cgi" => "/usr/bin/perl",
               ".php" => "/usr/bin/php" )
Configure httpd to listen on port 81 so if you use the web interface it doesn't conflict.
vi /etc/init.d/httpd
Change the line with all the options on it to this:
[ -d /www ] && httpd -p 81 -h /www -r ${hostname:-OpenWrt}
The important part is -p 81

Step 3: PHP

vi /etc/ipkg.conf
add this line to the list of sources
src 7.06 http://downloads.openwrt.org/kamikaze/7.06/brcm-2.4/packages

ipkg update
ipkg install php5 php5-cgi php5-mod-pcre
Configure /etc/php.ini
vi /etc/php.ini
enable short_open_tag (around line 7)
short_open_tag = On
Change doc_root
doc_root =
enable extension pcre (around line 372)
extension=pcre.so

Step 4: index.php

Download the index.php from irongeek's website to /public_www
mkdir /public_www
wget http://n0cturnal-labs.org/projects/wos-2.0/index.php.txt -O /public_www/index.php
touch /public_www/ettercap.log

Step 5: automation

Download the init script
wget http://www.n0cturnal-labs.org/projects/wos-2.0/wallofshame -O /etc/init.d/wallofshame
chmod +x /etc/init.d/wallofshame
Link /etc/init.d/wallofshame and /etc/init.d/lighttpd with their corresponding files in/etc/rc.d ln -s /etc/init.d/wallofshame /etc/rc.d/S75wallofshame ln -s /etc/init.d/lighttpd /etc/rc.d/S80lighttpd

Conclusion