Zum Hauptinhalt springen
LIVE
CVSS 5.3CVE-2026-136725 | A vulnerability was identified in slowlyo owl-admin up to 4.7.7. Affected by this issue is the function fillModelFromData of the file src/Services/AdminService.php. The manipulation of the argument id/remember_token/enabled leads to dynamically-determined object attributes. Remote exploitation of the attack is possible. The exploit is publicly available and might be used. Upgrading to version 4.7.8 can resolve this issue. The identifier of the patch is 9b0c9CVSS 5.3CVE-2026-136724 | A vulnerability was detected in slowlyo owl-admin up to 4.7.7. The impacted element is the function update of the file src/Services/AdminUserService.php of the component Admin User Management. The manipulation results in missing authorization. It is possible to launch the attack remotely. The exploit is now public and may be used. Upgrading to version 4.7.8 is sufficient to resolve this issue. The patch is identified as 70910338c1e136d5bdd6ed795768e7a81445f4CVSS 6.5CVE-2026-133463 | SeaweedFS is a distributed storage system for files and blobs. Prior to version 4.46, the S3 gateway does not evaluate bucket policies on POST Object uploads, which are multipart/form-data POST requests to the bucket. An authenticated S3 identity that a bucket policy restricts, such as to a key prefix or by source IP, can create or overwrite objects it is denied by sending the upload as a POST instead of a PUT. This issue has been fixed in version 4.46.CVSS 7.5CVE-2026-62154 | During IMPORT FOREIGN SCHEMA, mysql_fdw copies column metadata returned by the remote MySQL server into the CREATE FOREIGN TABLE statements it runs locally without quoting it. The COLUMN_DEFAULT value is placed directly in the DEFAULT clause, and the name of the generated ENUM type is inserted unquoted. A malicious or compromised MySQL server, or an attacker who can tamper with the connection, can return crafted information_schema metadata and run arbitrary SCVSS 8.8CVE-2026-136834 | Sandbox protection in Jenkins Pipeline: Groovy Plugin 4403.v471713a_cea_19 and earlier can be circumvented through interface field initializers, allowing attackers with permission to define and run sandboxed Pipelines to bypass the sandbox protection and execute arbitrary code in the context of the Jenkins controller JVM.CVSS 8.8CVE-2026-136837 | Jenkins Warnings Plugin 13.10251.va_452d3553728 through 13.10365.v85cd7a_c8110b_ (both inclusive) allows defining inline Groovy parsers whose Groovy scripts are compiled on the Jenkins controller without sandbox protection, allowing attackers able to define inline Groovy parsers to execute arbitrary code in the context of the Jenkins controller JVM.CVSS 9.1CVE-2026-133464 | SeaweedFS is a distributed storage system for files and blobs. Prior to version 4.46, FileStore.ValidatePassword in the SFTP server does not reject zero-length secrets before comparing them, causing an empty login password to match any account configured without one, such as public-key-only or certificate-only users. Because password authentication is enabled by default, a remote attacker who knows a valid username can log in without a key or secret and obtaCVSS 9.2CVE-2026-77230 | Camunda 8.8.0 before 8.8.47, 8.9.0 before 8.9.29, 8.10.0 before 8.10.10, and 8.11.0-alpha1 contain an insecure deserialization vulnerability in the persistent web session feature, which stores session attributes as Java-serialized data in secondary storage and deserializes them via an ObjectInputStream without an ObjectInputFilter. Attackers with write access to the web session index, such as an unauthenticated Elasticsearch cluster deployed via Camunda's doc
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Bash script vs Python script for sysadmin tasks?

Which do you prefer to sling around, a bash command or a python script? In my goal to write more python and less shell, for the benefit of my colleagues'…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
CVE & Threat-Kontext · 4 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

Which do you prefer to sling around, a bash command or a python script?



In my goal to write more python and less shell, for the benefit of my colleagues' sanity, I have been trying to favour Python - specifically, readable and maintainable python.



I have moaned before about how sysadmin scripts often look very messy and unmaintainable, and I have found a perfect example of how that arises.



I needed my team to send me the hostnames, IPs and MAC addresses of their VMs to send to IT for reserving in DHCP, and I started cooking up a python script. Just as I was finishing, I had a flash of inspiration and thought... can't I do just a one-liner in shell?



It's just a matter of getting the default IP and looking for the interface that uses it... I wrote the scirpt so that it could give result for a local host, or a series of specified remote hosts.



