Daemonize Process (Zig)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Any, Dict
from kittysploit import *
class Module(Prestage):
PRESTAGE_ID = "daemonize"
__info__ = {
"name": "Daemonize Process (Zig)",
"description": "Detach from the controlling terminal on Unix (double-fork)",
"author": "KittySploit Team",
"version": "1.0.0",
"platform": Platform.UNIX,
"languages": ["zig"],
"dependencies": [],
"tags": ["evasion", "prestage", "offline", "linux", "zig"],
}
def generate_zig(self, context: Dict[str, Any] = None) -> str:
return """
if (builtin.os.tag != .linux) return;
const posix = std.posix;
if (posix.fork() > 0) process.exit(0);
_ = posix.setsid();
if (posix.fork() > 0) process.exit(0);
posix.chdir("/") catch {};
const devnull = std.fs.cwd().openFile("/dev/null", .{ .mode = .read_write }) catch return;
defer devnull.close();
posix.dup2(devnull.handle, posix.STDIN_FILENO) catch {};
posix.dup2(devnull.handle, posix.STDOUT_FILENO) catch {};
posix.dup2(devnull.handle, posix.STDERR_FILENO) catch {};
""".strip()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
19 Aug 2026 05:37Current
5.9Medium risk
Vulners AI Score5.9