Skip to content

Commit 3005a8b

Browse files
committed
Merge branch 'rapid7/master' into goliath
2 parents aeee3bb + 78822fd commit 3005a8b

File tree

388 files changed

+14345
-1664
lines changed

Some content is hidden

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

388 files changed

+14345
-1664
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.2
1+
2.4.3

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ addons:
1212
language: ruby
1313
rvm:
1414
- '2.2'
15-
- '2.3.5'
16-
- '2.4.2'
15+
- '2.3.6'
16+
- '2.4.3'
1717

1818
env:
1919
- CMD='bundle exec rake rspec-rerun:spec SPEC_OPTS="--tag content"'

Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM ruby:2.4.2-alpine
1+
FROM ruby:2.4.3-alpine3.7
22
LABEL maintainer="Rapid7"
33

44
ARG BUNDLER_ARGS="--jobs=8 --without development test coverage"
55
ENV APP_HOME /usr/src/metasploit-framework/
6-
ENV MSF_USER msf
76
ENV NMAP_PRIVILEGED=""
87
ENV BUNDLE_IGNORE_MESSAGES="true"
98
WORKDIR $APP_HOME
@@ -15,19 +14,23 @@ COPY lib/msf/util/helper.rb $APP_HOME/lib/msf/util/helper.rb
1514

1615
RUN apk update && \
1716
apk add \
17+
bash \
1818
sqlite-libs \
1919
nmap \
2020
nmap-scripts \
2121
nmap-nselibs \
2222
postgresql-libs \
23+
python \
24+
python3 \
2325
ncurses \
2426
libcap \
27+
su-exec \
2528
&& apk add --virtual .ruby-builddeps \
2629
autoconf \
2730
bison \
2831
build-base \
2932
ruby-dev \
30-
openssl-dev \
33+
libressl-dev \
3134
readline-dev \
3235
sqlite-dev \
3336
postgresql-dev \
@@ -45,13 +48,16 @@ RUN apk update && \
4548
&& apk del .ruby-builddeps \
4649
&& rm -rf /var/cache/apk/*
4750

48-
RUN adduser -g msfconsole -D $MSF_USER
49-
5051
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
5152
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which nmap)
5253

53-
USER $MSF_USER
54-
5554
ADD ./ $APP_HOME
5655

56+
# we need this entrypoint to dynamically create a user
57+
# matching the hosts UID and GID so we can mount something
58+
# from the users home directory. If the IDs don't match
59+
# it results in access denied errors. Once docker has
60+
# a solution for this we can revert it back to normal
61+
ENTRYPOINT ["docker/entrypoint.sh"]
62+
5763
CMD ["./msfconsole", "-r", "docker/msfconsole.rc"]

Gemfile.lock

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ PATH
1818
metasploit-concern
1919
metasploit-credential
2020
metasploit-model
21-
metasploit-payloads (= 1.3.25)
21+
metasploit-payloads (= 1.3.29)
2222
metasploit_data_models
23-
metasploit_payloads-mettle (= 0.3.3)
23+
metasploit_payloads-mettle (= 0.3.7)
2424
mqtt
2525
msgpack
2626
nessus_rest
@@ -38,7 +38,6 @@ PATH
3838
pg (= 0.20.0)
3939
railties
4040
rb-readline
41-
rbnacl (< 5.0.0)
4241
recog
4342
redcarpet
4443
rex-arch
@@ -59,6 +58,7 @@ PATH
5958
rex-struct2
6059
rex-text
6160
rex-zip
61+
ruby-macho
6262
ruby_smb
6363
rubyntlm
6464
rubyzip
@@ -73,7 +73,7 @@ PATH
7373
GEM
7474
remote: https://rubygems.org/
7575
specs:
76-
Ascii85 (1.0.2)
76+
Ascii85 (1.0.3)
7777
actionpack (4.2.10)
7878
actionview (= 4.2.10)
7979
activesupport (= 4.2.10)
@@ -103,12 +103,12 @@ GEM
103103
public_suffix (>= 2.0.2, < 4.0)
104104
afm (0.2.2)
105105
arel (6.0.4)
106-
arel-helpers (2.5.0)
106+
arel-helpers (2.6.1)
107107
activerecord (>= 3.1.0, < 6)
108-
backports (3.11.0)
108+
backports (3.11.1)
109109
bcrypt (3.1.11)
110110
bcrypt_pbkdf (1.0.0)
111-
bindata (2.4.1)
111+
bindata (2.4.2)
112112
bit-struct (0.16)
113113
builder (3.2.3)
114114
coderay (1.1.2)
@@ -129,7 +129,6 @@ GEM
129129
i18n (>= 0.7)
130130
faraday (0.13.1)
131131
multipart-post (>= 1.2, < 3)
132-
ffi (1.9.18)
133132
filesize (0.1.1)
134133
fivemat (1.3.5)
135134
google-protobuf (3.5.1)
@@ -183,7 +182,7 @@ GEM
183182
activemodel (~> 4.2.6)
184183
activesupport (~> 4.2.6)
185184
railties (~> 4.2.6)
186-
metasploit-payloads (1.3.25)
185+
metasploit-payloads (1.3.29)
187186
metasploit_data_models (2.0.16)
188187
activerecord (~> 4.2.6)
189188
activesupport (~> 4.2.6)
@@ -194,7 +193,7 @@ GEM
194193
postgres_ext
195194
railties (~> 4.2.6)
196195
recog (~> 2.0)
197-
metasploit_payloads-mettle (0.3.3)
196+
metasploit_payloads-mettle (0.3.7)
198197
method_source (0.9.0)
199198
mini_portile2 (2.3.0)
200199
minitest (5.11.1)
@@ -253,8 +252,6 @@ GEM
253252
thor (>= 0.18.1, < 2.0)
254253
rake (12.3.0)
255254
rb-readline (0.5.5)
256-
rbnacl (4.0.2)
257-
ffi
258255
recog (2.1.17)
259256
nokogiri
260257
redcarpet (3.4.0)
@@ -328,6 +325,7 @@ GEM
328325
rspec-rerun (1.1.0)
329326
rspec (~> 3.0)
330327
rspec-support (3.7.0)
328+
ruby-macho (1.1.0)
331329
ruby-rc4 (0.1.5)
332330
ruby_smb (0.0.18)
333331
bindata
@@ -365,7 +363,7 @@ GEM
365363
ttfunk (1.5.1)
366364
tzinfo (1.2.4)
367365
thread_safe (~> 0.1)
368-
tzinfo-data (1.2017.3)
366+
tzinfo-data (1.2018.3)
369367
tzinfo (>= 1.0.0)
370368
windows_error (0.1.2)
371369
xdr (2.0.0)

LICENSE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ Files: lib/metasm.rb lib/metasm/* data/cpuinfo/*
7575
Copyright: 2006-2010 Yoann GUILLOT
7676
License: LGPL-2.1
7777

78+
Files: lib/msf/core/modules/external/python/async_timeout/*
79+
Copyright: 2016-2017 Andrew Svetlov
80+
License: Apache 2.0
81+
7882
Files: lib/net/dns.rb lib/net/dns/*
7983
Copyright: 2006 Marco Ceresa
8084
License: Ruby

data/exploits/CVE-2017-17562/build.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
build () {
4+
CC=$1
5+
TARGET_SUFFIX=$2
6+
CFLAGS=$3
7+
8+
echo "[*] Building for ${TARGET_SUFFIX}..."
9+
for type in {shellcode,system,reverse,bind}
10+
do ${CC} ${CFLAGS} -Wall -fPIC -fno-stack-protector -Os goahead-cgi-${type}.c -s -shared -o goahead-cgi-${type}-${TARGET_SUFFIX}.so
11+
done
12+
}
13+
14+
rm -f *.o *.so *.gz
15+
16+
#
17+
# Linux GLIBC
18+
#
19+
20+
# x86
21+
build "gcc" "linux-glibc-x86_64" "-m64 -D OLD_LIB_SET_2"
22+
build "gcc" "linux-glibc-x86" "-m32 -D OLD_LIB_SET_1"
23+
24+
# ARM
25+
build "arm-linux-gnueabi-gcc-5" "linux-glibc-armel" "-march=armv5 -mlittle-endian"
26+
build "arm-linux-gnueabihf-gcc-5" "linux-glibc-armhf" "-march=armv7 -mlittle-endian"
27+
build "aarch64-linux-gnu-gcc-4.9" "linux-glibc-aarch64" ""
28+
29+
# MIPS
30+
build "mips-linux-gnu-gcc-5" "linux-glibc-mips" "-D OLD_LIB_SET_1"
31+
build "mipsel-linux-gnu-gcc-5" "linux-glibc-mipsel" "-D OLD_LIB_SET_1"
32+
build "mips64-linux-gnuabi64-gcc-5" "linux-glibc-mips64" "-D OLD_LIB_SET_1"
33+
build "mips64el-linux-gnuabi64-gcc-5" "linux-glibc-mips64el" "-D OLD_LIB_SET_1"
34+
35+
# SPARC
36+
build "sparc64-linux-gnu-gcc-5" "linux-glibc-sparc64" ""
37+
build "sparc64-linux-gnu-gcc-5" "linux-glibc-sparc" "-m32 -D OLD_LIB_SET_1"
38+
39+
# PowerPC
40+
build "powerpc-linux-gnu-gcc-5" "linux-glibc-powerpc" "-D OLD_LIB_SET_1"
41+
build "powerpc64-linux-gnu-gcc-5" "linux-glibc-powerpc64" ""
42+
build "powerpc64le-linux-gnu-gcc-4.9" "linux-glibc-powerpc64le" ""
43+
44+
# S390X
45+
build "s390x-linux-gnu-gcc-5" "linux-glibc-s390x" ""
46+
47+
gzip -9 *.so
48+
rm -f *.o *.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)