Dreams are renewable. No matter what our age or condition, there are still untapped possibilities within us and new beauty waiting to be born.

-Dale Turner-

terça-feira, 30 de abril de 2013

CouchDB - For Fun and Profit

Depois de anos luz, vamos tentar retomar a escrita de posts aqui no blog. =D

Escrevi um post sobre o CouchDB no blog da Conviso, onde apresento um pouco de suas características e como explorá-lo para reunir informações importantes daquele servidor. Para automatizar, desenvolvi 2 scripts para o metasploit.

Mais detalhes do post, veja em:

http://blog.conviso.com.br/2013/04/couchdb-for-fun-and-profit.html

[]'s

@espreto




domingo, 27 de novembro de 2011

[Shell-Script] Install Metasploit in Ubuntu for Beginner

Devido receber vários e-mails perguntando como se instala (e quando digo vários, é vários meeeesmo :S) o metasploit no ubuntu, resolvi fazer rapidamente este script para tal fim.
É eu sei que o código tem bugs, mais ao que se propõe ele cumpre. :D
Testado nas versões 11.04 e 11.10.

#!/bin/bash

clear
echo
echo
echo "         ..:[ Install MSF ]:.."
echo
echo "        Roberto Soares (espreto)"
echo "        robertoespreto@gmail.com"
echo
echo
echo "[+] Install the Metasploit Framework on Ubuntu Linux now? y/n "; read whx
   if [ $whx = "y" ]
   then
      echo
      echo "[+] Installing the Ruby dependencies..."
      apt-get install -y ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems 1> /dev/null 2> /dev/stdout
      echo "OK!"
      echo "[+] Installing the Subversion client..."
      apt-get install -y subversion 1> /dev/null 2> /dev/stdout
      echo "OK!"
      echo "[+] Installing extensions (pcaprub, lorcon2, etc)..."
      apt-get install -y build-essential ruby-dev libpcap-dev 1> /dev/null 2> /dev/stdout
      echo "OK!"
      echo "[+] Download framework..."
      echo
      wget -c http://downloads.metasploit.com/data/releases/framework-latest.tar.bz2
      echo "[+] Unpacking the file..."
      tar -jxvf framework-latest.tar.bz2 1> /dev/null 2> /dev/stdout
      mkdir -p /opt/metasploit
      cp -a msf/ /opt/metasploit/msf3
      chown root:root -R /opt/metasploit/msf3
      ln -sf /opt/metasploit/msf3/msf* /usr/local/bin/
      rm -rf msf/
      echo "OK!"
      echo
      echo "   CONGRATULATIONS! Install Metasploit Successful!!!"
   else
      echo     
      echo "Why?"
      echo "  You do not know what you're missing!"
      echo
      exit 0;
   fi
echo

echo "[+] Update now? y/n "; read whx
   if [ $whx = "y" ]
   then
      echo "   Wait..."
      msfupdate 1> /dev/null 2> /dev/stdout
      echo "   OK!"
   else
      echo "     Future use in the terminal: msfupdate"
   fi
echo
echo "[+] Install PostgreSQL Database now? y/n "; read whx
   if [ $whx = "y" ]
   then
      echo "   Wait..."
      apt-get install -y postgresql-8.4 rubygems libpq-dev 1> /dev/null 2> /dev/stdout
      gem install pg 1> /dev/null 2> /dev/stdout
      apt-get install -y libreadline-dev libssl-dev libpq5 ruby-dev 1> /dev/null 2> /dev/stdout
      echo "   OK!"
      echo
      echo "1º Choice a username (user for connect in database):" ; read username
      sudo -u postgres createuser -D -A -P $username
      echo "   Done!"
      echo
      echo "2º Choice a database name (that will be used by msf):" ; read db_name
      sudo -u postgres createdb -O $username $db_name
      echo "   Done!"
      echo
      echo "        Connect to the postgreSQL database in msfconsole using:"
      echo "             msf> db_driver postgresql"
      echo "             msf> db_connect $username:password@127.0.0.1/$db_name"
      echo "             msf> db_status"
      echo
      sleep 8
   fi
clear
echo
echo "     Installation Complete!"
echo "  In terminal, run: msfconsole"
echo
echo
echo "         Good bye!"
echo
# end script


:wq!