
このリポジトリには、nginx 1.4.0 のソースコードと、プリコンパイル済みバイナリ(スタッククッキーあり/なし)が含まれています。また、簡単にセットアップできる Vagrantfile も用意されています。
アナウンスとパッチ: http://mailman.nginx.org/pipermail/nginx-announce/2013/000112.html バグの解説: http://www.vnsecurity.net/research/2013/05/21/analysis-of-nginx-cve-2013-2028.html
vagrant up
vagrant ssh
sudo /vagrant/bin/nginx1
Nginx は、VM 内ではポート 80 で公開され、外部(ホスト側)ではポート 8080 で公開されています。
# Inside VM
curl 127.0.0.1
# Outside VM
curl 127.0.0.1:8080
sudo gdb /vagrant/bin/nginx1
gdb> set follow-fork-mode child
gdb> r
エクスプロイトを開発するためにこれを行う必要はありません。これは主に記録用のものです。
# Clone repository
hg clone http://hg.nginx.org/nginx
# See tags
hg tags
# Checkout 1.4.0
hg up 7809529022b8
スタッククッキーなし:
./auto/configure --without-http_rewrite_module --without-http_gzip_module
vim objs/Makefile
# Add '-fno-stack-protector' to the CFLAGS
make -j4
sudo make install
スタッククッキーあり:
./auto/configure --without-http_rewrite_module --without-http_gzip_module
make -j4
sudo make install
# Webroot in /usr/local/nginx/html/
sudo ./objs/nginx