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

推荐订阅源

Y
Y Combinator Blog
宝玉的分享
宝玉的分享
月光博客
月光博客
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale

The Register - Security: CSO

Anthropic's Mythos has The Kettle crew curious, skeptical 'People's Panel' to check if UK wants controversial Digital ID will cost £630K Top npm package backdoored to drop dirty RAT on dev machines Lightning-fast exploits mean patch fast, says Cisco Talos Lightning-fast exploits mean patch fast, says Cisco Talos Smooth criminals talking their way into cloud environments, Google says Cybercrime up 245% since the start of the Iran war Scattered Lapsus$ Hunters seeks women to defraud helpdesks Every day in every way, passwords are getting worse CISA quietly updated ransomware flags on 59 flaws last year Deepfake job seeker applied to work for an AI security firm Deepfake job seeker applied to work for an AI security firm AI-powered cyberattack kits are 'just a matter of time' AI-powered cyberattack kits are 'just a matter of time' FortiGate SSO bug still exploitable despite December patch FortiGate SSO bug still exploitable despite December patch Judge tosses CrowdStrike shareholder suit over 2024 outage DRAM shortage may drive firewall prices higher: analysts Ransomware attacks kept climbing in 2025 as gangs refused to stay dead Around 1,000 systems compromised in ransomware attack on Romanian water agency 1,000 systems pwned in Romanian Waters ransomware attack Half of exposed React servers remain unpatched amid attacks CISA warns spyware crews are breaking into Signal and WhatsApp accounts FCC guts Salt Typhoon telco rules despite espionage risk CISA orders feds to patch Oracle Identity Manager zero-day SEC drops SolarWinds lawsuit that painted a target on CISOs everywhere SEC bails on SolarWinds lawsuit Palo Alto kit sees massive surge in malicious activity amid mystery traffic flood Palo Alto kit sees massive surge in malicious activity Countries use cyber targeting to plan strikes: Amazon CSO
Ghost in the shell script: Boffins seek code correctness
Thomas Claburn Thomas Claburn · 2025-04-30 · via The Register - Security: CSO

CSO

Ghost in the shell script: Boffins reckon they can catch bugs before programs run

Go ahead, please do Bash static analysis

Shell scripting may finally get a proper bug-checker. A group of academics has proposed static analysis techniques aimed at improving the correctness and reliability of Unix shell programs.

The team argues it's possible to analyze shell scripts ahead of execution, offering developers pre-runtime guarantees more typical of statically typed languages. Their research focuses on taming the brittle and unpredictable behavior of shell environments like Bash and Zsh — where a single poorly constructed rm -rf can potentially reduce a system to rubble.

Unix and Linux environments have long relied on shells like Bash and Zsh, which serve as command line interpreters for interacting with the system. Shell programming remains hugely popular – it was the eighth most popular programming language in 2024, according to GitHub.

"The Unix shell has been around for more than half a century at this point," Nikos Vasilakis, assistant professor of computer science at Brown University in the US, told The Register. "Because of certain characteristics that it has, it's unusual. It's a source of many, many serious bugs or problems, both in terms of supply chain security and in terms of correctness."

Vasilakis pointed to high profile shell-related bugs affecting Nvidia drivers, Apple iTunes, and the 2015 Steam shell scripting blunder that wiped files from Linux PCs.

But according to Vasilakis, shell programming doesn't get much attention from academics because of its unusual semantics.

"Most programming languages already have a principal design, so their syntax and semantics follow a very, very principled approach," he explained. "But the shell is actually one of the oldest environments out there. And it was designed at a time when people didn't design languages and environments in such a principled way, so it was a Wild West."

Shell scripts can therefore be difficult to debug, develop, and maintain. And yet they're everywhere.

"Shell programs are sort of the underlying infrastructure used for all sorts of continuous integration and continuous deployment," said Vasilakis. "And so everything, in some sense, runs on shell programs, but it's the kind of infrastructure that you do not easily see."

So Vasilakis and his academic colleagues – Lukas Lazarek, Seong-Heon Jung, Evangelos Lamprou, Zekai Li, Anirudh Narsipur, Eric Zhao, Michael Greenberg, Konstantinos Kallas, and Konstantinos Mamouras – have been developing ways to apply static analysis - a method for analyzing how code will perform without having to actually execute it - to evaluate shell scripts. Their idea is to make it possible to check a script for correctness before it gets the chance to nuke your files.

They describe their efforts in a forthcoming paper [PDF] titled "From Ahead-of- to Just-in-Time and Back Again: Static Analysis for Unix Shell Programs," which they will present at the HotOS XX conference in May. (The event’s 20th edition brings with it a Roman numeral that has nothing to do with the adult entertainment industry.)

The paper, which will eventually be formally available at this URL, argues that making shell scripts amenable to static analysis needs three things:

  • Breaking out and recognizing elements suitable for static guarantees
  • Using large language models to check shell command documentation against actual behavior
  • Deploying safety-aware runtime monitoring to catch serious bugs before they do damage.

"We're developing essentially a series of systems that alleviate these problems by checking the correctness of these computations before the execution of the program," said Vasilakis. "So basically within a second you can tell whether your program is going to crash or whether it's going to execute as expected."

Static analysis is currently not particularly well suited to shell scripts, the paper points out. Shell scripts are dynamic in nature, with runtime code evaluation and shell parameter expansion that can't easily be anticipated.

Vasilakis said that his colleagues and collaborators from other institutions have created compilers and analysis systems to help with the parallelizing and distribution of shell programs.

"And now we're building on these compilers and analysis systems to tackle a very different challenge, which is correctness," he explained. "Can we say something about the correct execution of these programs across environments? That is a new thing."

We're told the team's code so far for performing this analysis will be shared shortly.

"This is the third serious attempt on this problem, but the first successful one," said Vasilakis. "The first time we tried to solve this problem was in 2022 at MIT with a team of researchers from the Max Planck Institute in Germany. We failed. Then, I tried again with a larger team during my first year at Brown — with collaborators from several institutions in the US and Europe. We semi-failed: we found a way to bypass the narrow version of the problem, in some environments, and with some assumptions – but we did not solve it."

Assuming the authors' efforts pan out – this is the first in a series of papers under submission that attempt to address the shell scripting problem – shell scripting could become far more predictable. ®