Which would you prefer to commit to a tooling repo? :-)



Here's the python script, idiomatic, and hopefully easy to read and maintain. I was going to tell my colleagues "Please clone (script repo) and run the script, supplying the hosts as arguments, like 'gather-ips.py jack@machine1 jack@machine2 ...' (yeah, I would need to send instructions too)




#!/usr/bin/env python

import re
import subprocess
import sys

class SubprocessError(Exception):
pass


def run(command:list[str]) -> str:
proc = subprocess.Popen(command, stdout=subprocess.PIPE, text=True)
stdout, _ = proc.communicate()
if proc.returncode > 0:
raise SubprocessError(f"Failed {command}, see stderr.")

return stdout


def read_ipa(ipa_lines):
ipa_entries = {}

current = None

for line in ipa_lines:
m = re.match(r"^[0-9]+:\s+(\S+?):.*", line)
if m:
current = m.group(1)
ipa_entries[current] = {}
continue
if current is None:
continue

current_entry = ipa_entries[current]

eth_m = re.match(r".+link/ether ([a-fA-F0-9:]+)", line)
if eth_m:
current_entry["mac"] = eth_m.group(1)

inet_m = re.match(r"\s+inet ([0-9.]+)/[0-9]+", line)
if inet_m:
current_entry["ipv4"] = inet_m.group(1)

return ipa_entries


def get_default_ip(ipr_lines):
default_line = [line for line in ipr_lines if 'default via' in line][0]
return re.findall(r"src [0-9.]+", default_line)[0][4:]


def get_ipra_lines(host):
if host:
lines = run(["ssh", host, "ip r; echo ===; ip a"]).split("\n")
idx = 0
for n in range(len(lines)):
if lines[n] == "===":
idx = n
break
ipr_lines = lines[:idx]
ipa_lines = lines[idx+1:]
else:
ipr_lines = run(["ip", "r"]).split("\n")
ipa_lines = run(["ip", "a"]).split("\n")

return ipr_lines,ipa_lines


def ublat(host_string:str):
try:
i = host_string.index("@")
return host_string[i+1:]
except ValueError:
return host_string


def get_target(host=None):
ipr_lines, ipa_lines = get_ipra_lines(host)
entries = read_ipa(ipa_lines)
def_ip = get_default_ip(ipr_lines)
hostname = ublat(host) if host else run(["hostname"]).strip()

for _, data in entries.items():
if def_ip in data.get("ipv4", ""):
print(f"{hostname}\t{data.get('ipv4')}\t{data.get('mac')}")
return
print(f"# Nothing in {entries}")


def main():
if not sys.argv[1:] or "get" in sys.argv[1:]:
get_target()
return

for host in sys.argv[1:]:
get_target(host)


main()






For sake of comparison, this is its bash equivalent - it does EXACTLY the same thing:




command="echo \"\$(hostname)  \$(ip a|grep \"\$(ip r|grep 'default via'|grep -Po '(?<=src )[0-9.]+')\" -B 1|grep -Po '(?<=ether |inet )(\S+)')\"|xargs echo"

if [[ -z "$*" ]]; then
bash -c "$command"
exit
fi

for
node in "$@"; do
ssh "$node" "$command"
done






In the end, I sent a message to the team and told them:




Hi all,



Please run this on each of your VMs and send me the output via email



echo "$(hostname) $(ip a|grep "$(ip r|grep 'default via'|grep -Po '(?<=src )[0-9.]+')\" -B 1|grep -Po '(?<=ether |inet )(\S+)')"|xargs echo




A one-liner in a single message. No sending scripts around. No instructing to clone and execute. Just "run this on each machine."



Which approach would you have taken

Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Communitydiscussie & reacties

🌐 Naar de hoofdchat

Start de discussie in de Social Chat broadcaststream of dien hierboven een vakbijdrage in via het aanvulformulier.

🔍 CTI & Forensik

Cyber Threat Intelligence & Forensiek

ATT&CK-Navigator · IoC-Radar & Graaf
MITRE ATT&CK Matrix Navigator
1 belegte Technik
T1059TA0002 · Execution
Command and Scripting Interpreter
Mitigation: M1038 Execution Prevention & Script Block Logging
Quelle: Kontext-Klassifikation des Artikeltextes · Konfidenz 82%
Enforce process and script logging (Sysmon/auditd), blok uitvoering van onbetrouwbare scripts.
Execution
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
4 Knoten · 3 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
🛡️
Exploit PoC Security Sandbox & Payload Analyzer PYTHON
Danger Index:15/100 SAFE_ANALYSIS_ONLY
✅ Keine offensichtlich destruktiven Befehle erkannt.
Standard-Analystenprüfung vor Ausführung empfohlen.
Erkannte Gefahrensignaturen (1):
MEDIUMPROCESS_SPAWN:Lokale Prozessausführung oder Subshell-Aufruf.
subprocess.Popen
Community Rating &amp; Social Proof
⭐ Lezersbeoordeling
–
Ø / 5.0
Nog geen recensies van lezers
Was dit artikel nuttig?
0
Geef uw beoordeling
Detailbeoordeling (optioneel)
Inhoud & Kwaliteit
Bron & Geloofwaardigheid
Actualiteit
Security Briefing Gratis · 1-klik uitschrijven

Intelligence Digest gratis

Dagelijks het belangrijkste beveiligingsnieuws · kan op elk moment worden opgehaald

Verwant Story Cluster & Sources (vector AI)

6 Cluster
22 Bronnen
We Found 67 Walmart Black Friday Deals You Can Shop Now, With Prices Starting at Only $4
CNET 28 dagen geleden
21 andere bronnen
CNET53 min. geledenThe Disney Plus and Hulu Bundle Plummets to $5 a Month for Black Friday Latest from TechRadar42 min. geledenRefurbished iPhone sales are on the rise — here's why buying pre-owned is a great idea this Black Friday Macerkopf.de1 uur geledenApple Watch 12, SE 3 und Ultra 3: Amazon reduziert alle drei Modelle zum Black Friday Latest from TechRadar1 uur geledenThe Lenovo Legion Tower 5i is the streaming and editing PC I'd pick — now $1,440 off at $2,230 for Black Friday CNET19 dagen geledenSave Up to $700 on Eufy Robot Vacuums, Security Cameras and More This Black Friday CNET1 uur geledenAmazon Just Knocked Up to 21% Off Ecobee’s Top-Rated Smart Thermostats for Black Friday CNET1 uur geledenWe’re Counting Down CNET Readers’ Top Picks This Black Friday Google Chrome1 uur geledenGoogle Chrome: Use Split View in Chrome to shop Black Friday finds for every side of your style. ✨ Latest from TechRadar1 uur geledenDell slashes $900 off the Alienware 16 Aurora — bringing this 16-inch RTX 5050 creator laptop down to $1,100 for Black Friday Google Alert2 uur geledenBlack Friday: So erkennen Sie Fake-Shops und Online-Betrug - VOL.AT Latest from TechRadar1 uur geledenBuilding a workstation or studio PC? Here are 3 Black Friday high-airflow case deals from Fractal, Cooler Master, and Phanteks CNET1 uur geledenSave Up to $500 on Select Midea Laundry Appliances During Best Buy’s Black Friday Sale CNET1 uur geledenPeacock’s Black Friday Deal: Save on Hit Movies, NBC Sitcoms, Live Sports and More CNET2 uur geledenThis Solar-Powered Bird Feeder Has a Built-In Camera and It’s $200 Off for Black Friday Latest from TechRadar2 uur geledenSSD prices are soaring, so I picked 4 Black Friday NVMe deals actually worth buying from Samsung, Lexar, and Kingston CNET2 uur geledenMy Favorite Camera Accessories Are on Sale This Black Friday CNET2 uur geledenSamsung’s Budget-Friendly Galaxy S26 FE Just Hit a New Low Price for Black Friday heise online News2 uur geledenBlack-Friday-Deals im Check: Bei Mini-PC und Laptop trotz Speicherkrise sparen CNET1 maand geledenSave Up to $100 on Smartphone Thermal Cameras With Rision’s Black Friday Sale CNET8 dagen geledenParamount Plus Is Slashing the Price on Its Ad-Free Tier for 2 Months This Black Friday CNET3 uur geledenLenovo Is Taking $758 Off the Legion Go S SteamOS Handheld for Black Friday
Soortgelijke bijdragen
🔍 Verwandte News

Auch interessante Nachrichten Bash script vs Python script for sysadmin tasks?

Thematisch verwandte Begriffe: Bash, script, Python, sysadmin · 6 Treffer

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

💬 Reacties worden geladen…
Trek om te vernieuwen
Widgets & Topics
Loading widgets…
Nächster Beitrag