任意代码保护 - 防止非图像支持的执行代码和代码页修改(例如VirtualAlloc / VirtualProtect创建/修改的代码) 阻止低完整性图像 阻止远程图像 阻止不受信任的字体 代码完整性守护者 禁用Win32k系统调用 不允许子进程 导出地址过滤 - 将功能修补到另一个功能的一个常见方法中的一个步骤 导入地址过滤 - 将功能修补到另一个功能的一个常见方法中的一个步骤 模拟执行 验证API调用(CallerCheck) 验证图像依赖完整性 验证堆栈完整性
xperf - “PROC_THREAD + LOADER”-f“wdeg_klogger.etl” xperf -start“WDEG” - “Microsoft-Windows-Security-Mitigations:0xFFFFFFFFFFFFFF:0xFF:'stack'”-f“wdeg_unmerged.etl”
xperf -stop -stop“WDEG”-d“wdeg_merged.etl”
#include #include using namespace std;void* CreateCodeInVirtualMemory(BOOL writable)
{ BYTE code[3] = { 0x33, 0xc0, 0xc3 }; LPVOID result = VirtualAlloc(NULL, sizeof(code), MEM_COMMIT | MEM_RESERVE, writable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE); if (result)
{
memcpy(result, code, sizeof(code));
} else cout << "VirtualAllocEx failed with error " << GetLastError() << endl; return result;
}void CreateCodeInVirtualMemoryAndExecute(BOOL useWritableMemory)
{ LPTHREAD_START_ROUTINE addr = (LPTHREAD_START_ROUTINE)CreateCodeInVirtualMemory(useWritableMemory); if (addr)
{ DWORD result = addr(NULL);
cout << "Code at 0x" << hex << (void*)addr << " returned " << result << endl;
} else cout << "NULL address was not executed" << endl;
}void ExecuteIllegalMemory()
{
CreateCodeInVirtualMemoryAndExecute(FALSE);
}
void PrintOptions()
{
cout << "Enter one of the following options:" << endl;
cout << "1 - Execute Memory Not Marked As Executable" << endl;
cout << "2 - Create Code in Virtual Memory" << endl;
cout << "3 - Create Code in Virtual Memory and Execute" << endl;
cout << "0 - Exit" << endl;
}void DecisionLoop()
{ while (true)
{ int selection;
PrintOptions();
cin >> selection; switch (selection)
{ case 0: return; case 1:
ExecuteIllegalMemory(); break; case 2:
CreateCodeInVirtualMemory(TRUE); break; case 3:
CreateCodeInVirtualMemoryAndExecute(TRUE); break; default:
cout << "Invalid input" << endl;
}
}
}int main()
{
DecisionLoop(); return 0;
}
Private Sub Form_Load() EDOffice1.OpenFileDialog'EDOffice1.OpenWord “d:\ test.xlsx” 'EDOffice1.Open“d:\ test.xls”,“Excel.Application” End Sub |
Private Sub EDOffice_DocumentOpened() EDOffice1.ProtectDoc 1'XlProtectTypeNormal End Sub |
bool ExcelAddWorkSheet(long Index); bool ExcelDeleteWorkSheet(long Index); bool ExcelActivateWorkSheet(long Index); 长ExcelGetWorkSheetCount(); bool ExcelSetCellValue(long Column,long Row,BSTR Value); BSTR ExcelGetCellValue(长列,长行); bool ExcelSetRowHeight(long Row,double Height); bool ExcelSetColumnWidth(long Column,double Width); afx_msg bool ExcelDeleteRow(long Row); bool ExcelDeleteColumn(long Column); bool ExcelInsertRow(long Row); bool ExcelInsertColumn(long Column); bool ExcelInsertPageBreakInRow(long Row); bool ExcelInsertPageBreakInColumn(long Column); bool ExcelCopyToClipboard(); bool ExcelPasteStringToWorksheet(BSTR bstText); |
Private Sub Command1_Click() Dim oXL As Excel.Application Set oXL = EDOffice1.GetApplication() Dim oWB As Excel.Workbook Set oWB = EDOffice1.ActiveDocument() Dim oSheet As Excel.Worksheet Dim oRng As Excel.Range Set oSheet = oWB.ActiveSheet oSheet.Cells(1, 1).Value = "First Name" oSheet.Cells(1, 2).Value = "Last Name" oSheet.Cells(1, 3).Value = "Full Name" oSheet.Cells(1, 4).Value = "Salary" ' Format A1:D1 as bold, vertical alignment = center. With oSheet.Range("A1", "D1") .Font.Bold = True .VerticalAlignment = xlVAlignCenter End With ' Create an array to set multiple values at once. Dim saNames(5, 2) As String saNames(0, 0) = "John" saNames(0, 1) = "Smith" saNames(1, 0) = "Tom" saNames(1, 1) = "Brown" saNames(2, 0) = "Sue" saNames(2, 1) = "Thomas" saNames(3, 0) = "Jane" saNames(3, 1) = "Jones" saNames(4, 0) = "Adam" saNames(4, 1) = "Johnson" ' Fill A2:B6 with an array of values (First and Last Names). oSheet.Range("A2", "B6").Value = saNames ' Fill C2:C6 with a relative formula (=A2 & " " & B2). Set oRng = oSheet.Range("C2", "C6") oRng.Formula = "=A2 & "" "" & B2" ' Fill D2:D6 with a formula(=RAND()*100000) and apply format. Set oRng = oSheet.Range("D2", "D6") oRng.Formula = "=RAND()*100000" oRng.NumberFormat = "$0.00" ' AutoFit columns A:D. Set oRng = oSheet.Range("A1", "D1") oRng.EntireColumn.AutoFit oXL.UserControl = True End Sub |
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!