Skip to content

Commit

Permalink
Merge branch 'unstable' into changeme
Browse files Browse the repository at this point in the history
  • Loading branch information
n1nj4sec authored Aug 25, 2017
2 parents 0fe9c95 + ab93833 commit 0879b6b
Show file tree
Hide file tree
Showing 717 changed files with 36,105 additions and 70,331 deletions.
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pupy stuff
pupy/data/
pupy/crypto/*.py
pupy/.pupy_history
pupy/pupy_*
.DS_Store
*.swp

Expand All @@ -27,8 +29,17 @@ client/sources/resources/library_compressed_string_x64.txt
client/sources/resources_msvcr90_dll.c
client/sources/resources/libraryx64.zip
client/sources/resources/libraryx86.zip
client/sources/buildenv/
client/sources/buildenv
client/sources/import-tab.c
client/sources/import-tab.h
client/sources/revision.h
client/sources-linux/buildenv
client/sources-linux/buildenv-sunos
client/sources/resources/library.zip
client/sources-linux/import-tab.c
client/sources-linux/import-tab.h
client/sources-linux/revision.h
client/sources-linux/resources/library.zip
client/android_sources/bin
client/android_sources/.buildozer

Expand All @@ -44,6 +55,9 @@ pupy/pupy.conf
!pupy/payload_templates/
!pupy/packages/**/*.dll

