Advertisement
BaSs_HaXoR

metasploitcheat_setup

Feb 26th, 2016
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. # "Metasploit Arbitrary APK Injection" Here: https://pastebin.com/r2uDVpjH
  2. # SRC: http://www.pischool.com/metasploitcheat.php
  3.  
  4. # ------------ SCRIPT/ TUT ------------ #
  5. #Install Java Seperate (may give error)
  6.  
  7. apt-get update
  8. apt-get upgrade
  9.  
  10.  
  11. sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev
  12.  
  13. ### here is rbenv
  14.  
  15. cd ~
  16. git clone git://github.com/sstephenson/rbenv.git .rbenv
  17. echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  18. echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  19. exec $SHELL
  20.  
  21. git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
  22. echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
  23.  
  24.  
  25. # run command as user and sudo so plugin can run Metasploit as root too "rbenv sudo msfconsole"
  26. git clone git://github.com/dcarley/rbenv-sudo.git ~/.rbenv/plugins/rbenv-sudo
  27.  
  28.  
  29. exec $SHELL
  30.  
  31. rbenv install 2.1.6
  32. rbenv global 2.1.6
  33. ruby -v
  34.  
  35.  
  36. ##Install Nmap
  37.  
  38. apt-get install nmap
  39.  
  40.  
  41. ##Configure Postgres
  42.  
  43. sudo -s
  44. su postgres
  45.  
  46.  
  47. createuser msf -P -S -R -D
  48. createdb -O msf msf
  49. ## exit out of postgresql account
  50. exit
  51. ## exit out of root account back to user priv
  52. exit
  53. ### Install Framework (not root)
  54.  
  55. cd /opt
  56. sudo git clone https://github.com/rapid7/metasploit-framework.git
  57. sudo chown -R `whoami` /opt/metasploit-framework
  58. cd metasploit-framework
  59.  
  60.  
  61. ## Install gems
  62. gem install bundler bundle install
  63.  
  64. #### run it
  65.  
  66. ./msfconsole
  67.  
  68.  
  69.  
  70. ####################### # # Custom Payloads #######################
  71. download sdk only for linux here:
  72. http://developer.android.com/sdk/index.html#Other
  73. wget (latest-in-url-above).tgz
  74. cd Sdk/tools/
  75. ./android update sdk -u
  76. ## android update sdk --no-ui --obsolete --force (for dev payloads)
  77. cd ../..
  78.  
  79. download the ndk
  80. http://developer.android.com/ndk/downloads/index.html
  81. wget (latest-in-url-above).bin
  82.  
  83. chmod a+x (archive).bin
  84. ./(archive).bin
  85.  
  86. apt-get install maven2
  87. apt-get install openjdk-6-jre-headless
  88. apt-get install ia32-libs
  89.  
  90. ### IN Metasploit#
  91. set ExitOnSession false
  92. exploit -j
  93. # ------------ SCRIPT/ TUT ------------ #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement