Skip to content

Commit cce7424

Browse files
committed
Merge branch 'master' of github.com:rapid7/metasploit-framework
2 parents ad39a5c + 27778e6 commit cce7424

File tree

14 files changed

+1088
-106
lines changed

14 files changed

+1088
-106
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
.yardoc
77
# Mac OS X files
88
.DS_Store
9+
# database config for testing
10+
config/database.yml
911
# simplecov coverage data
1012
coverage
1113
data/meterpreter/ext_server_pivot.dll

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: ruby
22
before_install:
33
- sudo apt-get update -qq
44
- sudo apt-get install -qq libpcap-dev
5+
before_script:
6+
- cp config/database.yml.travis config/database.yml
7+
- rake db:create
8+
- rake db:migrate
59

610
rvm:
711
#- '1.8.7'

Rakefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@ require 'bundler/setup'
22

33
require 'metasploit_data_models'
44

5+
pathname = Pathname.new(__FILE__)
6+
root = pathname.parent
7+
8+
# add metasploit-framework/lib to load paths so rake files can just require
9+
# files normally without having to use __FILE__ and recalculating root and the
10+
# path to lib
11+
lib_pathname = root.join('lib')
12+
$LOAD_PATH.unshift(lib_pathname.to_s)
13+
14+
#
15+
# load rake files like a rails engine
16+
#
17+
18+
rakefile_glob = root.join('lib', 'tasks', '**', '*.rake').to_path
19+
20+
Dir.glob(rakefile_glob) do |rakefile|
21+
load rakefile
22+
end
23+
524
print_without = false
625

726
begin
@@ -12,7 +31,7 @@ rescue LoadError
1231

1332
print_without = true
1433
else
15-
RSpec::Core::RakeTask.new(:spec)
34+
RSpec::Core::RakeTask.new(:spec => 'db:test:prepare')
1635

1736
task :default => :spec
1837
end

config/database.yml.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Please only use postgresql bound to a TCP port.
2+
development: &pgsql
3+
adapter: postgresql
4+
database: metasploit_framework_development
5+
username: metasploit_framework_development
6+
password: __________________________________
7+
host: localhost
8+
port: 5432
9+
pool: 5
10+
timeout: 5
11+
12+
# Warning: The database defined as "test" will be erased and
13+
# re-generated from your development database when you run "rake".
14+
# Do not set this db to the same as development or production.
15+
#
16+
# Note also, sqlite3 is totally unsupported by Metasploit now.
17+
test:
18+
<<: *pgsql
19+
database: metasploit_framework_test
20+
username: metasploit_framework_test
21+
password: ___________________________

config/database.yml.travis

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# @note This file is only for use in travis-ci. If you need to make a
2+
# config/database.yml for running rake, rake spec, or rspec locally, please
3+
# customize `conifg/database.yml.example`
4+
#
5+
# @example Customizing config/database.yml.example
6+
# cp config/database.yml.example config/database.yml
7+
# # update password fields for each environment's user
8+
9+
# Using the postgres user locally without a host and port is the supported
10+
# configuration from Travis-CI
11+
#
12+
# @see http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
13+
development: &pgsql
14+
adapter: postgresql
15+
database: metasploit_framework_development
16+
username: postgres
17+
pool: 5
18+
timeout: 5
19+
20+
# Warning: The database defined as "test" will be erased and
21+
# re-generated from your development database when you run "rake".
22+
# Do not set this db to the same as development or production.
23+
#
24+
# Note also, sqlite3 is totally unsupported by Metasploit now.
25+
test:
26+
<<: *pgsql
27+
database: metasploit_framework_test

data/ropdb/java.xml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,28 @@
66
</compatibility>
77

88
<gadgets base="0x7c340000">
9-
<gadget offset="0x0000252c">POP EBP # RETN</gadget>
10-
<gadget offset="0x0000252c">skip 4 bytes</gadget>
11-
<gadget offset="0x0002c55a">POP EBX # RETN</gadget>
12-
<gadget value="0x00000400">0x00000400-> ebx</gadget>
13-
<gadget offset="0x00005249">POP EDX # RETN</gadget>
14-
<gadget value="0x00000040">0x00000040-> edx</gadget>
15-
<gadget offset="0x000011c0">POP ECX # RETN</gadget>
16-
<gadget offset="0x00051897">Writable location</gadget>
17-
<gadget offset="0x0000b8d7">POP EDI # RETN</gadget>
18-
<gadget offset="0x00006c0b">RETN (ROP NOP)</gadget>
19-
<gadget offset="0x00026fa6">POP ESI # RETN</gadget>
9+
<gadget offset="0x00024c66">POP EBP # RETN</gadget>
10+
<gadget offset="0x00024c66">skip 4 bytes</gadget>
11+
<gadget offset="0x00004edc">POP EAX # RETN</gadget>
12+
<gadget value="FFFFFBFF">0x00000201</gadget>
13+
<gadget offset="0x00011e05">NEG EAX # RETN</gadget>
14+
<gadget offset="0x000136e3">POP EBX # RETN</gadget>
15+
<gadget value="0xffffffff"></gadget>
16+
<gadget offset="0x00005255">INC EBX # FPATAN # RETN</gadget>
17+
<gadget offset="0x0001218e">ADD EBX,EAX # XOR EAX,EAX # INC EAX # RETN</gadget>
18+
<gadget offset="0x00005937">POP EDX # RETN</gadget>
19+
<gadget value="0xffffffc0">0x00000040</gadget>
20+
<gadget offset="0x00011eb1">NEG EDX # RETN</gadget>
21+
<gadget offset="0x0002c5b9">POP ECX # RETN</gadget>
22+
<gadget offset="0x00051e67">Writable location</gadget>
23+
<gadget offset="0x00002e58">POP EDI # RETN</gadget>
24+
<gadget offset="0x0000d202">RETN (ROP NOP)</gadget>
25+
<gadget offset="0x0000f8f4">POP ESI # RETN</gadget>
2026
<gadget offset="0x000015a2">JMP [EAX]</gadget>
21-
<gadget offset="0x000362fb">POP EAX # RETN</gadget>
27+
<gadget offset="0x00004edc">POP EAX # RETN</gadget>
2228
<gadget offset="0x0003a151">ptr to VirtualProtect()</gadget>
2329
<gadget offset="0x00038c81">PUSHAD # ADD AL,0EF # RETN</gadget>
24-
<gadget offset="0x00005c30">ptr to 'push esp # ret</gadget>
30+
<gadget offset="0x00005c30">ptr to 'push esp # ret</gadget>
2531
</gadgets>
2632
</rop>
2733
</db>

0 commit comments

Comments
 (0)