Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 31 additions & 26 deletions Alcatraz-gui/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <d3d11.h>
#include <tchar.h>
#include <filesystem>
#include <thread>

std::string path = "";

Expand All @@ -23,10 +24,10 @@ bool obf_entry_point;
void gui::render_interface() {
ImGuiStyle& style = ImGui::GetStyle();
style.WindowPadding = ImVec2(0, 0);

ImGui::SetNextWindowSize(ImVec2(1280, 800));
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImGui::Begin("Alcaztaz",0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoScrollWithMouse);
ImGui::Begin("Alcaztaz", 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoScrollWithMouse);

if (ImGui::BeginMenuBar()) {

Expand All @@ -40,7 +41,7 @@ void gui::render_interface() {
ZeroMemory(&filename, sizeof(filename));
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = NULL;
ofn.hwndOwner = NULL;
ofn.lpstrFilter = "Executables\0*.exe\0Dynamic Link Libraries\0*.dll\0Drivers\0*.sys";
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
Expand All @@ -63,7 +64,7 @@ void gui::render_interface() {
}
selected_func = 0;
funcs_to_obfuscate.clear();

}

}
Expand All @@ -80,6 +81,17 @@ void gui::render_interface() {
ImGui::BeginChild("selectionpanel", ImVec2(100, 800), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
if (ImGui::Button("Protection", ImVec2(100, 100)))
panel = 0;
if (ImGui::Button("Build", ImVec2(100, 100))) {
try {
std::thread(&gui::OBFUSCATION_THREAD).detach();
}
catch (std::runtime_error e)
{
MessageBoxA(0, e.what(), "Exception", 0);
path = "";
//std::cout << "Runtime error: " << e.what() << std::endl;
}
}

ImGui::EndChild();

Expand All @@ -88,9 +100,9 @@ void gui::render_interface() {
ImGui::SetNextWindowPos(ImVec2(100, 25));

ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.24f, 0.24f, 0.24f, 0.94f));
if (ImGui::BeginChild("optionpanel", ImVec2(300, 775), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove )) {
if (ImGui::BeginChild("optionpanel", ImVec2(300, 775), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) {



ImGui::SetNextItemWidth(300);
ImGui::InputText("##treeAddFuncs", func_name, 1024);

Expand All @@ -112,7 +124,7 @@ void gui::render_interface() {
if (ImGui::Button(funcs.at(i).name.c_str()))
selected_func = funcs.at(i).id;
}

}

ImGui::TreePop();
Expand All @@ -123,7 +135,7 @@ void gui::render_interface() {
ImGui::TreePop();
}


if (ImGui::Button("Add all")) {

while (funcs.size() != 0) {
Expand All @@ -133,28 +145,16 @@ void gui::render_interface() {

}

if (ImGui::Button("Compile")) {
try {
inter::run_obfuscator(funcs_to_obfuscate, obf_entry_point);
MessageBoxA(0, "Compiled", "Success", 0);
}
catch (std::runtime_error e)
{
MessageBoxA(0, e.what(), "Exception", 0);
path = "";
//std::cout << "Runtime error: " << e.what() << std::endl;
}
}
}
ImGui::EndChild();


ImGui::SetNextWindowPos(ImVec2(400, 25));
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.48f, 0.48f, 0.48f, 0.94f));
ImGui::BeginChild("functionpanel", ImVec2(880,775), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
ImGui::BeginChild("functionpanel", ImVec2(880, 775), true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);




auto already_added = std::find_if(funcs_to_obfuscate.begin(), funcs_to_obfuscate.end(), [&](const pdbparser::sym_func infunc) { return infunc.id == selected_func; });
if (already_added != funcs_to_obfuscate.end()) {

Expand Down Expand Up @@ -190,7 +190,7 @@ void gui::render_interface() {
}
}
}

ImGui::SetCursorPosY(700);
ImGui::Text(path.c_str());

Expand All @@ -201,13 +201,18 @@ void gui::render_interface() {
ImGui::PopStyleColor();

}


ImGui::PopStyleColor();


}

ImGui::End();

}

void gui::OBFUSCATION_THREAD() {
inter::run_obfuscator(funcs_to_obfuscate, obf_entry_point);
MessageBoxA(0, "Compiled", "Success", 0);
}
3 changes: 3 additions & 0 deletions Alcatraz-gui/gui/gui.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#pragma once
#include <thread>

namespace gui {



void render_interface();
void OBFUSCATION_THREAD();

}
11 changes: 0 additions & 11 deletions Alcatraz-gui/x64/Release/Alcatraz-gui.exe.recipe

This file was deleted.

Binary file removed Alcatraz-gui/x64/Release/Alcatraz-gui.iobj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/Alcatraz-gui.ipdb
Binary file not shown.
84 changes: 0 additions & 84 deletions Alcatraz-gui/x64/Release/Alcatraz-gui.log

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file removed Alcatraz-gui/x64/Release/add.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/antidisassembly.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/cfflattener.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/custom_entry.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/gui.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/iat.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_demo.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_draw.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_impl_dx11.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_impl_win32.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_tables.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/imgui_widgets.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/interface.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/lea.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/main.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/mov.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/obfuscator.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/pdbparser.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/pe.obj
Binary file not shown.
Binary file removed Alcatraz-gui/x64/Release/vc143.pdb
Binary file not shown.
3 changes: 0 additions & 3 deletions Alcatraz-gui/x64/Release/vcpkg.applocal.log

This file was deleted.

2 changes: 1 addition & 1 deletion Alcatraz/obfuscator/obfuscator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "obfuscator.h"

#include <bit>
#include <iostream>

ZydisFormatter formatter;
Expand Down
11 changes: 0 additions & 11 deletions Alcatraz/x64/Release/Alcatraz-con.exe.recipe

This file was deleted.

Binary file removed Alcatraz/x64/Release/Alcatraz-con.iobj
Binary file not shown.
Binary file removed Alcatraz/x64/Release/Alcatraz-con.ipdb
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading