From 7f48aca014f6d730e2855bb4b59f25b8ba1e7073 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 14 Dec 2015 10:24:58 +0000 Subject: Finish assignment 4 --- CamilStaps-s4498062-Assignment-4/ex1/hackme.rb | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 CamilStaps-s4498062-Assignment-4/ex1/hackme.rb (limited to 'CamilStaps-s4498062-Assignment-4/ex1/hackme.rb') diff --git a/CamilStaps-s4498062-Assignment-4/ex1/hackme.rb b/CamilStaps-s4498062-Assignment-4/ex1/hackme.rb new file mode 100644 index 0000000..6a93cc4 --- /dev/null +++ b/CamilStaps-s4498062-Assignment-4/ex1/hackme.rb @@ -0,0 +1,32 @@ +require 'msf/core' + +class Metasploit3 < Msf::Exploit::Remote + + include Msf::Exploit::Remote::Tcp + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Hackme', + 'Description' => 'hackme.cs.ru.nl:2288 exploit', + 'License' => MSF_LICENSE, + 'Author' => ['Camil Staps'], + 'Version' => '$Revision: $', + 'Payload' => { 'Space' => 1400, 'BadChars' => "\x00" }, + 'Targets' => [ ['Automatic', {} ] ], + 'Privileged' => false, + 'DefaultOptions'=> { 'EXITFUNC' => 'process' }, + 'DefaultTarget' => 0)) + + register_options( + [ + OptString.new('HOST', [ false, 'The host.', 'hackme.cs.ru.nl'] ), + Opt::RPORT(2288) + ], self.class) + end + + def exploit + connect + disconnect + end +end + -- cgit v1.2.3