Skip to content

Instantly share code, notes, and snippets.

@r3k2
Last active November 22, 2017 11:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r3k2/3aa0fb2af8d76ade2eed5d7eb45ee5a6 to your computer and use it in GitHub Desktop.
Save r3k2/3aa0fb2af8d76ade2eed5d7eb45ee5a6 to your computer and use it in GitHub Desktop.
Brute force steganography passwords
#!/bin/env ruby
# Hispgatos
# by ReK2, Fernandez Chris
# https://keybase.io/cfernandez
# Bruteforce password protected documents hidden inside images
# add you dictionary below to the dic variable
# of course you need to have installed steghide
require 'open3'
if ARGV.size > 1
puts "to many arguments, enter just one image file name"
exit
elsif ARGV.size == 0
puts "you need to add one image file as argument"
exit
end
image = ARGV[0]
dic = "rockyou.txt"
puts "about to bruteforce image: #{image}"
File.readlines("#{dic}").each do |line|
stdout_str, error_str, status = Open3.capture3("steghide extract -sf #{image} -p #{line}")
unless ! status.success?
puts "encontrado password: #{line}"
exit
else
#esto si se quiere ver el resultado
print "."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment