Skip to content

Commit a71d7ae

Browse files
committed
Land rapid7#6089, @jvazquez-r7 Fix HTTP mixins namespaces
2 parents 5143da1 + 28ca34c commit a71d7ae

File tree

84 files changed

+220
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+220
-209
lines changed

lib/msf/core.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ module Msf
6767
require 'msf/core/payload'
6868
require 'msf/core/post'
6969

70-
# Custom HTTP Modules
71-
require 'msf/http/wordpress'
72-
require 'msf/http/typo3'
73-
require 'msf/http/jboss'
74-
7570
# Drivers
7671
require 'msf/core/exploit_driver'
7772

lib/msf/core/exploit/http/jboss.rb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- coding: binary -*-
2+
3+
module Msf
4+
class Exploit
5+
class Remote
6+
module HTTP
7+
# This module provides a way of interacting with JBoss installations
8+
module JBoss
9+
require 'msf/core/exploit/http/jboss/base'
10+
require 'msf/core/exploit/http/jboss/bean_shell'
11+
require 'msf/core/exploit/http/jboss/bean_shell_scripts'
12+
require 'msf/core/exploit/http/jboss/deployment_file_repository'
13+
require 'msf/core/exploit/http/jboss/deployment_file_repository_scripts'
14+
15+
include Msf::Exploit::Remote::HttpClient
16+
include Msf::Exploit::Remote::HTTP::JBoss::Base
17+
include Msf::Exploit::Remote::HTTP::JBoss::BeanShell
18+
include Msf::Exploit::Remote::HTTP::JBoss::BeanShellScripts
19+
include Msf::Exploit::Remote::HTTP::JBoss::DeploymentFileRepository
20+
include Msf::Exploit::Remote::HTTP::JBoss::DeploymentFileRepositoryScripts
21+
22+
def initialize(info = {})
23+
super
24+
25+
register_options(
26+
[
27+
OptString.new('TARGETURI', [true, 'The URI path of the JMX console', '/jmx-console']),
28+
OptEnum.new('VERB', [true, 'HTTP Method to use (for CVE-2010-0738)', 'POST', ['GET', 'POST', 'HEAD']]),
29+
OptString.new('PACKAGE', [false, 'The package containing the BSHDeployer service'])
30+
], Msf::Exploit::Remote::HTTP::JBoss)
31+
end
32+
end
33+
end
34+
end
35+
end
36+
end

lib/msf/http/jboss/base.rb renamed to lib/msf/core/exploit/http/jboss/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: binary -*-
22

3-
module Msf::HTTP::JBoss::Base
3+
module Msf::Exploit::Remote::HTTP::JBoss::Base
44

55
# Deploys a WAR through HTTP uri invoke
66
#

lib/msf/http/jboss/bean_shell.rb renamed to lib/msf/core/exploit/http/jboss/bean_shell.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: binary -*-
22

3-
module Msf::HTTP::JBoss::BeanShell
3+
module Msf::Exploit::Remote::HTTP::JBoss::BeanShell
44

55
DEFAULT_PACKAGES = %w{ deployer scripts }
66

lib/msf/http/jboss/bean_shell_scripts.rb renamed to lib/msf/core/exploit/http/jboss/bean_shell_scripts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: binary -*-
22

3-
module Msf::HTTP::JBoss::BeanShellScripts
3+
module Msf::Exploit::Remote::HTTP::JBoss::BeanShellScripts
44

55
# Generates a Bean Shell Script.
66
#

lib/msf/http/jboss/deployment_file_repository.rb renamed to lib/msf/core/exploit/http/jboss/deployment_file_repository.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: binary -*-
22

3-
module Msf::HTTP::JBoss::DeploymentFileRepository
3+
module Msf::Exploit::Remote::HTTP::JBoss::DeploymentFileRepository
44

55
# Upload a text file with DeploymentFileRepository.store()
66
#

lib/msf/http/jboss/deployment_file_repository_scripts.rb renamed to lib/msf/core/exploit/http/jboss/deployment_file_repository_scripts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: binary -*-
22

3-
module Msf::HTTP::JBoss::DeploymentFileRepositoryScripts
3+
module Msf::Exploit::Remote::HTTP::JBoss::DeploymentFileRepositoryScripts
44

55
# Generate a stager JSP to write the second stager to the
66
# deploy/management directory. It is only used with HEAD/GET requests

lib/msf/core/exploit/http/typo3.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: binary -*-
2+
3+
module Msf
4+
class Exploit
5+
class Remote
6+
module HTTP
7+
# This module provides a way of interacting with typo3 installations
8+
module Typo3
9+
require 'msf/core/exploit/http/typo3/login'
10+
require 'msf/core/exploit/http/typo3/uris'
11+
12+
include Msf::Exploit::Remote::HttpClient
13+
include Msf::Exploit::Remote::HTTP::Typo3::Login
14+
include Msf::Exploit::Remote::HTTP::Typo3::URIs
15+
16+
def initialize(info = {})
17+
super
18+
19+
register_options(
20+
[
21+
Msf::OptString.new('TARGETURI', [true, 'The base path to the typo3 application', '/']),
22+
], Msf::Exploit::Remote::HTTP::Typo3
23+
)
24+
end
25+
end
26+
end
27+
end
28+
end
29+
end

lib/msf/http/typo3/login.rb renamed to lib/msf/core/exploit/http/typo3/login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: binary -*-
2-
module Msf::HTTP::Typo3::Login
2+
module Msf::Exploit::Remote::HTTP::Typo3::Login
33

44
# performs a typo3 backend login
55
#

lib/msf/http/typo3/uris.rb renamed to lib/msf/core/exploit/http/typo3/uris.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: binary -*-
2-
module Msf::HTTP::Typo3::URIs
2+
module Msf::Exploit::Remote::HTTP::Typo3::URIs
33

44
# Returns the Typo3 Login URL
55
#

0 commit comments

Comments
 (0)