Advertisement
fahim420

Config Mac For Security testing (yosemite)

Jul 21st, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. Homebrew
  2.  
  3. Install homebrew by running the following command:
  4.  
  5. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  6.  
  7. Once Homebrew installs, run ‘brew doctor’ to finalize the installation of homebrew.
  8.  
  9. brew doctor
  10.  
  11. RUBY
  12. brew install rbenv ruby-build
  13.  
  14. # Add rbenv to bash so that it loads every time you open a terminal
  15. echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
  16. source ~/.bash_profile
  17.  
  18. # Install Ruby
  19. rbenv install 2.2.2
  20. rbenv global 2.2.2
  21. ruby -v
  22.  
  23. POSTGRESQL
  24.  
  25.  
  26. nstalling and configuring PostgreSQL
  27.  
  28. Now, time to install the backend database that Metasploit uses.
  29.  
  30. brew install postgresql --without-ossp-uuid
  31.  
  32. If the Homebrew install did NOT complete this for you, the next step is to initialize the database for first time usage.
  33.  
  34. initdb /usr/local/var/postgres
  35.  
  36. us
  37. As of 9.3.5_1 it looks like the homebrew installer wraps up by running this command for you.
  38.  
  39. Ensure that postgreSQL is set to launch on boot by issuing the following:
  40.  
  41. mkdir -p ~/Library/LaunchAgents
  42. cp /usr/local/Cellar/postgresql/9.4.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
  43.  
  44. Start the PostgreSQL service:
  45.  
  46. launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  47.  
  48.  
  49. Configuring VNCViewer
  50.  
  51. As Metasploit uses vncviewer for its VNC payloads, and OS X comes with a VNC client, we need to create the needed vncviewer file that will call the OS X vnc viewer.
  52.  
  53. echo '#!/usr/bin/env bash'>> /usr/local/bin/vncviewer
  54. echo open vnc://\$1 >> /usr/local/bin/vncviewer
  55. chmod +x /usr/local/bin/vncviewer
  56.  
  57. Installing the following gems needed for running the framework:
  58.  
  59. gem install pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundler
  60.  
  61. Install Armitage
  62.  
  63. Execute the following commands to prepare the environment and download armitage to the correct location:
  64.  
  65. brew install pidof
  66. curl -# -o /tmp/armitage.tgz http://www.fastandeasyhacking.com/download/armitage-latest.tgz
  67. tar -xvzf /tmp/armitage.tgz -C /usr/local/share
  68. bash -c "echo \'/usr/bin/java\' -jar /usr/local/share/armitage/armitage.jar \$\*" > /usr/local/share/armitage/armitage
  69. perl -pi -e 's/armitage.jar/\/usr\/local\/share\/armitage\/armitage.jar/g' /usr/local/share/armitage/teamserver
  70.  
  71. create sym links for Armitage:
  72.  
  73. ln -s /usr/local/share/armitage/armitage /usr/local/bin/armitage
  74. ln -s /usr/local/armitage/teamserver /usr/local/bin/teamserver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement