-
Notifications
You must be signed in to change notification settings - Fork 5
/
CRunShell64Dlg.h
82 lines (71 loc) · 2.68 KB
/
CRunShell64Dlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
// +---------+----------------------------------------------------------------+
// | AUTHOR | NADER SHALLABI |
// +---------+----------------------------------------------------------------+
// | CONTACT | [email protected] |
// +--------------------------------------------------------------------------+
// | This sample code is free for use, redistribution and /or |
// | modification without any explicit permission from the author. |
// | |
// | This sample code is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY, implied or explicit. |
// +--------------------------------------------------------------------------+
//
// CRunShell64Dlg.h : header file
//
#pragma once
// Pointer to function type (point to Shellcode)
typedef void(*JUMPTOCODE)(void);
// CCRunShell64Dlg dialog
class CCRunShell64Dlg : public CDialogEx
{
// Construction
public:
CCRunShell64Dlg(CWnd* pParent = nullptr); // standard constructor
protected:
// If true, Shellcode is loaded in memory
bool m_bLoadedShellCode;
// If true, Shellcode file was set
bool m_bSetShellcodeFile;
// Shellcode buffer
LPVOID m_lpBuffer;
// Pointer to Shellcode
JUMPTOCODE m_lpFunc;
void LogAction(CString strAction);
void LoadAdditionalFiles();
void Run64Shellcode(CString strFilename, bool bDebug);
void Run64ShellcodeWithBP(CString strFilename, bool bDebug);
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_CRUNSHELL64_DIALOG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
BOOL m_bEnableDebugging;
BOOL m_bInsertBreakpoint;
BOOL m_bCloseShellcodeFile;
CString m_strLog;
CString m_strOffset;
CEdit m_EditShellcodeFile;
CButton m_CheckBoxEnableAdditionalFiles;
CListBox m_ListBoxAdditionalFiles;
CButton m_ButtonAddFile;
afx_msg void OnBnClickedCheckAddFileHandles();
afx_msg void OnBnClickedButtonAbout();
afx_msg void OnBnClickedButtonAddFile();
afx_msg void OnBnClickedButtonLoadShellcode();
afx_msg void OnBnClickedButtonRun();
afx_msg void OnBnClickedCheckEnableDebugging();
CStatic m_LabelWarning;
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};