Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added nasm to make nasm_shell.rb working #14350

Merged
merged 1 commit into from
Nov 5, 2020
Merged

added nasm to make nasm_shell.rb working #14350

merged 1 commit into from
Nov 5, 2020

Conversation

matusso
Copy link
Contributor

@matusso matusso commented Nov 4, 2020

added nasm package to make nasm_shell working
docker run -it --rm metasploitframework/metasploit-framework:latest tools/exploit/nasm_shell.rb
nasm >

@gwillcox-r7 gwillcox-r7 self-assigned this Nov 4, 2020
@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Nov 4, 2020

Confirmed this should fix things, output shown below:

Tests on Master Showing the Issue is There
 ~/git/metasploit-framework │ master  sudo docker run -it metasploitframework/metasploit-framework:latest tools/exploit/nasm_shell.rb
Unable to find image 'metasploitframework/metasploit-framework:latest' locally
latest: Pulling from metasploitframework/metasploit-framework
188c0c94c7c5: Pull complete 
ba0772c8cbe1: Pull complete 
dcff69af93dc: Pull complete 
16507e0b6111: Pull complete 
6aadfa8ff2a8: Pull complete 
df66286a4739: Pull complete 
db0391e2e8c0: Pull complete 
f3c75bd1fced: Pull complete 
73a1b7124b11: Pull complete 
4efe1185c6d4: Pull complete 
b35a419e0c70: Pull complete 
dc53394c8a44: Pull complete 
43fd578ad469: Pull complete 
65ab817fe965: Pull complete 
0dd908947751: Pull complete 
91263ed14893: Pull complete 
af76af3d30dc: Pull complete 
9e9fde04df85: Pull complete 
Digest: sha256:1d83281460bca1b48a120a0ee53cab5b71555d973ca4d1bf5e6532eb67fa8b5c
Status: Downloaded newer image for metasploitframework/metasploit-framework:latest
No nasm installation was found.
 ~/git/metasploit-framework │ master  ruby tools/exploit/nasm_shell.rb                                                 ✔ │ 25s │ 2.7.2 Ruby 
No nasm installation was found.
 ~/git/metasploit-framework │ master  sudo apt-get install nasm                                                              ✔ │ 2.7.2 Ruby 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  john-data
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  nasm
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 362 kB of archives.
After this operation, 3,374 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 nasm amd64 2.14.02-1 [362 kB]
Fetched 362 kB in 1s (572 kB/s)
Selecting previously unselected package nasm.
(Reading database ... 176065 files and directories currently installed.)
Preparing to unpack .../nasm_2.14.02-1_amd64.deb ...
Unpacking nasm (2.14.02-1) ...
Setting up nasm (2.14.02-1) ...
Processing triggers for man-db (2.9.1-1) ...
 ~/git/metasploit-framework │ master  ruby tools/exploit/nasm_shell.rb                                                  ✔ │ 4s │ 2.7.2 Ruby 
nasm > exit
 ~/git/metasploit-framework │ master    

And with the update:

With Patch Applied
 ~/git/metasploit-framework │ land-pr14350:pr/14350  sudo docker build .                                                     ✔ │ 2.7.2 Ruby 
Sending build context to Docker daemon  151.8MB
Step 1/32 : FROM ruby:2.7.2-alpine3.12 AS builder
 ---> 79f5adf3c887
Step 2/32 : LABEL maintainer="Rapid7"
 ---> Using cache
 ---> e8fa4a6597f5
Step 3/32 : ARG BUNDLER_CONFIG_ARGS="set clean 'true' set no-cache 'true' set system 'true' set without 'development test coverage'"
 ---> Using cache
 ---> 60fbe7cfad9c
Step 4/32 : ENV APP_HOME=/usr/src/metasploit-framework
 ---> Using cache
 ---> 6e826134e57b
Step 5/32 : ENV BUNDLE_IGNORE_MESSAGES="true"
 ---> Using cache
 ---> b1ffec6c69fa
Step 6/32 : WORKDIR $APP_HOME
 ---> Using cache
 ---> dd9ffa56edf2
Step 7/32 : COPY Gemfile* metasploit-framework.gemspec Rakefile $APP_HOME/
 ---> Using cache
 ---> e82e0b57af2a
Step 8/32 : COPY lib/metasploit/framework/version.rb $APP_HOME/lib/metasploit/framework/version.rb
 ---> Using cache
 ---> d06865db12dd
Step 9/32 : COPY lib/metasploit/framework/rails_version_constraint.rb $APP_HOME/lib/metasploit/framework/rails_version_constraint.rb
 ---> Using cache
 ---> 89902917135e
Step 10/32 : COPY lib/msf/util/helper.rb $APP_HOME/lib/msf/util/helper.rb
 ---> Using cache
 ---> df15d5a0c339
Step 11/32 : RUN apk add --no-cache       autoconf       bison       build-base       ruby-dev       openssl-dev       readline-dev       sqlite-dev       postgresql-dev       libpcap-dev       libxml2-dev       libxslt-dev       yaml-dev       zlib-dev       ncurses-dev       git     && echo "gem: --no-document" > /etc/gemrc     && gem update --system     && bundle config $BUNDLER_ARGS     && bundle install --jobs=8     && rm -rf /usr/local/bundle/cache     && chmod -R a+r /usr/local/bundle
 ---> Running in c289920c9190
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/62) Installing m4 (1.4.18-r1)
(2/62) Installing libbz2 (1.0.8-r1)
(3/62) Installing perl (5.30.3-r0)
(4/62) Installing autoconf (2.69-r2)
(5/62) Installing bison (3.6.2-r0)
(6/62) Installing binutils (2.34-r1)
(7/62) Installing libmagic (5.38-r0)
(8/62) Installing file (5.38-r0)
(9/62) Installing isl (0.18-r0)
(10/62) Installing libgomp (9.3.0-r2)
(11/62) Installing libatomic (9.3.0-r2)
(12/62) Installing libgphobos (9.3.0-r2)
(13/62) Installing mpfr4 (4.0.2-r4)
(14/62) Installing mpc1 (1.1.0-r1)
(15/62) Installing gcc (9.3.0-r2)
(16/62) Installing musl-dev (1.1.24-r9)
(17/62) Installing libc-dev (0.7.2-r3)
(18/62) Installing g++ (9.3.0-r2)
(19/62) Installing make (4.3-r0)
(20/62) Installing fortify-headers (1.1-r0)
(21/62) Installing patch (2.7.6-r6)
(22/62) Installing build-base (0.5-r2)
(23/62) Installing nghttp2-libs (1.41.0-r0)
(24/62) Installing libcurl (7.69.1-r1)
(25/62) Installing expat (2.2.9-r1)
(26/62) Installing pcre2 (10.35-r0)
(27/62) Installing git (2.26.2-r0)
(28/62) Installing perl-error (0.17029-r0)
(29/62) Installing perl-git (2.26.2-r0)
(30/62) Installing git-perl (2.26.2-r0)
(31/62) Installing libpcap (1.9.1-r2)
(32/62) Installing libpcap-dev (1.9.1-r2)
(33/62) Installing xz-libs (5.2.5-r0)
(34/62) Installing xz-dev (5.2.5-r0)
(35/62) Installing libxml2 (2.9.10-r5)
(36/62) Installing libxml2-dev (2.9.10-r5)
(37/62) Installing libgpg-error (1.37-r0)
(38/62) Installing libgcrypt (1.8.5-r0)
(39/62) Installing libxslt (1.1.34-r0)
(40/62) Installing libxslt-dev (1.1.34-r0)
(41/62) Installing ncurses-dev (6.2_p20200523-r0)
(42/62) Installing openssl-dev (1.1.1g-r0)
(43/62) Installing llvm10-libs (10.0.0-r2)
(44/62) Installing clang-libs (10.0.0-r2)
(45/62) Installing clang (10.0.0-r2)
(46/62) Installing llvm10 (10.0.0-r2)
(47/62) Installing icu-libs (67.1-r0)
(48/62) Installing icu (67.1-r0)
(49/62) Installing icu-dev (67.1-r0)
(50/62) Installing db (5.3.28-r1)
(51/62) Installing libsasl (2.1.27-r6)
(52/62) Installing libldap (2.4.50-r0)
(53/62) Installing libpq (12.4-r0)
(54/62) Installing postgresql-libs (12.4-r0)
(55/62) Installing postgresql-dev (12.4-r0)
(56/62) Installing libhistory (8.0.4-r0)
(57/62) Installing readline-dev (8.0.4-r0)
(58/62) Installing ruby-libs (2.7.1-r3)
(59/62) Installing ruby (2.7.1-r3)
(60/62) Installing ruby-dev (2.7.1-r3)
(61/62) Installing sqlite-libs (3.32.1-r0)
(62/62) Installing sqlite-dev (3.32.1-r0)
Executing busybox-1.31.1-r19.trigger
OK: 510 MiB in 98 packages
Latest version already installed. Done.
Settings are listed in order of priority. The top value will be used.
ignore_messages
Set via BUNDLE_IGNORE_MESSAGES: true

app_config
Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"

silence_root_warning
Set via BUNDLE_SILENCE_ROOT_WARNING: true

Fetching gem metadata from https://rubygems.org/.........
Using rake 13.0.1
Fetching Ascii85 1.0.3
Fetching minitest 5.14.2
Fetching thread_safe 0.3.6
Fetching builder 3.2.4
Fetching erubi 1.9.0
Fetching concurrent-ruby 1.0.5
Fetching mini_portile2 2.4.0
Installing Ascii85 1.0.3
Fetching crass 1.0.6
Installing mini_portile2 2.4.0
Installing builder 3.2.4
Installing erubi 1.9.0
Installing thread_safe 0.3.6
Fetching rack 2.2.3
Installing minitest 5.14.2
Installing concurrent-ruby 1.0.5
Fetching arel 9.0.0
Fetching public_suffix 4.0.6
Installing crass 1.0.6
Fetching afm 0.2.2
Fetching ast 2.4.1
Fetching aws-eventstream 1.1.0
Installing arel 9.0.0
Fetching aws-partitions 1.388.0
Fetching jmespath 1.4.0
Installing rack 2.2.3
Installing aws-eventstream 1.1.0
Installing ast 2.4.1
Installing public_suffix 4.0.6
Installing afm 0.2.2
Fetching bcrypt 3.1.16
Fetching bindata 2.4.8
Fetching bcrypt_pbkdf 1.0.1
Installing aws-partitions 1.388.0
Fetching bit-struct 0.16
Fetching bson 4.11.0
Installing jmespath 1.4.0
Using bundler 2.1.4
Fetching byebug 11.1.3
Fetching coderay 1.1.3
Installing bcrypt 3.1.16 with native extensions
Installing bit-struct 0.16
Installing bcrypt_pbkdf 1.0.1 with native extensions
Installing bindata 2.4.8
Fetching cookiejar 0.3.3
Installing byebug 11.1.3 with native extensions
Installing bson 4.11.0 with native extensions
Installing coderay 1.1.3
Installing cookiejar 0.3.3
Fetching daemons 1.3.1
Installing daemons 1.3.1
Fetching docile 1.3.2
Fetching unf_ext 0.0.7.7
Fetching ed25519 1.2.4
Fetching diff-lcs 1.4.4
Fetching http_parser.rb 0.6.0
Fetching eventmachine 1.2.7
Fetching method_source 1.0.0
Installing diff-lcs 1.4.4
Installing docile 1.3.2
Installing method_source 1.0.0
Fetching multipart-post 2.1.1
Fetching thor 1.0.1
Installing ed25519 1.2.4 with native extensions
Installing http_parser.rb 0.6.0 with native extensions
Installing eventmachine 1.2.7 with native extensions
Installing unf_ext 0.0.7.7 with native extensions
Installing multipart-post 2.1.1
Installing thor 1.0.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching websocket-extensions 0.1.5
Fetching filesize 0.2.0
Using io-console 0.5.6
Installing filesize 0.2.0
Installing websocket-extensions 0.1.5
Fetching fivemat 1.3.7
Fetching rkelly-remix 0.0.7
Fetching hashery 2.1.2
Fetching json 2.3.1
Fetching memory_profiler 0.9.14
Installing fivemat 1.3.7
Installing memory_profiler 0.9.14
Installing hashery 2.1.2
Installing rkelly-remix 0.0.7
Installing json 2.3.1 with native extensions
Fetching metasm 1.0.4
Fetching pg 1.2.3
Fetching rex-core 0.1.13
Fetching net-ssh 6.1.0
Installing rex-core 0.1.13
Installing net-ssh 6.1.0
Installing pg 1.2.3 with native extensions
Installing metasm 1.0.4
Fetching rubyntlm 0.6.2
Installing rubyntlm 0.6.2
Fetching metasploit-payloads 2.0.22
Installing metasploit-payloads 2.0.22
Fetching metasploit_payloads-mettle 1.0.2
Fetching rubyzip 2.3.0
Fetching mqtt 0.5.0
Fetching msgpack 1.3.3
Fetching net-ldap 0.16.3
Fetching nessus_rest 0.1.6
Fetching network_interface 0.0.2
Installing mqtt 0.5.0
Installing rubyzip 2.3.0
Fetching nexpose 7.2.1
Installing net-ldap 0.16.3
Installing msgpack 1.3.3 with native extensions
Fetching openssl-ccm 1.2.2
Installing nessus_rest 0.1.6
Installing network_interface 0.0.2 with native extensions
Installing nexpose 7.2.1
Installing openssl-ccm 1.2.2
Fetching openvas-omp 0.0.4
Installing openvas-omp 0.0.4
Installing metasploit_payloads-mettle 1.0.2
Fetching pcaprub 0.13.0
Fetching patch_finder 1.0.2
Fetching ruby-rc4 0.1.5
Fetching ttfunk 1.6.2.1
Fetching rb-readline 0.5.5
Fetching redcarpet 3.5.0
Fetching rex-text 0.2.28
Installing ruby-rc4 0.1.5
Installing patch_finder 1.0.2
Fetching rex-struct2 0.1.2
Installing pcaprub 0.13.0 with native extensions
Installing rex-text 0.2.28
Installing redcarpet 3.5.0 with native extensions
Installing ttfunk 1.6.2.1
Installing rb-readline 0.5.5
Installing rex-struct2 0.1.2
Fetching rex-java 0.1.5
Fetching rex-registry 0.1.3
Installing rex-java 0.1.5
Installing rex-registry 0.1.3
Fetching ruby-macho 2.3.0
Fetching openssl-cmac 2.0.1
Fetching windows_error 0.1.2
Fetching tilt 2.0.10
Fetching sqlite3 1.3.13
Fetching sshkey 2.0.0
Using xmlrpc 0.3.0
Fetching parallel 1.19.2
Installing openssl-cmac 2.0.1
Installing parallel 1.19.2
Fetching rainbow 3.0.0
Installing tilt 2.0.10
Installing ruby-macho 2.3.0
Fetching regexp_parser 1.8.2
Installing sqlite3 1.3.13 with native extensions
Installing windows_error 0.1.2
Fetching rexml 3.2.4
Fetching rspec-support 3.9.4
Installing rainbow 3.0.0
Installing regexp_parser 1.8.2
Installing rexml 3.2.4
Installing rspec-support 3.9.4
Installing sshkey 2.0.0
Fetching ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Fetching simplecov-html 0.12.3
Fetching timecop 0.9.2
Fetching ruby-prof 1.4.1
Fetching yard 0.9.25
Fetching swagger-blocks 3.0.0
Installing ruby-progressbar 1.10.1
Installing unicode-display_width 1.7.0
Installing timecop 0.9.2
Installing swagger-blocks 3.0.0
Fetching nokogiri 1.10.10
Fetching tzinfo 1.2.7
Installing ruby-prof 1.4.1 with native extensions
Fetching i18n 1.8.5
Fetching aws-sigv4 1.2.2
Installing simplecov-html 0.12.3
Installing aws-sigv4 1.2.2
Installing yard 0.9.25
Installing tzinfo 1.2.7
Installing i18n 1.8.5
Installing nokogiri 1.10.10 with native extensions
Fetching addressable 2.7.0
Fetching rack-test 1.1.0
Fetching rack-protection 2.1.0
Fetching warden 1.2.9
Fetching parser 2.7.2.0
Installing rack-protection 2.1.0
Installing rack-test 1.1.0
Installing warden 1.2.9
Installing addressable 2.7.0
Installing parser 2.7.2.0
Fetching hrr_rb_ssh 0.3.0.pre2
Fetching faraday 1.1.0
Fetching pry 0.13.1
Fetching mustermann 1.1.1
Fetching websocket-driver 0.7.3
Fetching unf 0.1.4
Fetching reline 0.1.6
Installing websocket-driver 0.7.3 with native extensions
Installing hrr_rb_ssh 0.3.0.pre2
Installing mustermann 1.1.1
Installing faraday 1.1.0
Installing reline 0.1.6
Installing pry 0.13.1
Installing unf 0.1.4
Fetching jsobfu 0.4.2
Fetching thin 1.7.2
Fetching rex-socket 0.1.24
Fetching em-socksify 0.3.2
Fetching rex-mime 0.1.5
Fetching rex-arch 0.1.13
Fetching rex-ole 0.1.6
Installing em-socksify 0.3.2
Fetching rex-random_identifier 0.1.4
Installing rex-socket 0.1.24
Fetching rex-rop_builder 0.1.3
Installing jsobfu 0.4.2
Installing rex-arch 0.1.13
Installing rex-ole 0.1.6
Installing rex-mime 0.1.5
Fetching rex-zip 0.1.3
Installing thin 1.7.2 with native extensions
Fetching pdf-reader 2.4.1
Fetching packetfu 1.1.13
Installing rex-random_identifier 0.1.4
Fetching ruby_smb 2.0.6
Fetching rspec-core 3.9.3
Installing rex-rop_builder 0.1.3
Installing rex-zip 0.1.3
Installing rspec-core 3.9.3
Installing pdf-reader 2.4.1
Installing packetfu 1.1.13
Installing ruby_smb 2.0.6
Fetching rspec-mocks 3.9.1
Fetching simplecov 0.18.2
Fetching aws-sdk-core 3.109.1
Fetching rspec-expectations 3.9.3
Fetching faker 2.14.0
Fetching activesupport 5.2.4.4
Fetching tzinfo-data 1.2020.4
Installing rspec-expectations 3.9.3
Installing rspec-mocks 3.9.1
Installing simplecov 0.18.2
Fetching rubocop-ast 1.1.0
Fetching loofah 2.7.0
Installing activesupport 5.2.4.4
Fetching recog 2.3.15
Installing aws-sdk-core 3.109.1
Installing tzinfo-data 1.2020.4
Installing rubocop-ast 1.1.0
Installing loofah 2.7.0
Fetching irb 1.2.7
Fetching sinatra 2.1.0
Installing recog 2.3.15
Fetching sawyer 0.8.2
Installing faker 2.14.0
Fetching simpleidn 0.1.1
Installing irb 1.2.7
Fetching pry-byebug 3.9.0
Installing sawyer 0.8.2
Fetching faye-websocket 0.11.0
Installing sinatra 2.1.0
Fetching em-http-request 1.1.7
Installing simpleidn 0.1.1
Installing pry-byebug 3.9.0
Installing faye-websocket 0.11.0
Fetching rex-sslscan 0.1.5
Fetching rex-bin_tools 0.1.6
Fetching rex-encoder 0.1.4
Fetching rex-nop 0.1.1
Installing rex-sslscan 0.1.5
Fetching rex-powershell 0.1.87
Installing rex-bin_tools 0.1.6
Installing em-http-request 1.1.7
Installing rex-encoder 0.1.4
Installing rex-nop 0.1.1
Fetching rspec 3.9.0
Fetching rubocop 1.1.0
Fetching rails-html-sanitizer 1.3.0
Fetching aws-sdk-ec2 1.203.0
Installing rex-powershell 0.1.87
Fetching aws-sdk-iam 1.46.0
Fetching aws-sdk-kms 1.39.0
Installing rspec 3.9.0
Fetching rails-dom-testing 2.0.3
Fetching activemodel 5.2.4.4
Installing rails-html-sanitizer 1.3.0
Fetching factory_bot 6.1.0
Installing aws-sdk-iam 1.46.0
Installing rails-dom-testing 2.0.3
Installing aws-sdk-kms 1.39.0
Installing rubocop 1.1.0
Fetching octokit 4.19.0
Installing activemodel 5.2.4.4
Installing factory_bot 6.1.0
Installing aws-sdk-ec2 1.203.0
Fetching dnsruby 1.61.5
Fetching rex-exploitation 0.1.24
Fetching rspec-rerun 1.1.0
Fetching actionview 5.2.4.4
Installing octokit 4.19.0
Installing rspec-rerun 1.1.0
Installing rex-exploitation 0.1.24
Fetching aws-sdk-s3 1.83.1
Fetching activerecord 5.2.4.4
Fetching xdr 3.0.2
Installing dnsruby 1.61.5
Installing actionview 5.2.4.4
Installing xdr 3.0.2
Installing aws-sdk-s3 1.83.1
Installing activerecord 5.2.4.4
Fetching actionpack 5.2.4.4
Installing actionpack 5.2.4.4
Fetching railties 5.2.4.4
Fetching arel-helpers 2.11.0
Installing arel-helpers 2.11.0
Installing railties 5.2.4.4
Fetching factory_bot_rails 6.1.0
Fetching rspec-rails 4.0.1
Fetching metasploit-model 3.1.2
Fetching metasploit-concern 3.0.0
Installing factory_bot_rails 6.1.0
Installing metasploit-concern 3.0.0
Installing rspec-rails 4.0.1
Installing metasploit-model 3.1.2
Fetching metasploit_data_models 4.1.0
Installing metasploit_data_models 4.1.0
Fetching metasploit-credential 4.0.2
Installing metasploit-credential 4.0.2
Using metasploit-framework 6.0.15 from source at `.`
Bundle complete! 17 Gemfile dependencies, 169 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Removing intermediate container c289920c9190
 ---> f67308d37db1
