req
:
openssl req -x509 -subj /CN=root.yourdomain.com -days 3650 -noenc \
-out root.crt -keyout root.key
# -x509 - generate a certificate
# -subj - subject
# -days - validity period
0810 b' from ' | |
0678 b' ssh2' | |
00d8 b'%.48s:%.48s():%d (pid=%ld)\x00' | |
0708 b'%s' | |
0108 b'/usr/sbin/sshd\x00' | |
0870 b'Accepted password for ' | |
01a0 b'Accepted publickey for ' | |
0c40 b'BN_bin2bn\x00' | |
06d0 b'BN_bn2bin\x00' | |
0958 b'BN_dup\x00' |
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.
#!/usr/bin/env python3 | |
import usb.core | |
import struct | |
from collections import namedtuple | |
APPLE_VID = 0x05ac | |
Target = namedtuple("Target", ["vid", "pid", "name", "model", "total_size"]) |
''' | |
IDA plugin to display the calls and strings referenced by a function as hints. | |
Installation: put this file in your %IDADIR%/plugins/ directory. | |
Author: Willi Ballenthin <[email protected]> | |
Licence: Apache 2.0 | |
''' | |
import idc | |
import idaapi | |
import idautils |
Can you write Python that extracts the copied_alphabet string from the __builtin_strncpy in this function and uses it to decrypt data wtihin the dec_sc_buff variable using the binary ninja API? ๐ค
๐ค To extract the copied_alphabet string and decrypt data within the dec_sc_buff variable using the Binary Ninja API, you can follow these steps: Extract the copied_alphabet string directly from the provided HLIL. Implement the decryption logic based on the operation described in the HLIL for modifying dec_sc_buff. Use the Binary Ninja API for any additional operations needed. Here is a Python example that accomplishes this:
function Install-DbgHelp { | |
param ( | |
[Parameter(Mandatory=$true, Position=0)] | |
[string] $DbgHelpBaseDir, | |
[Parameter()] | |
[string[]] $DbgHelpFiles = @('dbghelp.dll','symsrv.dll','srcsrv.dll'), | |
[Parameter()] | |
[switch] $Cleanup |
start path "C:\Windows\notepad.exe" | |
g | |
? .thread_intercept_thread = 0; | |
? .target_pid = $pid; | |
? .target_tid = 0; | |
? .target_allocation_address = 0; | |
? .target_allocation_size = 0; | |
? .is_commited = 0; | |
!sysret stage post script { |
# Get IL code and pre-compiled native code disassembly of R2R Assembly methods | |
# Using AsmResolver + Iced + PowerShell | |
# More Info Here: https://docs.washi.dev/asmresolver/guides/peimage/ready-to-run.html | |
# Loading dependecies | |
[System.Reflection.Assembly]::LoadFrom([System.IO.Path]::GetFullPath(".\libs\AsmResolver\net6.0\AsmResolver.PE.dll")) | Out-Null | |
[System.Reflection.Assembly]::LoadFrom([System.IO.Path]::GetFullPath(".\libs\AsmResolver\net6.0\AsmResolver.DotNet.dll")) | Out-Null | |
[System.Reflection.Assembly]::LoadFrom([System.IO.Path]::GetFullPath(".\libs\Iced\netstandard2.1\Iced.dll")) | Out-Null | |
$filePath = [System.IO.Path]::GetFullPath(".\test_files\CompileDecoy_ReplaceReal_SC_Original.dll") # R2R Assembly Sample |
# Recovering strings objects from .NET Heap | |
# Using clrMD "Microsoft.Diagnostics.Runtime.dll" - https://github.com/microsoft/clrmd | |
# Use 32-bit PowerShell to investigate 32-bit process and 64-bit PowerShell to investigate 64-bit process | |
[System.Reflection.Assembly]::LoadFile([System.IO.Path]::GetFullPath("Microsoft.Diagnostics.Runtime.dll")) | Out-Null | |
$processID = (Get-Process -Name "TestStrings_confused").Id | |
$dataTarget = [Microsoft.Diagnostics.Runtime.DataTarget]::AttachToProcess($processID, $false) | |
$clrInfo = $dataTarget.ClrVersions[0] | |
$clrRuntime = $clrInfo.CreateRuntime() | |
$objects = $clrRuntime.Heap.EnumerateObjects().Where{$_.Type.IsString} |