Alerts This Week
Warning Icon 1 626
Alerts This Week
Warning Icon 1 626

Stay Ahead With Linux Security Features

Filter Icon Refine features
X Clear Filters
X Clear Filters
View More

Get the latest News and Insights

Get the latest Linux and open source security news straight to your inbox.

Community Poll

What got you started with Linux?

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum {0} answer(s).
Please select maximum {0} answer(s).
/main-polls/150-what-got-you-started-with-linux?task=poll.vote&format=json
150
radio
0
[{"id":483,"title":"Self-taught through trial and error","votes":549,"type":"x","order":1,"pct":78.54,"resources":[]},{"id":484,"title":"Formal training or courses","votes":30,"type":"x","order":2,"pct":4.29,"resources":[]},{"id":485,"title":"A job that required it","votes":34,"type":"x","order":3,"pct":4.86,"resources":[]},{"id":486,"title":"Other","votes":86,"type":"x","order":4,"pct":12.3,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
Loading...

Explore Latest Linux Security features

We found 2 articles for you...
102

Beyond the Sandbox: Container Escape Techniques Observed in Recent Research

Containers were sold on the promise of container isolation. Think of them like clean, separate rooms in a house where nothing leaks from one room to another. Most teams still operate on this assumption, believing that what happens inside a container stays there. . However, recent research from feeds like Packet Storm shows that these boundaries aren't as solid as we think. Often, a container "breaks" quietly. It isn't a loud crash; it’s just a single process stepping an inch outside its lane. When that happens, the "room" is no longer private. The cracks aren’t hypothetical. By looking at real-world activity rather than polished lab demos, we can see that attackers aren't usually doing anything revolutionary. They are simply finding small mistakes and chaining them together to walk right through the front door. The Reality of Container Escapes A container escape is exactly what it sounds like: a program running inside a container finds a way to reach out and grab control of the "host" (the main computer or server running the container). Once an attacker reaches the host, the game changes completely. The host can see everything: Other containers running on the same system. Secret passwords and keys (credentials). Network paths to other parts of the company. In real incidents, this "escape to host" step is often what turns a small, contained problem into a massive data breach that spreads across an entire network. How the Breakout Actually Happens There isn't one "magic" trick to escape a container. Instead, attackers use a series of small weaknesses. 1. Exploiting Container Runtime Security The runtime is the engine that starts and manages containers. When container runtime security is weak or the engine has a flaw, the container can "leak." A famous example is the Leaky Vessels set of vulnerabilities. Here, attackers used a simple trick involving "symlinks" (shortcuts to files) to fool the system into letting them touch files on the main host instead ofstaying inside their container. 2. Exploiting the Shared Kernel Containers are lightweight because they don't have their own "brain" or kernel; they share the host’s kernel. Think of it like the plumbing in an apartment building. Each unit is separate, but they all use the same pipes. If a pipe bursts in the basement, every unit is affected. The experts at Google Project Zero have documented how a single bug in this shared kernel can turn container access into full host access almost instantly. The Crypto Exchange Pivot In a real-world Unit 42 attack , attackers escaped a container, stole workload identities, and used them to move across the cloud. The container wasn’t the target, it was the entry point. Why These Attacks Still Work It is tempting to blame high-tech zero-day vulnerabilities, but the truth is more boring. Most escapes happen because of cloud misconfigurations. Common mistakes include: Privileged Containers : Giving a container "super-user" powers it doesn't need. Lazy Patching : Waiting too long to update software because "uptime" is more important than security. Excessive Permissions : Giving a container access to files or networks it will never actually use. The MITRE ATT&CK Containers Matrix maps out these exact techniques, showing that attackers simply use the doors we leave unlocked. What to Watch For You won't always see a warning light when an escape happens. Instead, look for these "smoke signals": Abnormal Mount Activity : If a container suddenly tries to access deep system files like /proc or /etc, it’s likely trying to find a way out. Suspicious System Calls : These show up early if you’re looking in the right place. A simple app doesn’t usually reach deep into the kernel, so when it starts asking for odd capabilities, that’s where things start to feel off. Network Behavior Shifts : A container that normally sticks to a database suddenly reaching out to an external IP is the kind ofdrift that lines up with compromise more often than misconfiguration. If you want to see how this gets weaponized, Exploit-DB is still one of the places people check for working code—the same payloads attackers lift and adapt to turn zero-day vulnerabilities into real access. A Pragmatic Way Forward This isn’t a panic situation. It’s cleanup, mostly, and a bit of discipline that tends to slip in fast-moving environments. Running privileged containers or using root access still shows up more than it should. It makes everything easier right up until it doesn't, handing over more control than most teams realize they've exposed. Patching runtimes quickly sounds obvious, but it’s where delays stack up. Updates sit and known issues stay reachable longer than they should, which is exactly the gap attackers look for. Keeping things simple does more than it sounds. If a container doesn’t need outbound access, cutting it off removes an entire class of problems. Conclusion: The Walls Are Not Solid Container isolation works well, but it isn't perfect. Container escapes are a real part of the modern tech landscape, not just a rare theory. Staying safe doesn't mean buying more expensive tools. It means changing how you think. If you assume the walls might leak, you’ll build better floors. Stay informed by tracking new threats and never assume the boundary will hold forever. . Recent insights reveal that container isolation boundaries are vulnerable, exposing systems to threats and breaches.. Container Security, Runtime Vulnerabilities, Cloud Misconfiguration, Cybersecurity Practices, Data Protection Strategies. . MaK Ulac

Calendar 2 Apr 22, 2026 User Avatar MaK Ulac
102

Keylogging in Linux (Part 3): Kernel Techniques for the Keyboard Driver Path

Part 1 covered how Linux keylogging works in user space and why attackers lean on simple hooks or device access to capture keystrokes. Part 2 walked through the GUI layer, showing how the X Server exposes keyboard events long before applications see them. We closed with a promise to move from observing behavior to turning low-level input into usable detection signals.. This part stays inside the kernel. We look at interrupt handlers and notifier blocks because they’re the two points where every keypress passes through, even on modern Linux 6.x kernels with updated routing in the input stack. The original diagram still holds: physical keyboard, motherboard, CPU, kernel driver, then userland. That level of visibility matters on servers with local console or KVM access. It lets security teams tell normal typing from automated or synthetic input that hints at an implant, since the driver path exposes timing and sequence details that never appear in user space. How a Keyboard Driver Handles Input Inside the Linux Kernel A keyboard driver in Linux sits in the path between the hardware and the input subsystem, translating what the device sends into something the kernel can work with. Nothing fancy there, just the layer that makes raw keyboard signals usable higher up. Under that, you’ve got the interrupt side. During boot, the kernel fills the Interrupt Descriptor Table so the CPU knows which routine to run for each interrupt vector. The keyboard line is brought up early. When a key is pressed, the CPU checks the table, jumps into the right handler, and the input path starts from there. Linux 6.x keeps this flow mostly intact, even with changes in how input routing and console handling are wired now. The driver also feeds the notification system. Anything that registers a notifier_block gets a callback on each keyboard event, and the handler receives a keyboard_notifier_param with the fields we actually care about: vc : virtual console tied to the event down : press (1)or release (0) shift : active modifier bitmask ledstate : state of Num Lock, Caps Lock, Scroll Lock value : the decoded key value for the event The diagram we reference tracks that full path from the physical keyboard, through the motherboard and CPU, into the driver, and up into user processes. Seeing the path end to end helps when you’re trying to spot patterns that belong to real users versus something synthetic. Scancodes, Keycodes, and the Keyboard Driver Input Path Scancodes are what the hardware sends. Keycodes are what the kernel uses after translating those signals. Keysyms sit above that and describe what the key actually represents, which can turn into Unicode when the layout supports it. With PS/2 hardware, the driver reads everything through two I/O ports. Port 0x60 holds the scancode the moment the interrupt fires. Port 0x64 is the controller’s command port. The IRQ handler just pulls the byte from 0x60 and treats it as a press or release based on the PS/2 rules. Nothing special, just the raw path the older hardware still uses. The kernel then walks the usual chain: scancode from 0x60 translated to a keycode mapped to a keysym turned into Unicode when possible Along the way, you’ll see a few event types in the notifier system: KBD_KEYCODE for the early keycode events KBD_UNBOUND_KEYCODE when a keycode has no clean mapping KBD_UNICODE when the keysym resolves to a Unicode character KBD_KEYSYM for non-Unicode keysyms KBD_POST_KEYSYM after keysym handling, where the LED state can be inspected USB keyboards follow a different transport, but the kernel normalizes everything into keycodes and higher-level events, so the input path looks the same. It keeps the higher layers from caring whether the signal came from old PS/2 hardware or a modern HID device. Using Keyboard Notifiers in Linux Device Driver Development Keyboard notifiers give you a way to observe keyboard activity without writing your ownIRQ handler. The kernel handles the scancodes, keycode mapping, and modifier state first, then calls anything registered on the notifier chain. It’s useful when you want higher-level events and don’t need to deal with raw port I/O. You’d choose a notifier when the module only needs translated key data. It keeps the code simple because the driver has already done the parsing, and you’re only reacting to what the kernel considers a complete keyboard event. Example Callback static int keyboard_event_handler(struct notifier_block *nb, unsigned long action, void *data) { struct keyboard_notifier_param *param = data; if (!param-> down) return NOTIFY_OK; const char *key = keybuf[param-> value][param-> shift]; printk(KERN_INFO "key: %s\n", key); return NOTIFY_OK; } The keybuf array stores the printable form of each key. The kernel uses the keycode and current shift state to index into it, so letters, digits, punctuation, and special keys all resolve the same way you’d expect. The reference for that translation logic is the kbd_keycode() helper in drivers/tty/vt/keyboard.c . Registering the Notifier static struct notifier_block nb = { .notifier_call = keyboard_event_handler, }; static int __init kb_init(void) { return register_keyboard_notifier(&nb); } static void __exit kb_exit(void) { unregister_keyboard_notifier(&nb); } When Notifiers Make Sense: They deliver keycodes and characters instead of raw scancodes. They avoid IRQ-level complexity entirely. They provide clean access to the modifier and the LED state. The trade-off is losing the timing information you’d get at the interrupt level, but for most monitoring or detection tasks, notifiers are the more practical tool. Capturing Events Through a Keyboard Driver IRQ Handler Sometimes you want to see keyboard input as early as possible, before the driver translates anything.That means hooking the IRQ directly. It’s the point where the controller fires an interrupt, and the kernel hasn’t done any work yet, so you get the raw scancode exactly as the hardware sent it. The flow is simple enough if you lay it out first: Install your handler Read the scancode from port 0x60 when the interrupt fires Hand it off to deferred work so the IRQ path stays short A basic handler for PS/2 hardware ends up looking like this: static irqreturn_t kb_irq_handler(int irq, void *dev_id) { struct kb_state *st = dev_id; st-> scancode = inb(0x60); tasklet_schedule(&kb_tasklet); return IRQ_HANDLED; } The tasklet handles the actual processing, so the interrupt routine doesn’t stall: static void kb_tasklet_fn(unsigned long data) { struct kb_state *st = (struct kb_state *)data; unsigned char code = st-> scancode; /* translate or log the scancode here */ } DECLARE_TASKLET(kb_tasklet, kb_tasklet_fn, (unsigned long)&state); Bringing it online is just a call to request_irq() : static int __init kb_init(void) { int ret = request_irq(1, kb_irq_handler, IRQF_SHARED, "kb_irq", &state); if (ret) pr_err("keyboard IRQ request failed: %d\n", ret); return ret; } Cleanup mirrors the setup: static void __exit kb_exit(void) { tasklet_kill(&kb_tasklet); free_irq(1, &state); } Even though the example uses port 0x60 and a classic PS/2 path, the pattern holds on newer systems too. PS/2 just happens to be the easy example. USB keyboards come in through a different path, but the workflow doesn’t really change. Keep the IRQ handler tight, hand the rest to the tasklet, and look at the scancode there before the driver starts adding its own layers. Deferred Work and Tasklets in Linux Device Drivers A tasklet is just a deferred handler that runs outside the interrupt path. It gives you a place to do the slower work without holding up the IRQ, which is importantwhen you’re dealing with input events that fire quickly. In short, the IRQ handler grabs the scancode and nothing more, then schedules the tasklet. The tasklet reads that stored value, keeps whatever local state it needs, and handles the translation or logging. A basic logger looks like this: static void tasklet_logger(unsigned long data) { struct kb_state *st = (struct kb_state *)data; unsigned char code = st-> scancode; /* maintain shift state, map scancode to text, and log it */ } DECLARE_TASKLET(kb_tasklet, tasklet_logger, (unsigned long)&state); Cleanup is part of the pattern, too: static void __exit kb_exit(void) { tasklet_kill(&kb_tasklet); free_irq(1, &state); } Newer kernels often push developers toward workqueues or other deferred mechanisms, mostly because they’re easier to scale and better suited to threaded designs. Tasklets still serve as a clear example, though. They show the separation between fast interrupt handling and the slower processing that shouldn’t run in the IRQ context. Notifier Chains vs. Keyboard Driver Interrupt Handlers Both approaches work; they just sit at different layers of the input path and give you different kinds of visibility. Notifier chains You see events after the kernel has already decoded the scancode into a keycode or character. They line up cleanly with the console layer and the rest of the input stack, so the code stays simple. Timing is less precise because the hardware work has already happened by the time your callback runs. Good fit when you want readable events without touching low-level details. Interrupt handlers You see the raw scancode the moment the controller fires the interrupt. You have to manage the hardware-facing pieces yourself, including port reads and deferred work. Timing is exact, which can help surface odd patterns from synthetic or automated input. Higher risk if the handler isn’t tight, since a slow IRQ path can cause real instability. In practice, notifiers are easier for day-to-day monitoring or lightweight detection logic because you avoid the hardware churn. IRQ handlers make sense when you need the earliest possible signal or when timing patterns matter, but they come with more overhead and stricter rules about how the code behaves under load. Common Pitfalls in Linux Device Driver Development for Keyboard Input Low-level keyboard hooks fail in predictable ways, mostly because the path is timing-sensitive and hardware-specific. Heavy IRQ handlers: slowing the keyboard interrupt slows other subsystems too, since they’re sharing the same interrupt resources. Logging in IRQ context: printk or tracing calls here can freeze the system under real load. Assuming PS/2 everywhere: USB-only systems, laptops, and VMs route input through completely different stacks. Kernel drift: internal structures change between releases, and out-of-tree modules tied to those details tend to break. IRQ sharing mistakes: handlers that don’t verify device state can interfere with other devices on the line or miss their own events. USB HID differences: USB keyboards package input differently, and their timing profile doesn’t match PS/2, which matters if you’re comparing events across systems. Short, clear misses like these cause the bulk of issues when teams try to work this close to the input layer. Keyboard Driver Source Code Examples You get one keyboard driver module that uses the notifier chain, one that hooks the IRQ path with a tasklet, and a simple Makefile that builds both against the running kernel. These examples are trimmed for clarity here, and the full source files should be reviewed and expanded as needed before use. Notifier-based keyboard driver module /* notifier-based keyboard driver module * - US keymap table * - keyboard_notifier_param handling * - notifier_block registration * - module init/exit * Full implementation goes here. */ IRQ-based keyboard drivermodule /* IRQ-based keyboard driver module * - shared state with last scancode * - keyboard IRQ handler * - tasklet for deferred logging * - module init/exit with request_irq()/free_irq() * Full implementation goes here. */ Makefile for building the keyboard driver modules # Makefile for keyboard driver examples obj-m += keylogger_notifier.o obj-m += keylogger_irq.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) all: $(MAKE) -C $(KDIR) M=$(PWD) modules clean: $(MAKE) -C $(KDIR) M=$(PWD) clean FAQ: Keyboard Driver Behavior and Event Capture in Linux How does a keyboard driver turn hardware input into events the kernel can use? The controller sends a scancode when a key changes state. The keyboard driver reads that byte in the interrupt path, translates it into a keycode, and hands it to the input and console layers, which then expose it to user space. Where does the interrupt handler fit into the input path? It runs first. The handler pulls the scancode from the controller, marks it as a press or release, and defers any heavier work so the interrupt line stays clear. How do notifier chains observe keyboard activity? Notifier chains run after the driver has already interpreted the event. They receive keycodes, modifier state, and occasionally Unicode, which makes them easier to work with than raw scancodes. Are notifier chains stable across modern 6.x kernels? They’ve held up well. Internal details shift between releases, but the notifier interface and the way it hooks into console input remain consistent enough for out-of-tree modules to rely on with minor adjustments. Do notifier callbacks fire in graphical environments? Yes. They run beneath the graphical layer, so both virtual consoles and GUI stacks trigger the same notifier path as long as the system’s keyboard events pass through the standard input subsystem. Can raw scancode patterns be used for detection work? Sometimes. Automated input tends to produceuniform timing and clean, repeated patterns that don’t match normal typing. Looking at scancodes directly gives you that detail, but it also requires more care in the handler. Can key rhythm or timing anomalies signal synthetic input? They can. Human typing has natural variation, while implants or scripted input often produce tightly spaced or perfectly regular intervals. You see those differences more clearly at the IRQ level. When should I use a notifier instead of an IRQ handler? Use a notifier when you want interpreted events and don’t need timing precision. It’s safer, easier to maintain, and won’t interfere with the interrupt path. When does an IRQ handler make more sense? When you need the earliest possible view of the event, or you’re looking for patterns that appear only in raw scancode timing. It’s more work and carries more risk, but it gives you the most detail. Do USB keyboards change how these mechanisms work? The transport changes, but the kernel normalizes everything before you see it. USB HID delivers packets instead of PS/2 scancodes, yet the driver still emits keycodes and notifies handlers in the same way once the event reaches the input layer. . Explore methods to deploy keylogger strategies on Linux for enhanced protection and monitoring of keystroke activities.. Keylogging Techniques, Linux Kernel Events, Keyboard Event Logging, Security Best Practices. . MaK Ulac

Calendar 2 Nov 14, 2025 User Avatar MaK Ulac
102

Keylogging in Linux (Part 2): Advanced Techniques in the Linux GUI and X Server

Why Advanced Keylogging Techniques Depend on the Linux GUI Advanced keylogging leans on the Linux GUI because once a user signs into a graphical session, the input path stops being simple. The GUI decides which window receives focus, how toolkits interpret the keystrokes, and when events get redirected or buffered, so the attacker’s visibility changes. The hardware layer still shows the raw signal. It just doesn’t reflect how people actually work on a desktop, and that gap is exactly where more capable keyloggers operate. . Capturing device events is useful, but it only tells you what the keyboard produced , not what the system delivered to an application. That difference is why we’re stepping into the GUI stack. Desktop environments reshape input constantly, and those transformations create opportunities for interception that never appear at the device layer. Teams studying adversary behavior look at these layers because this is where real workflows live, and where visibility can quietly break. So we focus on how keystrokes move through the X server and the rest of the graphical stack. This stays within authorized research, the kind defenders use to understand how attackers abuse X11’s trusted client model or how Wayland tightens the rules as it becomes the default in Fedora, Ubuntu sessions, and GNOME. Some applications still run under XWayland and behave a bit differently, which adds one more wrinkle for anyone mapping these input paths. What Is the Linux GUI Stack? The Linux GUI works as a set of stacked components rather than one built-in interface from the OS. The kernel handles raw input at the bottom, the X server manages windows and display surfaces above it, and toolkits like GTK, Qt, and WxWidgets turn those low-level signals into the controls users interact with. Desktop environments pull those parts together into the workspace people expect. It’s a simple structure on paper, but the layers change how keystrokes move once the system is fully up. Keyboard eventsstart in the kernel’s input subsystem and reach the X server before anything else touches them. From there, Xlib hands events to applications, toolkits reshape them into widget actions, and the desktop environment overlays shortcuts and policies that can shift routing. That’s why GUI-level keylogging exposes behavior. Device-level capture won’t surface. The earlier walk-through of device-event keylogging in the Complete Guide to Keylogging in Linux: Part 1 sets that baseline, so the differences here land cleanly. +---------------+ +--------------+ | Display:2 | | WxWidget |-----+ +---------------+ | | +--------------+ | | | | +---------------+ | | +--------------+ | | Display:1 | | Qt |-----+ +---------------+ | | +--------------+ | | | | +---------------+ | | +--------------+ | | Display:0 | | GTK+ |-----+ +---------------+ | | +--------------+ | | | | update +-------------+--+ ---=---> +-----+--------+ send data | +------=--| X Server | | xlib |

Calendar 2 Nov 13, 2025 User Avatar MaK Ulac
102

Linux Rootkits: Detecting, Preventing, and Surviving an Attack

Let’s talk about a threat that’s smart, sneaky, and dangerous to your Linux systems: rootkits. If you’ve ever heard the term tossed around and wondered what a rootkit is and why it’s such a headache, you’re in the right place. These are not your usual malware nuisances —they’re tools that let attackers dig into a system, stay hidden for the long game, and potentially wreak havoc without leaving many breadcrumbs. For Linux admins and infosec pros, rootkits aren’t just pests; they’re an adversary that requires awareness, vigilance, and a specific approach to deal with. . Rootkits have been tools of choice for attackers because they allow stealthy access, often with elevated privileges, while hiding malicious activity. That’s bad enough, but detecting and cleaning them up can feel like walking through a minefield, especially if the attacker knows their craft. Whether you’re a sysadmin managing production servers or you simply want to level up your defenses, understanding what rootkits are, how they get in, and how to neutralize them is essential. What Is A Rootkit? So, what are rootkits? At its core, a rootkit is a set of software tools designed to give an attacker unauthorized access while remaining undetected. Usually, this involves privileged (or "root") access. Once installed, rootkits can do anything from stealing data to monitoring activity or even transforming a system into a "zombie" to carry out further attacks, like Distributed Denial of Service (DDoS) . Sound bad? It gets worse: attackers often use rootkits to conceal other malware, such as trojans or cryptominers. Rootkits don’t just appear out of thin air. They get in when an attacker finds a way to escalate privileges—maybe through a vulnerability, a misconfiguration, or even phishing to steal credentials. Once in, the rootkit installs itself deeply enough to outwit most traditional monitoring tools. Some rootkits even find their way onto systems through legitimate-looking software. Remember the SonyBMG rootkit debacle from 2005 ? It wasn’t about Linux, but it’s still relevant. Their DRM software secretly installed a rootkit on users’ PCs to enforce copy restrictions, which not only caused outrage but opened up gaping security holes that attackers could exploit. What Types of Linux Rootkits Exist? Rootkits aren’t one-size-fits-all. Different types are crafted to operate in different layers of a Linux system, each with its own level of complexity and threat. User-Mode Rootkits These are the simplest type and work at the application or user level. They might replace standard user applications like ls, ps , or netstat with malicious versions that lie about running processes or files. For example, you could run ps -aux and not see anything suspicious because the output is being tampered with. User-mode rootkits are relatively easier to detect since the kernel (hopefully) remains trustworthy in these scenarios. Kernel-Mode Rootkits Kernel-mode rootkits are a lot nastier. They operate at the kernel level, giving the attacker full control over the underlying foundation of the OS. These rootkits often come disguised as Linux Kernel Modules (LKMs), and once they’re loaded, they can mess with system calls, wipe out logs, or make themselves practically invisible. That makes detection challenging because, at this point, you can’t even fully trust the kernel’s output anymore. An example of this? A rootkit modifies the syscall table to redirect file operations or process listings, effectively cloaking itself and its activities. These are a major headache to detect, and removing one often feels like uninstalling your OS piece by piece. What Are Common Rootkit Techniques? Rootkits don’t just sit around once installed. They actively work to hide themselves and their payloads. Two of the most common strategies include: Hooking System Calls: A rootkit will hijack system calls like open , read , or write to manipulate outputs. For instance, if you check the /proc directory for running processes, the malicious rootkit simply omits its own. Tampering with Logs: Some rootkits will quietly delete or modify log entries to erase evidence of intrusions. Checked /var/log/auth.log and found nothing? That doesn’t mean no one was there—it may just mean the attacker erased their tracks. Think about that for a second. These tactics allow attackers to maintain near-total stealth. It’s like letting someone live in your house without ever noticing—messing with your thermostat, peeking into your files—and you have no clue they’re there. How Can I Detect Rootkits? Here’s the challenge: rootkits are specifically designed to avoid detection. Your regular security tooling, no matter how good, probably won’t catch a kernel-mode rootkit. Using tools like a rootkit scanner can help, but don’t rely on it completely. Tools such as chkrootkit or rkhunter can identify known rootkits, but that’s the key phrase: known rootkits. Sophisticated ones, including custom-written attackers, might fly under the radar. A solid detection approach includes: Booting from live media (USB, DVD, etc.) to a clean environment and inspecting your system’s integrity. Deploying tools like Lynis for effective security auditing. Using network packet sniffers, like Wireshark , to analyze your traffic. Suspicious outgoing connections could be a major giveaway. The sad truth: by the time a rootkit is detected, the system may already be compromised beyond repair. In many cases, the best option becomes a complete reinstall. How Can I Prevent Rootkit Infections? Preventing rootkits comes down to minimizing attack vectors. Keep your systems hardened, patched , and thoroughly investigated. Always follow these basics: Use SELinux or AppArmor to enforce security policies. Lockdown permissions: the principle of least privilege should apply everywhere. Regularly audit your systems with tools like rkhunter or chkrootkit. Consider deploying arootkit scanner regularly as part of your workflow. Segment networks to limit the damage of a compromised machine. And yeah, don’t trust just anyone with the key (i.e., credentials). You’d think this is obvious, but weak password policies—or worse, unpatched vulnerabilities—continue to be a playground for attackers. Is Trojan Virus Removal Enough? Some admins think clearing out an infection—like a Trojan virus—restores their system to normal. Here’s the hard truth: if the Trojan came bundled with a rootkit, Trojan virus removal simply won’t cut it. Rootkits are, by design, stealth operators, and removing the obvious infection doesn’t necessarily pull the hidden strings. Reinstall from trusted media when you’re in doubt. Better to go scorched earth than gamble on a compromised system. Our Final Thoughts on Combating Linux Rootkits Rootkits are scary, yes, but they’re not undefeatable. Understanding what rootkits are and how they work is half the battle—the other half is keeping a disciplined approach to monitoring and patching your systems, and sticking to best practices in securing your Linux environment. They’re not new, but what’s old isn’t always easy to see. As Linux admins and infosec pros, it’s on us to stay proactive. Take the time to set up a rootkit scanner, leverage network monitoring, and instill a culture of layered security. After all, nothing is worse than realizing an attacker has been lurking in your systems for weeks—or even months. Stay sharp. Stay protected. Stay rootkit-free. . Rootkits have been tools of choice for attackers because they allow stealthy access, often with elev. let’s, about, threat, that’s, smart, sneaky, dangerous, linux, systems, rootkits. . Brittany Day

Calendar 2 Sep 01, 2025 User Avatar Brittany Day
102

Exploring Nmap Techniques for Better Network Protection

Cybercriminals implement scanning into their attacks to find network machines with open ports that they can utilize to bypass security and harm businesses and employees. Before launching an attack, threat actors run cloud security scanners like Linux Nmap that can sweep servers and find cybersecurity vulnerabilities to exploit. Once they identify a target, an intruder can use TCP stack fingerprinting to determine the type of machine they are breaching. . Organizations must work with the same tools that threat actors implement so employees can see what network security issues permit cybercriminals into a system. This article will discuss Nmap, how to utilize it in various privacy sandboxes, and how to prevent cloud security breaches from entering your server so you can improve your security posture. What is Nmap? Nmap is a free-to-download service under the GNU General Public License (GPL) that can analyze collected data regarding hosts and services within a network. We will focus on how to work with Nmap on the command line as we move forward. Let’s start with a few basic explanations and steps that can help with your understanding of this cloud security framework: Within the "nmap" command line, scans have an -s flag specifying their type. Select one of the scanner options and what host or network you want to target. You can scan one host or an entire network with the correct configurations. Providing a network address with "/mask" appended to it can help you learn more about your targets. Once you understand how Nmap functions, you can run root commands and custom packets that prove effective in your analysis. Specify networks with wildcards such as 192.168.7.*, 192.168.7.0/24, or 192.168.7.1,4,8-12 to scan selected hosts on a subnet. What Techniques Can I Use on Nmap to Find Cybersecurity Vulnerabilities on My Server? You must learn the various methods you can implement for testing your server so you can integrate security patching as best as possible tokeep your organization and employees secure. Here are some configurations you can utilize to strengthen data and network security: Ping Sweeping Intruders can sweep entire networks looking for targets with Nmap. This is usually done with a ping scan using the "-sP" flag. By default, Nmap will send an ICMP echo and a TCP ACK to each host it scans. Nmap will consider hosts that respond to either to be up. In this example, scan all hosts on the 192.168.7.0 network: # nmap -sP 192.168.7.0/24 Starting nmap V. 2.12 by Fyodor ( This email address is being protected from spambots. You need JavaScript enabled to view it. , https://nmap.org/) Host (192.168.7.11) appears to be up. Host (192.168.7.12) appears to be up. Host (192.168.7.76) appears to be up. Nmap run completed -- 256 IP addresses (3 hosts up) scanned in 1 second Sometimes, you may want to check a system's availability without sending ICMP echo requests, which some sites may block. In this case, a TCP "ping" sweep can be used to scan a target's network. A TCP "ping" will send an ACK to each machine on a target network. Machines that are up should respond with a TCP RST. To use the TCP "ping" option with a ping scan, include the "-PT " flag to target a specific port on the network you're probing. In our example, we'll use port 80 (HTTP), which is the default, and it will probably be allowed through the target's border routers and possibly even its firewall. Note that the targeted port does not need to be open on the hosts being probed to determine if the machine is up or not. Launch this type of scan as follows: # nmap -sP -PT80 192.168.7.0/24 TCP probe port is 80 Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Host (192.168.7.11) appears to be up. Host (192.168.7.12) appears to be up. Host (192.168.7.76) appears to be up. Nmap run completed -- 256 IP addresses (3 hosts up) scanned in 1 second When a potential intruder knows which machines on the target's network are alive, the next step is port scanning. Nmap provides different types of port scans: TCPconnect, TCP SYN, Stealth FIN, Xmas Tree, and Null, as well as UDP scans. Port Scanning An attacker using TCP connect scans to probe is easily detected. Nmap will use the connect() system call to open connections to interesting ports on the target host and complete the 3-way TCP handshake. Logs on the host machine will show these ports being opened by the attacker. A TCP connect scan is used with the "-sT" flag as: # nmap -sT 192.168.7.12 Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Interesting ports on (192.168.7.12): Port State Protocol Service 7 open tcp echo 9 open tcp discard 13 open tcp daytime 19 open tcp chargen 21 open tcp ftp ... Nmap run completed -- 1 IP address (1 host up) scanned in 3 seconds Stealth Scanning What if an attacker wants to scan a host without leaving his calling card in the system logs on the target machine? TCP SYN scans are less prone to logging on the target's machine because a full handshake never completes. A SYN scan starts by sending a SYN packet, the first packet in TCP negotiation. Any open ports will respond with a SYN|ACK, as they should. However, the attacker sends a RST instead of an ACK, which terminates the connection. The advantage is that the 3-way handshake never completes, and fewer sites will log this probe type. Closed ports will respond to the initial SYN with an RST, allowing Nmap to determine that the host isn't listening on that port. The "-sS" flag will launch a SYN scan against a host or network as: # nmap -sS 192.168.7.7 Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Interesting ports on saturnlink.nac.net (192.168.7.7): Port State Protocol Service 21 open tcp ftp 25 open tcp smtp 53 open tcp domain 80 open tcp http ... Nmap run completed -- 1 IP address (1 host up) scanned in 1 second Although SYN scans are more likely to be unnoticed, they can still be detected by some intrusion detection countermeasures. The Stealth FIN, Xmas Tree, and Null scans are used to evade packet filters and firewalls that may be watching for SYN packets directed toward restricted ports. These three scans should return an RST for closed ports, whereas open ports should drop the packet. A FIN "-sF" scan will send a FIN packet to each port, whereas the Xmas Tree scan "-sX" turns on the FIN, URG, and PUSH flags, and a Null Scan "-sN" turns off all flags. Because of Microsoft's compliance with TCP standards, the FIN, Xmas Tree, and Null scans are only effective on non-Microsoft operating systems. UDP Scanning If an attacker is looking for popular UDP holes to exploit, such as a rpcbind hole or cDc Back Orifice. He/she will want to know what UDP ports are listening, and to find these ports will most likely initiate a UDP scan. Using the UDP scan "-sU," an attacker can determine what ports are open to UDP on a host. Nmap will send a 0-byte UDP packet to each port. If the host returns a "port unreachable" message, that port is considered closed. This method can be time-consuming because most UNIX hosts limit the rate of ICMP errors. Fortunately, Nmap detects this rate and slows itself down so as not to overflow the target with messages that would have been ignored. Launch a UDP scan as follows: # nmap -sU 192.168.7.7 WARNING: -sU is now UDP scan -- for TCP FIN scan use -sF Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Interesting ports on saturnlink.nac.net (192.168.7.7): Port State Protocol Service 53 open udp domain 111 open udp sunrpc 123 open udp ntp 137 open udp netbios-ns 138 open udp netbios-dgm 177 open udp xdmcp 1024 open udp unknown Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds OS Fingerprinting Often, an intruder may be more familiar with exploits for a particular operating system and may be looking for machines he can compromise easily. A common option is TCP/IP fingerprinting with the "-O" option to determine the remote operating system. This must be combined with a port scan, not a ping scan. Nmap accomplishes this by sending different probes to the host, which will narrow the target operating system. Fingerprinting the TCP stack includes such techniques as FIN probing to see what kind of response the target has, BOGUS flag probing to see the remote host's reaction to undefined flags sent with a SYN packet, TCP Initial Sequence Number (ISN) sampling to find patterns of ISN numbers, as well as other methods of determining the remote operating system. Nmap's Operating System detection feature is a very accurate and effective tool, as demonstrated by fingerprinting the stack of this Solaris 2.7 machine with a SYN scan: # nmap -sS -O 192.168.7.12 Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Interesting ports on comet (192.168.7.12): Port State Protocol Service 7 open tcp echo 9 open tcp discard 13 open tcp daytime 19 open tcp chargen 21 open tcp ftp ... TCP Sequence Prediction: Class=random positive increments Difficulty=17818 (Worthy challenge) Remote operating system guess: Solaris 2.6 - 2.7 Nmap run completed -- 1 IP address (1 host up) scanned in 5 seconds Do you notice the TCP Sequence Prediction? When given the -O option, Nmap also tells us how difficult it is to predict the remote host's TCP sequence number. This information is valuable to an attacker looking for hosts that canbe vulnerable to session hijacking. Ident Scanning An attacker often may look for a machine in which he/she has a specific exploit for a process, such as a web server running as root. If the target is running identd, an attacker using Nmap can find out what user owns the HTTP daemon by including the "-I" option to a TCP connect scan. We'll demonstrate by scanning a Linux web server: # nmap -sT -p 80 -I -O http://ww84.yourserver.com/ Starting nmap V. 2.12 by Fyodor (This email address is being protected from spambots. You need JavaScript enabled to view it., https://nmap.org/) Interesting ports on http://ww84.yourserver.com/ (xxx.xxx.xxx.xxx): Port State Protocol Service Owner 80 open tcp http root TCP Sequence Prediction: Class=random positive increments Difficulty=1140492 (Good luck!) Remote operating system guess: Linux 2.1.122 - 2.1.132; 2.2.0-pre1 - 2.2.2 Nmap run completed -- 1 IP address (1 host up) scanned in 1 second If your webserver is misconfigured and running as root, as this one is, it will probably be a late night at the data center. While it is bad security practice to run Apache as root, you can block incoming ident requests by commenting out "auth" in /etc/inetd.conf and restarting inetd. Another method of stopping ident requests is implementing firewall rules at your network border with ipchains or your favorite firewall. This will prevent the curious hooligan from probing your site to determine what user owns what daemons. What Are My Other Options as an Nmap User? In addition to these scans, Nmap offers a myriad of options. One of which, "-PT ," we've already covered. This option uses a ping scan to direct a TCP "ping" sweep at commonly unfiltered ports on a target machine or network. An option that is useful with scans is "-P0". Since Nmap will ping a target with TCP "ping" and ICMP echo before attempting a port scan, sites blocking ICMP and TCP probes will not be scanned by default. The "-P0" option to a scan will allow One option you should getinto the habit of using is "-v," a verbose option that can be used with all types of scans. You can use this flag once or twice to get more information about the target's machine. The ability to target specific ports is accomplished with the "-p " option. For instance, if an attacker wanted to probe your webserver for FTP (port 21), telnet (port 23), name service (port 53), and HTTP (port 80) and wanted to know the OS you were using, he/she may try the SYN scan: # nmap -sS -p 21,23,53,80 -O -v http://ww84.yourserver.com/ Factor in a database of popular exploits, and even a novice cracker could be well on his way to getting root access to your machine. Final Thoughts on Scanning and Defending Networks with Nmap Various network security toolkits exist that can help counter attacks in network security. However, these toolkits cannot serve as a substitute for having a knowledgeable administrator actively overseeing everything on a server. Network security websites must prioritize monitoring results from cloud security scanners to ensure that no cybercriminals are planning an attack. Using Nmap to learn more about your sites, systems, and administration can help you discover cybersecurity vulnerabilities that could permit potential intruders the opportunity to probe your machines and prepare to instigate attacks in network security. Therefore, you must set up Nmap on your Linux server to stay safe and secure. . Employing Nmap allows companies to improve safety standards by identifying weaknesses and reinforcing their security measures.. Nmap Techniques, Network Security Scans, Cybersecurity Tools. . Anthony Pell

Calendar 2 Nov 27, 2023 User Avatar Anthony Pell
102

A Master's Guide to Kernel Hardening with GrSecurity and RBAC

Our resident Master's student Gian Spicuzza chimes in this month with a great feature HowTo on Kernel Hardening! There are a number of ways to lock down a system, and RBAC (role based access control) is one of them. Read on to learn more about what makes RBAC so useful, and to read one of the best overviews on Low/Medium/High Security... The combination of the Linux kernel and GNU packages has always been regarded as a secure operating system, but can it be more secure? Kernel hardening is the answer to tightening up the Linux backbone. GrSecurity, a kernel patch for Linux, is one of the more popular approaches... One of the most significant feature is the addition of a role-based access control system (RBAC) that monitors what each user can execute based on their role and denies execution if they overstep their pre-defined rules. . A Quick and Dirty Guide To Kernel Hardening with GrSecurity By: Gian G. Spicuzza ; The combination of the Linux kernel and GNU packages has always been regarded as a secure operating system, but can it be more secure? Kernel hardening is the answer to tightening up the Linux backbone. GrSecurity, a kernel patch for Linux, is one of the more popular approaches. After applying this patch and compiling a fresh kernel, your system will have a plethora of new security features. The most significant feature is the addition of a role-based access control system (RBAC) that monitors what each user can execute based on their role and denies execution if they overstep their pre-defined rules. Other useful features include ip-based rules, extensive chroot restrictions, address space modification restrictions (PaX), auditing/logging features and /proc and dmesg anti-leak features. A full feature list can be found at the Grsecurity homepage. Installing Grsecurity: First we need to download the Linux kernel and Grsec patch. $ wget $ wget For your convenience, the PGP keys are located at: https://grsecurity.net/spender-gpg-key.asc .sign Move the kernel and patch into the /usr/src directory. $ su -c The link for this article located at is no longer available. . Delve into robust strategies for kernel hardening through GrSecurity to elevate system defenses and implement role-centric access management.. Kernel Hardening, GrSecurity, Role Based Access Control, Security Techniques, System Security. . Brittany Day

Calendar 2 Dec 20, 2007 User Avatar Brittany Day
102

Enhancing Security With Behavioral Intrusion Prevention Techniques

Scott Wimer, CTO Cylant Software, discusses methods for improving the security of a computer system in spite of their vulnerabilities in order to break out of the current security cycle. . The software you depend on contains security vulnerabilities. Not all of these vulnerabilities have been found yet. Some are known only to "black hat" hackers, a trump card they can play against your organization if and when they choose to. This is not alarmism. It is an honest and rational statement of the current security risk born by organizations with networked computer systems. The software running on your systems was written by people. People make mistakes. People are more prone to make mistakes when performing complicated and difficult tasks. Unfortunately, designing and writing secure software is a difficult and tedious process. As a result, the software you use contains flaws causing security vulnerabilities. Since you do not have the option of running software without vulnerabilities, the challenge is to mitigate the risks the vulnerabilities can cause. Cyclic Security Process Managing the risk created by vulnerable software is currently a cyclic process. Consequently, security is a continual cost center. Furthermore, if the process stops or breaks down, earlier gains in risk reduction are effectively lost, since an attacker only needs to find one way in. The heart of the cycle is the sequence of events below: Vulnerability, "V-19" is discovered in program "e-serve" versions 1.2 - 1.5. V-19 is publicly announced. You audit your systems for vulnerable versions of e-serve. You increase the monitoring of the systems running a vulnerable e-serve. Exploit, "r00t-19", for V-19 is released. An IDS signature to spot r00t-19 is released. You update your IDS's rule-set with the r00t-19 signature. You develop an action plan for recovery from r00t-19 attacks. Thee-serve vendor releases version 1.6, which fixes the V-19 vulnerability. But, may introduce other vulnerabilities. You upgrade e-serve on a test system to make sure that version 1.6 works properly in your environment. You deploy e-serve 1.6 on all production systems. You update your IDS rule-sets to reduce the priority of r00t-19 attacks, since they can not succeed now. Perhaps the worst aspect of the security cycle above is that you do not, and can not, control the start of the cycle. Instead, some arbitrary individual makes a discovery that kicks off the cascade of risk, cost, and work in the security cycle. Running a close second for the worst aspect of the security cycle is that even when you follow best practices, your systems are unavoidably open to attacks for large blocks of time. This is a game you can not win. There has to be a better approach. Today, vulnerability discovery dictates the risk associated with connecting systems to the Internet. The attackers constantly have the upper hand, is it any wonder that they usually win? Vulnerability Mitigation The existence of security vulnerabilities in software is an unavoidable fact. Methods for securing systems in spite of their vulnerabilities are needed in order to break out of the current security cycle. Breaking out of the security cycle requires changing the impact of software vulnerabilities. Once the impact of vulnerabilities is mitigated, effort can be directed at forward progress, instead of responding to vulnerabilities just to maintain status quo. Behavioral Intrusion Prevention A few simple observations about software form the framework of a security approach that mitigates vulnerabilities rather than responding to them. Software executes in quantifiable patterns. Software execution variation is measurable. The source of the variation can be isolated. Targeted countermeasures can be deployedagainst the source. When an attacker exploits a vulnerability in an application, they cause the application to begin executing in a different way. In fact, the PURPOSE of the exploit is to change the application's execution. If we can spot the change in execution behavior soon enough, we should be able to stop the vulnerability from being used to compromise the system. This is the rationale behind the behavioral approach to intrusion prevention. Attacks can be stopped before they inflict damage, without needing specific rules to spot each attack or attack type. Successful behavioral intrusion prevention requires meeting three challenges. First, execution observation must be able to spot changes in the execution caused by exploiting any vulnerability. Second, this observation must be made soon enough to take corrective measures before the system is compromised. Third, policies governing the responses need to be established. Security is a process, and with behavioral intrusion prevention, it is a process under your control. When your business practices change, the usage patterns of your software unsuprisingly change accordingly. New software (and upgrades of existing software) creates new execution behavior. With behavioral intrusion prevention these events require you to revisit and potentially update your policies and countermeasures. Instead of uncontrollable outside events setting off a cycle of work and risk, business decisons require the creation or modification of policies. Modifying the policies and countermeasures becomes just another step in the process of deploying software or changing business practices. Behavioral intrusion prevention stops attacks before they succeed, rather than reporting their success. If for some reason you want attacks to succeed, behavioral intrusion prevention lets you do this as well; apply passive countermeasures. In most cases though, your business is better off stopping attacks than letting themcontinue. Conclusion Signature and rule-based intrusion detection systems are not sufficient to prevent attacks from succeeding. Current IDS techniques can not deal with the inescapable fact that software contains security vulnerabilities. Behavioral intrusion prevention can help by observing and stopping attacks as soon as a vulnerability exploitation occurs. By stopping attacks this soon, the risk associated with software vulnerabilities can be mitigated. About Cylant Cylant, a division of Software Systems International, develops technologies and systems for measuring the execution behavior of running software. Cylant provides tools to observe the behavior of running software and measure that behavior against a stored behavioral baseline. . Enhance system defenses against software threats by implementing adaptive defensive strategies systematically.. Behavioral Intrusion Prevention, Software Risk Management, Security Techniques. . Brittany Day

Calendar 2 Jan 20, 2002 User Avatar Brittany Day
News Add Esm H240

Get the latest News and Insights

Get the latest Linux and open source security news straight to your inbox.

Community Poll

What got you started with Linux?

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum {0} answer(s).
Please select maximum {0} answer(s).
/main-polls/150-what-got-you-started-with-linux?task=poll.vote&format=json
150
radio
0
[{"id":483,"title":"Self-taught through trial and error","votes":549,"type":"x","order":1,"pct":78.54,"resources":[]},{"id":484,"title":"Formal training or courses","votes":30,"type":"x","order":2,"pct":4.29,"resources":[]},{"id":485,"title":"A job that required it","votes":34,"type":"x","order":3,"pct":4.86,"resources":[]},{"id":486,"title":"Other","votes":86,"type":"x","order":4,"pct":12.3,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
Your message here