Skip to content

Commit

Permalink
Merge pull request #36 from bblenard/issue-35-ps-crashes-powershell-b…
Browse files Browse the repository at this point in the history
…eacon

Issue 35 ps crashes powershell beacon
  • Loading branch information
bats3c authored Sep 16, 2020
2 parents 254829a + d4487c6 commit 510a734
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
3 changes: 3 additions & 0 deletions beacon/injectable/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

#include "settings.h"

// include stdlib function prototypes
#include "../lib/stdlib/stdlib.h"

// core functions
BOOL GetBasicUserInfo(struct BasicUserInfo *UserInfo)
{
Expand Down
8 changes: 0 additions & 8 deletions beacon/injectable/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ LPCWSTR* BeaconCallbackC2(LPCSTR CallbackAddress, INT CallbackPort, LPCSTR UserA
LPVOID DieCleanly();
LPVOID CheckIfDie(LPCWSTR *ReadBuffer);

char* listdirs(LPCSTR szDir);
char* readfile(char* szFile);
char* makedirectory(char* szDirName);
char* removefile(char* szFileName);
char* getdir();
char* changedir(char* Dir);
char* getpid();

LPVOID ReportExecutionFail();

char* decrypt_string(char* string, int key);
Expand Down
11 changes: 11 additions & 0 deletions beacon/lib/stdlib/stdlib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <windows.h>

char* changedir(char* Dir);
char* getdir();
char* getpid();
char* getps();
char* listdirs(char* Dir);
char* makedirectory(char* szDirName);
char* readfile(char* szFile);
char* removefile(char* szFileName);
char* whoami(BOOL DisplayAll, char* oBuffer);
3 changes: 3 additions & 0 deletions beacon/reflection/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

#include "settings.h"

// Include stdlib function prototypes
#include "../lib/stdlib/stdlib.h"

// core functions
BOOL GetBasicUserInfo(struct BasicUserInfo *UserInfo)
{
Expand Down
8 changes: 0 additions & 8 deletions beacon/reflection/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ LPCWSTR* BeaconCallbackC2(LPCSTR CallbackAddress, INT CallbackPort, LPCSTR UserA
LPVOID DieCleanly();
LPVOID CheckIfDie(LPCWSTR *ReadBuffer);

char* listdirs(LPCSTR szDir);
char* readfile(char* szFile);
char* makedirectory(char* szDirName);
char* removefile(char* szFileName);
char* getdir();
char* changedir(char* Dir);
char* getpid();

LPVOID ReportExecutionFail();

char* decrypt_string(char* string, int key);
Expand Down
3 changes: 3 additions & 0 deletions beacon/src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

#include "settings.h"

// Include stdlib function prototypes
#include "../lib/stdlib/stdlib.h"

// core functions
BOOL GetBasicUserInfo(struct BasicUserInfo *UserInfo)
{
Expand Down
7 changes: 0 additions & 7 deletions beacon/src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ LPCWSTR* BeaconCallbackC2(LPCSTR CallbackAddress, INT CallbackPort, LPCSTR UserA
LPVOID DieCleanly();
LPVOID CheckIfDie(LPCWSTR *ReadBuffer);

char* listdirs(LPCSTR szDir);
char* readfile(char* szFile);
char* makedirectory(char* szDirName);
char* removefile(char* szFileName);
char* getdir();
char* changedir(char* Dir);

LPVOID ReportExecutionFail();

char* decrypt_string(char* string, int key);
Expand Down

0 comments on commit 510a734

Please sign in to comment.