pupy/payload_templates/pupy*.*
pupy/payload_templates/*-*.zip

# C extensions
*.so

Expand Down Expand Up @@ -96,3 +110,6 @@ docs/_build/

# PyBuilder
target/

*.orig
*.patch
23 changes: 10 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
[submodule "pupy/packages/src/scapy"]
path = pupy/external/scapy
url = https://github.com/secdev/scapy
shallow = false
[submodule "pupy/payload_templates"]
path = pupy/payload_templates
url = ../pupy-binaries.git
shallow = false
[submodule "pupy/external/LaZagne"]
path = pupy/external/LaZagne
url = https://github.com/AlessandroZ/LaZagne
shallow = false
[submodule "pupy/external/impacket"]
path = pupy/external/impacket
url = https://github.com/CoreSecurity/impacket
shallow = false
[submodule "pupy/external/changeme"]
path = pupy/external/changeme
url = https://github.com/AlessandroZ/changeme
Expand All @@ -35,4 +23,13 @@
url = https://github.com/alxchk/winpty
[submodule "pupy/memorpy"]
path = pupy/external/memorpy
url = https://github.com/n1nj4sec/memorpy
url = https://github.com/alxchk/memorpy
[submodule "pupy/external/mimipy"]
path = pupy/external/mimipy
url = https://github.com/n1nj4sec/mimipy.git
[submodule "client/android_sources/python-for-android"]
path = client/android_sources/python-for-android
url = https://github.com/alxchk/python-for-android.git
[submodule "pupy/external/Inveigh"]
path = pupy/external/Inveigh
url = https://github.com/Kevin-Robertson/Inveigh.git
75 changes: 75 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
sudo: required
language: c
before_install:
- df -h
- sudo dpkg --add-architecture i386
- sudo apt-get update >/dev/null
install:
- sudo -E apt-get -y install mingw-w64 g++-mingw-w64-x86-64 g++-mingw-w64-i686 debootstrap cython
make wine xvfb python-pip >/dev/null
- pip install --user pylzma
- pip install --user git+https://github.com/kivy/buildozer
services:
- docker
os:
- linux
dist: trusty
before_script:
- cd $TRAVIS_BUILD_DIR/pupy && rm -f payload_templates/pupy*
- if [ -f $HOME/.cache/win.tgz ]; then tar -C $TRAVIS_BUILD_DIR/client/sources -zxf $HOME/.cache/win.tgz; fi
- if [ -f $HOME/.cache/lin.tgz ]; then sudo -E tar -C $TRAVIS_BUILD_DIR/client/sources-linux -zxf $HOME/.cache/lin.tgz; fi
- if [ -f $HOME/.cache/android.tgz ]; then tar -C $HOME -zxf $HOME/.cache/android.tgz; fi
- if [ -f $HOME/.cache/android-app.tgz ]; then tar -C $TRAVIS_BUILD_DIR/client/android_sources -zxf $HOME/.cache/android-app.tgz; fi
script:
- sh -e /etc/init.d/xvfb start || systemctl start xvfb
- sleep 3
- df -h
- ( cd $TRAVIS_BUILD_DIR/client/sources && ./buildenv.sh ) &
( cd $TRAVIS_BUILD_DIR/client/sources-linux && sudo -E ./buildenv.sh ) &
( cd $TRAVIS_BUILD_DIR/client/android_sources && ./build.sh &&
rm -f $HOME/.buildozer/android-sdk_* &&
rm -rf $HOME/.buildozer/android-ndk* ) &
wait
- df -h
- ( cd $TRAVIS_BUILD_DIR/client/sources && ./build.sh ) &
( cd $TRAVIS_BUILD_DIR/client/sources-linux && sudo -E ./build.sh ) & wait
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates
- df -h
before_cache:
- rm -rf $HOME/.cache && mkdir -p $HOME/.cache
- rm -rf $TRAVIS_BUILD_DIR/client/sources/buildenv/downloads
- sudo rm -rf $TRAVIS_BUILD_DIR/client/sources-linux/buildenv/downloads
- rm -rf $TRAVIS_BUILD_DIR/client/android_sources/.buildozer/android/app
- ( if [ ! -f $HOME/.cache/win.tgz ]; then tar --remove-files -C $TRAVIS_BUILD_DIR/client/sources -zcf $HOME/.cache/win.tgz buildenv; fi; rm -rf $TRAVIS_BUILD_DIR/client/sources/buildenv ) &
( if [ ! -f $HOME/.cache/lin.tgz ]; then sudo -E tar --remove-files -C $TRAVIS_BUILD_DIR/client/sources-linux -zcf $HOME/.cache/lin.tgz buildenv; fi; sudo rm -rf $TRAVIS_BUILD_DIR/client/sources-linux/buildenv ) &
( if [ ! -f $HOME/.cache/android-app.tgz ]; then tar --remove-files -C $TRAVIS_BUILD_DIR/client/android_sources -zcf $HOME/.cache/android-app.tgz .buildozer; fi; rm -rf $TRAVIS_BUILD_DIR/client/android_sources/.buildozer ) &
( if [ ! -f $HOME/.cache/android.tgz ]; then
tar --remove-files -C $HOME -zcf $HOME/.cache/android.tgz
.android
.buildozer/android/platform/android-sdk-20
.buildozer/android/platform/apache-ant-1.9.4;
fi; rm -rf $HOME/.buildozer ) & wait
- df -h
cache:
apt: true
directories:
- $HOME/.cache
after_cache:
- rm -f $HOME/.cache/win.tgz $HOME/.cache/lin.tgz $HOME/.cache/android.tgz
after_success:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- export REPO=alxchk/pupy
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH
; fi`
- cd $TRAVIS_BUILD_DIR/pupy && docker build -f Dockerfile -t $REPO:$COMMIT .
- cd $TRAVIS_BUILD_DIR/pupy && docker tag $REPO:$COMMIT $REPO:$TAG
- cd $TRAVIS_BUILD_DIR/pupy && docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- cd $TRAVIS_BUILD_DIR/pupy && docker push $REPO >/dev/null
env:
global:
- WINEDEBUG="-all"
- DISPLAY=":99.0"
- COMMIT=${TRAVIS_COMMIT::8}
- secure: gKv5C4ZTnnzOcQiGrbwEgJhE8SPJLCSIYsdDLpDIHk7OjNu+hGp+frygU25w2NlHyV7cReu7glvyphVwmrQ+FyBRtrKysk+HbU59QiVVOD6x8uyDEZ5qG0NeEOoD9ChdgSy2CSl39Pf8IIcCgZIcyNDukxZbGaUr4LpOSRu8E5H1YT9qxpsDHidQkkcYbZLNlVmhBNZ2LlFXZAu7LwSx111dMTPPVY+zRR1VmaXLuqn90p/L5Cn04xcJHMSc9fhIA3ty463KgDMuM4IXYQS1xCxyZwCpYGbHtuZYDvjmrVhQpEidj5ibcnb+ll+9XNr4JYi6ldVRDmv7J/1DOVd9Iw77LJ0SAGvTDGzTMHRz74Er82xa6zu5NkzW98oti6tCYM9QeAGp4QSJnO0WqgG87y3JW0Ponv3suMG60zPAeLYcuiyhmmOy/v3w0Xq1FHsyqSayN4koJDpUJ7DQQDbSv1Nc0MaG9XZaNVAMab0sWaqbgCMkteNN6w72lAVTck6b/NDV2taONOiNJFJIhiOpO4EZ8g4t7j/ZXpBnP9O+//APQ5WeREEcsbS32y2/R6YiHkKlnPDomfm1fJWZh3KUzRur3PbXvpJkc9D+68UYh02oYlodfi9zoDpCn5OymFPYYI9fibmbuZ1aBwlGPsYnYliAXtlEd/W3XMKT1pWdvbI=
- secure: HOQ7k4Sf9p3CyNy02lBMH5Ff2OeOXQWElLad9vFg0LTkxfnfkGeWP9K+fAR9Lp3nAAd5QRX/2MaJxJTomVHJSCGqjuqrqkBHBLCs7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QaUz7a/j6sohB2zpua05LNrxW8ZPDhMo0Kq+U+e/x6Qqgc35MnnfhJR8AvA2CRccaxptWBcfzFlJ1CHhLKhdwSA8zfa58vRDnGphwqYO+FF44Tmr1NwRMT3ytHB5GtTSlUjzy0Evmyf81hhI0S+5L2Oeuv1n0sQEf/qS9Tfppuc36gAQClRgmHFgmM5WkIOQy/lyRKDUkM7/JUsE50=
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
[![Build Status](https://travis-ci.org/n1nj4sec/pupy.svg?branch=master)](https://travis-ci.org/n1nj4sec/pupy)
# Pupy
Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android), multi function RAT (Remote Administration Tool) and post-exploitation tool mainly written in python. It features a all-in-memory execution guideline and leaves very low footprint. Pupy can communicate using various transports, migrate into processes (reflective injection), load remote python code, python packages and python C-extensions from memory.
Pupy modules can transparently access remote python objects using rpyc to perform various interactive tasks.
Pupy can generate payloads in multiple formats like PE executables, reflective DLLs, pure python files, powershell, apk, ...
When you package a payload, you can choose a launcher (connect, bind, ...), a transport (ssl, http, rsa, obfs3, scramblesuit, ...) and a number of "scriptlets". Scriptlets are python scripts meant to be embedded to perform various tasks offline (without requiring a session), like starting a background script, adding persistence, starting a keylogger, detecting a sandbox, ...

## Installation
```
git clone https://github.com/n1nj4sec/pupy.git pupy
cd pupy
git submodule init
git submodule update
pip install -r pupy/requirements.txt
```
or [Refer to the wiki](https://github.com/n1nj4sec/pupy/wiki/Installation)

## Features
- Multi-platform (tested on windows xp, 7, 8, 10, kali linux, ubuntu, osx, android)
- On windows, the Pupy payload can be compiled as a reflective DLL and the whole python interpreter is loaded from memory. Pupy does not touch the disk :)
Expand Down Expand Up @@ -103,9 +114,7 @@ Launchers allow pupy to run custom actions before starting the reverse connectio
- webcam snapshots (front cam & back cam)
- GPS tracker !

##Installation
[Refer to the wiki](https://github.com/n1nj4sec/pupy/wiki/Installation)
##Documentation
## Documentation
[Refer to the wiki](https://github.com/n1nj4sec/pupy/wiki)

### Some screenshots (not up to date)
Expand Down Expand Up @@ -150,6 +159,6 @@ on Twitter: [Follow me on twitter](https://twitter.com/n1nj4sec)
If some of you want to participate to pupy development, don't hesitate ! All help is greatly appreciated and I will review every pull request.
This project is a [personal development](https://en.wikipedia.org/wiki/Personal_development), please respect its philosophy and don't use it for evil purposes!

##special thanks
## Special thanks
Special thanks to all contributors that helps me improve pupy and make it an even better tool ! :)

11 changes: 2 additions & 9 deletions client/additional_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
import zlib
import code
import glob
import multiprocessing
import math
import binascii
import inspect
import shlex
import json
import ctypes
Expand All @@ -39,14 +37,9 @@
import urllib2
import getpass
import __future__
import bz2
#needed for scapy :
import new
import fractions
import netaddr
import psutil
if 'win' in sys.platform:
import ctypes.wintypes
else:
import pty
import dbus
import pydbus
import pyexpat
14 changes: 0 additions & 14 deletions client/android_sources/MyBroadcastReceiver.java

This file was deleted.

Loading

0 comments on commit 0879b6b

Please sign in to comment.