Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Amadey-Loader-Multi-Stage-Malware-with-Keylogging-Clipboard-Hijack-Privilege-Escalation-Analysis — Reverse engineering Amadey Loader with x64dbg: dynamic API resolution, token privilege escalation, keylogger hooks, clipboard capture, and command-line abuse for stealer staging. | Kitploit
Tools/GitHubGitHub/kaandemir993/amadey-loader-multi-stage-malware-with-keylogging-clipboard-hijack-privilege-escalation-analysis
Dynamic Analysis (Sandboxing)Reverse EngineeringDebuggersInformation GatheringMalware AnalysisBinary AnalysisPapers & ResearchLearning & Education

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
GitHub
kaandemir993/amadey-loader-multi-stage-malware-with-keylogging-clipboard-hijack-privilege-escalation-analysis

Amadey-Loader-Multi-Stage-Malware-with-Keylogging-Clipboard-Hijack-Privilege-Escalation-Analysis

Reverse engineering Amadey Loader with x64dbg: dynamic API resolution, token privilege escalation, keylogger hooks, clipboard capture, and command-line abuse for stealer staging.

View Repository
11212 days agoNot yet reviewed
Share

1. x64dbg – API Resolution & Resolved Keylogger Strings

The Amadey Loader sample was loaded into x64dbg. At the entry point, the loader performs dynamic API resolution through jmp thunks pointing to GetProcAddressForCaller and VirtualAlloc. The dump view below reveals decrypted strings and API names used by the loader's keylogger and persistence routines.

Key Observations:

jmp qword ptr ds:[] – dynamic API lookup, avoids static imports. jmp qword ptr ds:[] – allocates RWX memory for unpacked payload / shellcode. SetWindowsHookExW / CallNextHookEx / UnhookWindowsHookEx – keylogger hook chain (WH_KEYBOARD_LL) GetForegroundWindow / GetWindowTextW / GetWindowThreadProcessId – captures the active window title with each keystroke. GetKeyState / GetAsyncKeyState – raw key state polling. GetUserObjectInformationW / wndProc /UnregisterClassW – window class handling for the hidden keylogger window. GetTickCount / timeGetTime / GetSystemTimeAsFileTime – timing routines used for beacon intervals and keystroke buffering.

Why This Matters:

Dynamic API Resolution: GetProcAddressForCaller bypasses static import analysis, defeating signature-based detection. Keylogger Confirmation: The SetWindowsHookExW + CallNextHookEx chain is the classic low-level keyboard hook used to intercept every keystroke system-wide. Context-Aware Logging: GetForegroundWindow + GetWindowTextW capture the active window title, giving context to each keystroke (usernames, passwords, chats). RWX Allocation: VirtualAlloc is used to unpack and execute the next-stage payload in memory, leaving no on-disk artifact. Amadey Behavior Match: This API set is consistent with Amadey's known credential-stealing and keylogging behavior.

Visual Reference:

Amadey x64dbg api resolution

2. x64dbg – Privilege Escalation & Token Manipulation APIs

A closer look at the same x64dbg session reveals that the Amadey Loader resolves a second batch of Windows APIs focused on privilege escalation, token manipulation, and process enumeration. The VirtualAlloc thunk at the top of the disassembly is used to allocate memory for the resolved API table, while the dump view below exposes the loader's intent to escalate to SYSTEM-level access before executing its payload.

Key Observations:

OpenProcessToken / DuplicateTokenEx / ImpersonateLoggedOnUser – token duplication and impersonation for privilege escalation. LookupPrivilegeValueW / AdjustTokenPrivileges – enables SeDebugPrivilege and other sensitive privileges. GetTokenInformation / SetTokenInformation – reads and modifies the current process token. OpenProcess / Process32FirstW / Process32NextW – process enumeration to locate high-value targets (e.g., lsass.exe, AV processes). CreateFileW / CreateToolhelp32Snapshot / Module32FirstW – used for file operations and module enumeration. RegCreateKeyExW / RegSetValueExW / Persistence: RegCreateKeyExW + RegSetValueExW under Run keys allow Amadey to auto-start after reboot. GetProcAddress / LoadLibraryW / GetModuleHandleW – dynamic API resolution. CreateProcessW / ShellExecuteExW / WinExec – launches next-stage payloads. IsDebuggerPresent / CheckRemoteDebuggerPresent – anti-debugging checks.

Why This Matters:

Token Impersonation: DuplicateTokenEx + ImpersonateLoggedOnUser allow Amadey to run with higher privileges (often SYSTEM), giving full control over the system. SeDebugPrivilege Abuse: LookupPrivilegeValueW + AdjustTokenPrivileges enable SeDebugPrivilege, which is required to inject into protected processes like lsass.exe. Process Targeting: Process32FirstW / Process32NextW are used to enumerate and pick high-value targets (AV, browsers, credential stores). Anti-Debugging: IsDebuggerPresent + CheckRemoteDebuggerPresent actively detect analysis environments and terminate or alter behavior. Chain Execution: CreateProcessW / ShellExecuteExW confirm Amadey's role as a loader — it drops and executes the next-stage payload (e.g., Lumma Stealer, Vidar, or ransomware).

Visual Reference:

Amadey x64 privilege_escalation

3. x64dbg – File Operations, Timer Cleanup & Keylogger-Aware Payload

A third view of the same x64dbg session shows the Amadey Loader resolving APIs for file I/O, timer management, and input/keyboard handling. Together with the dump strings, this points to a payload that behaves like a keylogger/stealer hybrid — capturing input, writing logs, and cleaning up timers to reduce its footprint.

Key Observations:

jmp qword ptr ds:[] – writes captured data / dropped payload to disk. jmp qword ptr ds:[] – asynchronous file write (used for stealthy log flushing). jmp qword ptr ds:[] – scattered write operation (used for fragmented payload drops). jmp qword ptr ds:[] – removes timer queues to erase timing-based traces. SetSystemTime / SetLocalTime – potential timestamp manipulation. SetWindowsHookEx / CallNextHookEx / UnhookWindowsHookEx – keyboard hook chain. GetForegroundWindow / GetWindowTextW / GetClassNameW – captures the active window context. GetSystemInfo / EnumWindows / EnumChildWindows – environment enumeration.

Why This Matters:

Keylogger Confirmation (Strengthened): The combination of SetWindowsHookEx, CallNextHookEx, ToUnicodeEx, and GetForegroundWindow is a textbook keylogger implementation that logs both keystrokes and the window they were typed in. Stealer Behavior: WriteFile + WriteFileEx + WriteFileGather indicate captured data (keystrokes, credentials) is written to disk in fragmented, asynchronous chunks to avoid detection. Anti-Forensic Cleanup: DeleteTimerQueue and SetSystemTime help the loader erase its own timing artifacts and potentially modify file timestamps. Synthetic Input: SendInput + RegisterHotKey suggest the payload can also inject keystrokes — useful for persistence or triggering actions remotely. Amadey Payload Pattern: This API set confirms the loader is preparing to deploy a keylogger/stealer payload (commonly Vidar, Lumma, or similar).

Visual Reference:

Amadey x64dbg fileio keylogger

4.x64dbg – CommandLineToArgvW Abuse & OS/AV Bypass Strings

The fourth x64dbg view shows the Amadey Loader actively using CommandLineToArgvW inside kernelbase.dll to parse and manipulate command-line arguments at runtime. This is a strong indicator that the loader spawns child processes with crafted arguments (e.g., rundll32, regsvr32, PowerShell). The dump below also reveals strings related to AV/EDR bypass and OS version targeting (os.name, os.version, bypass, bypassUac, pitou).

Key Observations:

Download Tool