YARA rule 'keylogger_indicators': Keylogger functionality in scripts or source code [malware]
- Category
- YARA Match
- Confidence
- 70% confidence
- Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
- Content
python (2) # PROCESS_PER_MONITOR_DPI_AWARE return "per-monitor" except Exception: pass try: ctypes.windll.user32.SetProcessDPIAware() return "system" except Exception: return "unaware" def cursor_pos(): p = POINT() ctypes.windll.user32.GetCursorPos(ctypes.byref(p)) return p.x, p.y def button_down(): return bool(ctypes.windll.user32.GetAsyncKeyState(VK_LBUTTON) & 0x8000) def esc_pressed(): if msvcrt is None: return False try: if msvcrt.kbhit(): return msvcrt.getch() in (b"\x1b",) except Exception: # no attached console (launched from a script/pipe) - ESC abort unavailable return False return False def wait_click(label, timeout=120.0): """Wait for a fresh left click, release, then return the cursor position.""" t0 = time.time() while button_down(): # wait until any stale press is released if time.time() - t0 > timeout: return N