Step 12/32 : FROM ruby:2.7.2-alpine3.12
 ---> 79f5adf3c887
Step 13/32 : LABEL maintainer="Rapid7"
 ---> Using cache
 ---> e8fa4a6597f5
Step 14/32 : ENV APP_HOME=/usr/src/metasploit-framework
 ---> Running in 33f114e633db
Removing intermediate container 33f114e633db
 ---> 9e632a0cdc93
Step 15/32 : ENV NMAP_PRIVILEGED=""
 ---> Running in 3d6876d3ebed
Removing intermediate container 3d6876d3ebed
 ---> b3f2841ef6f6
Step 16/32 : ENV METASPLOIT_GROUP=metasploit
 ---> Running in 9f1fe5e81b0f
Removing intermediate container 9f1fe5e81b0f
 ---> d8cbccc73161
Step 17/32 : RUN addgroup -S $METASPLOIT_GROUP
 ---> Running in bd228bc793a2
Removing intermediate container bd228bc793a2
 ---> 297b08e956c8
Step 18/32 : RUN apk add --no-cache bash sqlite-libs nmap nmap-scripts nmap-nselibs postgresql-libs python2 python3 ncurses libcap su-exec alpine-sdk python2-dev openssl-dev nasm
 ---> Running in 9109203f5fb2
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/56) Installing fakeroot (1.24-r0)
(2/56) Installing openssl (1.1.1g-r0)
(3/56) Installing libattr (2.4.48-r0)
(4/56) Installing attr (2.4.48-r0)
(5/56) Installing libacl (2.2.53-r0)
(6/56) Installing tar (1.32-r1)
(7/56) Installing patch (2.7.6-r6)
(8/56) Installing lzip (1.21-r0)
(9/56) Installing nghttp2-libs (1.41.0-r0)
(10/56) Installing libcurl (7.69.1-r1)
(11/56) Installing curl (7.69.1-r1)
(12/56) Installing abuild (3.6.0-r1)
Executing abuild-3.6.0-r1.pre-install
(13/56) Installing binutils (2.34-r1)
(14/56) Installing libmagic (5.38-r0)
(15/56) Installing file (5.38-r0)
(16/56) Installing isl (0.18-r0)
(17/56) Installing libgomp (9.3.0-r2)
(18/56) Installing libatomic (9.3.0-r2)
(19/56) Installing libgphobos (9.3.0-r2)
(20/56) Installing mpfr4 (4.0.2-r4)
(21/56) Installing mpc1 (1.1.0-r1)
(22/56) Installing gcc (9.3.0-r2)
(23/56) Installing musl-dev (1.1.24-r9)
(24/56) Installing libc-dev (0.7.2-r3)
(25/56) Installing g++ (9.3.0-r2)
(26/56) Installing make (4.3-r0)
(27/56) Installing fortify-headers (1.1-r0)
(28/56) Installing build-base (0.5-r2)
(29/56) Installing expat (2.2.9-r1)
(30/56) Installing pcre2 (10.35-r0)
(31/56) Installing git (2.26.2-r0)
(32/56) Installing alpine-sdk (1.0-r0)
(33/56) Installing bash (5.0.17-r0)
Executing bash-5.0.17-r0.post-install
(34/56) Installing libcap (2.27-r0)
(35/56) Installing nasm (2.14.02-r0)
(36/56) Installing ncurses (6.2_p20200523-r0)
(37/56) Installing lua5.3-libs (5.3.5-r6)
(38/56) Installing libpcap (1.9.1-r2)
(39/56) Installing pcre (8.44-r0)
(40/56) Installing libssh2 (1.9.0-r1)
(41/56) Installing nmap (7.80-r2)
(42/56) Installing nmap-nselibs (7.80-r2)
(43/56) Installing nmap-scripts (7.80-r2)
(44/56) Installing openssl-dev (1.1.1g-r0)
(45/56) Installing db (5.3.28-r1)
(46/56) Installing libsasl (2.1.27-r6)
(47/56) Installing libldap (2.4.50-r0)
(48/56) Installing libpq (12.4-r0)
(49/56) Installing postgresql-libs (12.4-r0)
(50/56) Installing libbz2 (1.0.8-r1)
(51/56) Installing sqlite-libs (3.32.1-r0)
(52/56) Installing python2 (2.7.18-r0)
(53/56) Installing python2-dev (2.7.18-r0)
(54/56) Installing xz-libs (5.2.5-r0)
(55/56) Installing python3 (3.8.5-r0)
(56/56) Installing su-exec (0.2-r1)
Executing busybox-1.31.1-r19.trigger
OK: 365 MiB in 92 packages
Removing intermediate container 9109203f5fb2
 ---> 4da24fdbe41a
Step 19/32 : RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
 ---> Running in c061c885b041
Removing intermediate container c061c885b041
 ---> d07c703d9324
Step 20/32 : RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which nmap)
 ---> Running in 9a38c9512df9
Removing intermediate container 9a38c9512df9
 ---> c8307872b5aa
Step 21/32 : COPY --from=builder /usr/local/bundle /usr/local/bundle
 ---> a58836caaf46
Step 22/32 : RUN chown -R root:metasploit /usr/local/bundle
 ---> Running in 8efb423f4723
Removing intermediate container 8efb423f4723
 ---> 805a16819a4e
Step 23/32 : COPY . $APP_HOME/
 ---> ccf1765626b1
Step 24/32 : RUN chown -R root:metasploit $APP_HOME/
 ---> Running in ed875a1109a0
Removing intermediate container ed875a1109a0
 ---> c2e1c35c0923
Step 25/32 : RUN chmod 664 $APP_HOME/Gemfile.lock
 ---> Running in 643f516c65c9
Removing intermediate container 643f516c65c9
 ---> 68675e8b6cf2
Step 26/32 : RUN gem update --system
 ---> Running in d20789058e62
Latest version already installed. Done.
Removing intermediate container d20789058e62
 ---> 2f01fc62888b
Step 27/32 : RUN cp -f $APP_HOME/docker/database.yml $APP_HOME/config/database.yml
 ---> Running in 70e38a6169ce
