Tuesday, August 11, 2026
LIVEThe Unrelenting Cyber Battle: Hacking Threats and the Imperative of Robust Data Protection///Navigating the Cyber Labyrinth: Bolstering Defenses Against Evolving Hacking Threats///The Dual Front War: Battling Hacking and Bolstering Data Protection in the Digital Age///The Ever-Evolving Cyber Threat Landscape: Navigating Hacking and Fortifying Data Protection///The Unseen Battle: Fortifying Data in an Age of Relentless Hacking///The Unseen War: Hacking's Relentless Advance and the Imperative of Data Protection///The Evolving Threat Landscape: Hacking, Data Protection, and the Imperative for Proactive Security///Navigating the Digital Minefield: Bolstering Data Protection in an Era of Relentless Hacking///The Dual Fronts of Digital Defense: Combating Hacking and Fortifying Data Protection///Hacking's New Frontier: Fortifying Data Protection in the Age of Advanced Cyber Threats///The Dual Front: Navigating Hacking Threats and Fortifying Data Protection in the Digital Age///Navigating the Digital Gauntlet: The Evolving Nexus of Hacking and Data Protection///The Unrelenting Cyber Battle: Hacking Threats and the Imperative of Robust Data Protection///Navigating the Cyber Labyrinth: Bolstering Defenses Against Evolving Hacking Threats///The Dual Front War: Battling Hacking and Bolstering Data Protection in the Digital Age///The Ever-Evolving Cyber Threat Landscape: Navigating Hacking and Fortifying Data Protection///The Unseen Battle: Fortifying Data in an Age of Relentless Hacking///The Unseen War: Hacking's Relentless Advance and the Imperative of Data Protection///The Evolving Threat Landscape: Hacking, Data Protection, and the Imperative for Proactive Security///Navigating the Digital Minefield: Bolstering Data Protection in an Era of Relentless Hacking///The Dual Fronts of Digital Defense: Combating Hacking and Fortifying Data Protection///Hacking's New Frontier: Fortifying Data Protection in the Age of Advanced Cyber Threats///The Dual Front: Navigating Hacking Threats and Fortifying Data Protection in the Digital Age///Navigating the Digital Gauntlet: The Evolving Nexus of Hacking and Data Protection///
Subscribe
Cyber Security
Independent · Digital
Thehackingpost
CybersecurityAI-assisted

New Polymorphic Python Malware Repeatedly Mutate its Appearance at Every Execution Time

A newly identified Python-based remote access trojan (RAT), exhibiting significant polymorphic behavior, has been observed to alter its code signature with each execution.

A newly identified Python-based remote access trojan (RAT), exhibiting significant polymorphic behavior, has been observed to alter its code signature with each execution.

Initially detected on VirusTotal, the sample, named nirorat.py , achieved a detection score of just 26/100, despite possessing comprehensive RAT capabilities.

The malware appears to utilize Python’s introspection and code-modification features to bypass signature-based detection by continuously modifying key code sections.

Internet Storm Center analysts identified the threat by correlating function names such as selfmodifyingwrapper , decryptandexecute , and polymorphcode in the source code.

These functions facilitate the malware’s evasion tactics by extracting its own code from memory, applying randomized XOR-based packing, and injecting junk snippets prior to execution. This dynamic mutation ensures each execution is unique, complicating detection by static scanners.

The RAT is primarily distributed via phishing emails containing seemingly benign Python scripts, as well as through compromised network shares. During execution, it unpacks itself entirely in memory, avoiding disk artifacts.

This dynamic mutation ensures each execution is unique, complicating detection by static scanners.
Ben Emerson · Thehackingpost

Persistence is maintained by appending a copy of the mutated script to startup folders with randomized filenames. The low VirusTotal detection score indicates that traditional file-hash signatures are largely ineffective against this threat.

The RAT employs two primary mechanisms for detection evasion: self-modification and junk-code insertion.

At runtime, the selfmodifyingwrapper function retrieves a target routine’s source using Python’s inspect module, encodes it through XOR with a random key, and then reconstructs it in memory before execution.

This approach closely simulates a packer’s behavior without leaving a packed file footprint on disk.

Advertisement

def selfmodifyingwrapper(func): code = inspect.getsource(func).encode() key = random.randint(1,255) packed = bytes(b ^ key for b in code) unpacked = bytes(b ^ key for b in packed) codeobj = marshal.loads(zlib.decompress(unpacked)) exec(codeobj)

Additionally, the polymorphcode function injects random junk elements—such as unused functions, shuffled variable names, and no-op loops—into core routines.

By combining variable renaming and random snippet insertion, the malware generates a virtually unique source at each run, undermining both static signature and heuristic detection approaches.

Due to these advanced evasion strategies, defenders are advised to rely on behavioral analysis and real-time monitoring rather than traditional signature-based tools.

Based on reporting by Cyber Security News.

AI transparency. This article was produced with the assistance of artificial intelligence and published under human editorial oversight. AI systems can make mistakes. Read how we use AI (EU AI Act, Art. 50).
Related Stories