Removing intermediate container 70e38a6169ce
 ---> 3a226be0d429
Step 28/32 : RUN curl -O https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-pip.py
 ---> Running in 375e5aff4ec6
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1842k  100 1842k    0     0  3670k      0 --:--:-- --:--:-- --:--:-- 3663k
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pip
  Downloading pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Collecting setuptools
  Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
Collecting wheel
  Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-20.2.4 setuptools-44.1.1 wheel-0.35.1
Removing intermediate container 375e5aff4ec6
 ---> 010cc9dd0649
Step 29/32 : RUN pip install impacket
 ---> Running in 6b1fc4cfb76c
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting impacket
  Downloading impacket-0.9.21.tar.gz (1.3 MB)
Collecting pyasn1>=0.2.3
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pycryptodomex
  Downloading pycryptodomex-3.9.9.tar.gz (15.5 MB)
Collecting pyOpenSSL>=0.13.1
  Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting ldap3!=2.5.0,!=2.5.2,!=2.6,>=2.5
  Downloading ldap3-2.8.1-py2.py3-none-any.whl (423 kB)
Collecting ldapdomaindump>=0.9.0
  Downloading ldapdomaindump-0.9.3-py2-none-any.whl (18 kB)
Collecting flask>=1.0
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting cryptography>=2.8
  Downloading cryptography-3.2.1.tar.gz (540 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting dnspython
  Downloading dnspython-1.16.0-py2.py3-none-any.whl (188 kB)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
Collecting click>=5.1
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Werkzeug>=0.15
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting itsdangerous>=0.24
  Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2>=2.10.1
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Processing /root/.cache/pip/wheels/2c/a2/ba/9946bd7142c27e34a08603d002d9abe8153b7bf419fb73ce7f/cffi-1.14.3-cp27-cp27mu-linux_x86_64.whl
Collecting enum34; python_version < "3"
  Downloading enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting ipaddress; python_version < "3"
  Downloading ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: impacket, pycryptodomex, cryptography, future, MarkupSafe
  Building wheel for impacket (setup.py): started
  Building wheel for impacket (setup.py): finished with status 'done'
  Created wheel for impacket: filename=impacket-0.9.21-py2-none-any.whl size=1275219 sha256=4d1d08dd0335065cc1262367909842bc9318ce535db57d8fa92629cad0e054d1
  Stored in directory: /root/.cache/pip/wheels/78/2b/7f/6178812817a5561c795757857b11995ec747fbcc0caab0173f
  Building wheel for pycryptodomex (setup.py): started
  Building wheel for pycryptodomex (setup.py): finished with status 'done'
  Created wheel for pycryptodomex: filename=pycryptodomex-3.9.9-cp27-cp27mu-linux_x86_64.whl size=13632422 sha256=720c4406c5381f2f041ebfe5815ab57ca3f0419c9f02e38c3f36cd03ad4d6456
  Stored in directory: /root/.cache/pip/wheels/80/4d/85/1123251b0e61fdd1a4855960f8bd96a9ceda42b6d4eb0582bf
  Building wheel for cryptography (PEP 517): started
  Building wheel for cryptography (PEP 517): finished with status 'done'
  Created wheel for cryptography: filename=cryptography-3.2.1-cp27-cp27mu-linux_x86_64.whl size=772157 sha256=1faaa606aa7c6c875cbe1190fe8e8d3bbcef804d589985325eaca45bae46ad81
  Stored in directory: /root/.cache/pip/wheels/fe/60/39/f01ad5e36cf602c413938aebdacd0dc5150349208c8767c414
  Building wheel for future (setup.py): started
  Building wheel for future (setup.py): finished with status 'done'
  Created wheel for future: filename=future-0.18.2-py2-none-any.whl size=502566 sha256=8bd0fabf41e8cd6b07bea3e0f7fecf1222fbddc067ecf553dd9d6bcc006ecad0
  Stored in directory: /root/.cache/pip/wheels/5f/11/0c/aad680baf5ef4fbcbab992c9f03e1130357e0c173a4fdabfff
  Building wheel for MarkupSafe (setup.py): started
  Building wheel for MarkupSafe (setup.py): finished with status 'done'
  Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-cp27-cp27mu-linux_x86_64.whl size=27324 sha256=f7730261e75f5bfb8e39f89a709f95b5346b3cf39b0b2c610267e0265bd66f2f
  Stored in directory: /root/.cache/pip/wheels/4d/4b/bf/cce593b6a13cd17b3bf2452827317fc68dfa4c61655596028c
Successfully built impacket pycryptodomex cryptography future MarkupSafe
Installing collected packages: pyasn1, pycryptodomex, six, pycparser, cffi, enum34, ipaddress, cryptography, pyOpenSSL, ldap3, dnspython, future, ldapdomaindump, click, Werkzeug, itsdangerous, MarkupSafe, Jinja2, flask, impacket
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 cffi-1.14.3 click-7.1.2 cryptography-3.2.1 dnspython-1.16.0 enum34-1.1.10 flask-1.1.2 future-0.18.2 impacket-0.9.21 ipaddress-1.0.23 itsdangerous-1.1.0 ldap3-2.8.1 ldapdomaindump-0.9.3 pyOpenSSL-19.1.0 pyasn1-0.4.8 pycparser-2.20 pycryptodomex-3.9.9 six-1.15.0
Removing intermediate container 6b1fc4cfb76c
 ---> de99974a8c6b
Step 30/32 : WORKDIR $APP_HOME
 ---> Running in 37739dffe59b
Removing intermediate container 37739dffe59b
 ---> 4ab5ea0dc437
Step 31/32 : ENTRYPOINT ["docker/entrypoint.sh"]
 ---> Running in 1de7c2d9c1dd
Removing intermediate container 1de7c2d9c1dd
 ---> 7a92245eb447
Step 32/32 : CMD ["./msfconsole", "-r", "docker/msfconsole.rc", "-y", "$APP_HOME/config/database.yml"]
 ---> Running in 7b7971098b9e
Removing intermediate container 7b7971098b9e
 ---> 93168ff4a266
Successfully built 93168ff4a266
 ~/git/metasploit-framework │ land-pr14350:pr/14350  sudo docker ps -a                                              ✔ │ 4m 56s │ 2.7.2 Ruby 
CONTAINER ID        IMAGE                                             COMMAND                  CREATED             STATUS                     PORTS               NAMES
ebde099846ae        metasploitframework/metasploit-framework:latest   "docker/entrypoint.s…"   8 minutes ago       Exited (0) 8 minutes ago                       gifted_bartik
 ~/git/metasploit-framework │ land-pr14350:pr/14350  sudo docker run 93168ff4a266                                            ✔ │ 2.7.2 Ruby 
                                                  
  +-------------------------------------------------------+
  |  METASPLOIT by Rapid7                                 |
  +---------------------------+---------------------------+
  |      __________________   |                           |
  |  ==c(______(o(______(_()  | |""""""""""""|======[***  |
  |             )=\           | |  EXPLOIT   \            |
  |            // \\          | |_____________\_______    |
  |           //   \\         | |==[msf >]============\   |
  |          //     \\        | |______________________\  |
  |         // RECON \\       | \(@)(@)(@)(@)(@)(@)(@)/   |
  |        //         \\      |  *********************    |
  +---------------------------+---------------------------+
  |      o O o                |        \'\/\/\/'/         |
  |              o O          |         )======(          |
  |                 o         |       .'  LOOT  '.        |
  | |^^^^^^^^^^^^^^|l___      |      /    _||__   \       |
  | |    PAYLOAD     |""\___, |     /    (_||_     \      |
  | |________________|__|)__| |    |     __||_)     |     |
  | |(@)(@)"""**|(@)(@)**|(@) |    "       ||       "     |
  |  = = = = = = = = = = = =  |     '--------------'      |
  +---------------------------+---------------------------+


       =[ metasploit v6.0.15-dev                          ]
+ -- --=[ 2072 exploits - 1120 auxiliary - 352 post       ]
+ -- --=[ 592 payloads - 45 encoders - 10 nops            ]
+ -- --=[ 7 evasion                                       ]

Metasploit tip: View a module's description using info, or the enhanced version in your browser with info -d

[*] Processing docker/msfconsole.rc for ERB directives.
[*] resource (docker/msfconsole.rc)> Ruby Code (236 bytes)
LHOST => 172.18.0.2
stty: standard input: Not a tty
msf6 > %                                                                                                                                      ~/git/metasploit-framework │ land-pr14350:pr/14350  sudo docker run -it 93168ff4a266 tools/exploit/nasm_shell.rb       ✔ │ 5s │ 2.7.2 Ruby 
nasm > exit
 ~/git/metasploit-framework │ land-pr14350:pr/14350      

@gwillcox-r7 gwillcox-r7 merged commit 17fb85c into rapid7:master Nov 5, 2020
@gwillcox-r7 gwillcox-r7 added bug rn-fix release notes fix and removed enhancement labels Nov 5, 2020
@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Nov 5, 2020

Release Notes

Added a missing nasm dependency in Dockerfile to ensure that tools/exploit/nasm_shell.rb will now work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants