• 0 Posts
  • 51 Comments
Joined 2 years ago
cake
Cake day: July 29th, 2023

help-circle
  • Ciao,

    Certamente, posso concordare che il problema risiede nell’uso disinvolto di eval.
    Anzi:
    Il problema risiederebbe nell’uso disinvolto di eval.
    E l’articolo cosa dice?

    No executable permission required initially just unpacking or listing the archive contents in a script is enough to trigger infection.

    Chiaramente una informazione falsa o come minimo fuorviante, in quanto PROPRIO NELL’ARTICOLO hanno unpackato il file RAR e hanno listato i nomi dei file estratti senza avere effetti collaterali:

    https://www.trellix.com/en-us/img/newsroom/stories/fireless-threat-of-vshell-3.jpg

    Anything that expands filenames and processes them using eval, echo, printf, or logging can accidentally execute such a filename-payload"

    Anche questa affermazione è molto fuorviante.
    Dai miei test, nè echo, nè printf, nè for, nè il pipe redirection (>“$file”) hanno triggerato l’exploit.

    the attacker turns a simple file listing operation into an automatic malware execution trigger.

    Altrettanto fuorviante.

    This technique abuses a very common and dangerous pattern in many Linux shell scripts: evaluating or echoing filenames without sanitization.

    Ok, tiriamo una riga su “echoing filenames without sanitization” perchè abbiamo determinato che non c’entra una emerita:

    This technique abuses a very common and dangerous pattern in many Linux shell scripts: evaluating or echoing filenames without sanitization.

    OK, Il problema risiederebbe nell’uso disinvolto di eval.

    Però su una cosa io non concordo: da quando in qua è “very common” fare “evaluating filenames without sanitization”? Negli ultimi …8-10 anni… ho visto sempre e solo degli utilizzi di backticks, che non sono soggetti a questo problema (testato e verificato).

    Certo, eval è una operazione intrinsecamente non sicura, e questo lo si sa da decenni, così come è risaputo che in C anche system() è una operazione intrinsecamente non sicura.
    Infatti esistono svariati modi per sanificare il contenuto di eval (printf %q, backticks…), così come esistono anche per system (anche se in C il tema è più complesso) e, su tutte le shell più utilizzate, oramai non è neanche più necessario usare eval in quanto esistono abbastanza alternative che non necessitano di una sanificazione manuale degli input.

    Però secondo l’articolo, “evaluating filenames without sanitization” è “very common”.
    Il problema è che tutti gli esempi che sono stati mostrati sono sintetici, puramente a dimostrazione di una falla di sicurezza che si trova però all’interno dello script stesso.
    Dunque rinnovo la mia domanda in generale: Qualcuno ha qualche esempio di uno script che realmente triggera questo exploit?

    Infine ritorno alla tua osservazione, che trovo comunque corretta:

    eval di un comando, costruito dinamicamente che, contiene una variabile che fa riferimento a quel nome file, senza un corretto escaping

    Però intanto devi avere uno script fallato (perchè, a parere mio, è lo script che funzionalmente è la tua falla di sicurezza, non la presenza di un file con un nome “strambo”), poi devi far sì che operi nella stessa cartella in cui hai estratto tale file, proveniente da una mail di phishing, con questo RAR che hai volontariamente aperto ed estratto; e qui io mi dispiace ma rigioco la carta “minchione”.

    Oltretutto, se questo exploit è triggerato dall’estrazione di un file RAR arrivato da una mail non sollecitata, da un mittente sconosciuto, allora che differenza ci sarebbe tra questo attacco ed il fare doppio-click sul file VBS nella tipica mail che probabilmente tutti abbiamo ricevuto e che ti vuole installare un keylogger su Windows? Anche in quel caso avresti aperto il file VBS senza pensarci mentre che facevi la survey?

    Le uniche informazioni concretamente utili che ho trovato nell’articolo sono riferite ad un virus per Linux scritto in Go che si maschera dietro al nome kworker/0:2.



  • Credo che qui il problema risieda in primis nella presentazione dell’articolo:

    Questo sembra un semplice advisory, come per dire, “ehi, attenzione, stanno girando mail pericolose anche per sistemi Linux”.

    Però il titolo mi risulta invece fuorviante:

    “Una email di phishing può prendere il controllo del tuo sistema Linux senza aprire il file, questo trucco sfugge alle scansioni Antivirus”

    Questa affermazione è priva di fonti: nell’articolo non viene menzionato nessun sistema che ha subito danni da questo attacco o nessun antivirus che abbia mal detezionato questo fantomatico exploit, oltretutto le condizioni perché questo attacco possa veramente avvenire mi sembrano poco concrete:

    Intanto devi aver ricevuto questa mail con file RAR (fin qui OK) ed aver aperto ed estratto il file sul tuo disco (e qui già sei un minchione perché a differenza di quello che viene detto nell’articolo, questa operazione non la fai “mentre sei distratto a compilare la survey”).

    Poi devi avere “una shell a rischio” (quali?), cioè una che esegue i file mentre fai un ls (ma ls non è un eseguibile, cioè che non c’entra nulla con le shell? E da che mondo e mondo esiste una shell che esegue un file mentre li itera?)

    Poi devi avere eseguito uno dei comandi a rischio in questa shell (però teniamo a mente: sei un minchione che ha fatto una survey da una mail malevola che ha estratto un RAR, ma comunque fosse hai aperto il terminale nella cartella dove hai estratto il tuo RAR ed hai fatto questo fantomatico ls che magicamente è diventato parte della tua shell)

    Invece in seguito alla menzione che viene usato io_uring per evitare gli Antivirus… vergogna a chi dichiara che il proprio antivirus sia aggiornato se non monitora anche queste system calls (sarei però curioso di capire di quale Antivirus si stesse parlando, dato che misteriosamente non ne viene menzionato nemmeno uno).

    Viene inoltre menzionato che il nome del file è apparentemente illegale (cioè?) ma il tuo semplicissimo estrattore di file RAR è tranquillamente in grado di creare questo file… smentendo la prima affermazione. Teniamo a mente che i filesystem Linux sono sempre stati molto permissivi con i nomi dei file e non ci vedo nulla di strano che qualcuno provi a farci degli exploit.

    Se poi davvero esistesse questo exploit, la mail come mezzo di trasmissione (o il fatto che si parli di un file RAR) sarebbe irrilevante: basterebbe un file scaricato, o ricevuto tramite chessò Discord, negli ultimi 20 anni, anche zip, tar, sotto gzip o xz…

    Sinceramente mi suona molto di un articolo farlocco, destinato solo a produrre spauracchio nei confronti dei sistemi Linux.

    Poi per evitare di raccontare un sacco di cazzate ho anche fatto la prova del nove: ho creato un file malevolo (tramite shell, nulla di così “illegale” come viene menzionato nell’articolo), e non ho trovato il modo di farne eseguire lo script presente nel nome del file.

    Ho provato ls (che effettivamente è /usr/bin/ls quindi vergogna agli autori che vogliono far credere che ls sia un comando della shell), ls -la, for file in *, find.

    Ho provato a fare cat [TAB] e il nome del file è stato correttamente sanitizzato dalla mia shell di default (bash), e l’output di cat era corretto.

    Insomma, un articolo da buttare nel cestino dell’immondizia.


  • I am using bazzite for gamedev and it is AWESOME.

    It is immutable but ships with distrobox and boxbuddy, which lets you easily create linux containers with mutable systems (i.e. I am currently developing on a fedora container with Qt Creator, for example) and you can install your packages in that terminal.

    No chances of breaking your main OS.

    I set up my instance like follows:

    Boxbuddy -> New distrobox container -> Fedora -> Give it a name.

    Wait for the installation (should be about 300MB IIRC).

    In the start menu you will now be able to run your instance’s terminal (search for your instance name).

    sudo dnf install qt-creator

    Back in boxbuddy, in my instance I selected “show installed gui applications”, selected Qt Creator -> Add to applications menu.

    Qt Creator then shows up in the start menu (search for either Qt Creator, or your instance name).

    It will run in the container, but has full access to your home directory for development.

    I could then install all my other required packages from the same terminal that I installed qt-creator from.

    Easy peasy.

    Disclaimer: Typing from my phone. The instructions may not be exactly like I said, but those are the steps.

    No terminal magic is needed in Bazzite to make this work.



  • SGH@lemmy.mltoLinux@lemmy.mlJellyfin assistance
    link
    fedilink
    arrow-up
    5
    ·
    3 months ago

    Not OP, but it was very simple if you have already seen that error.

    First of all, there is one single easily parsable error.

    https://repo.jellyfin.org/debian produced a 404 error, thus the URL is invalid.

    Let’s ignore why it’s invalid for a second.

    This error happens after apt update, thus we can deduce the following:

    • It’s supposed to be an apt repository URL (To experienced users, it effectively looks like a repository URL)
    • This repository URL does not work
    • As in 99% of cases, this URL is likely located in a configuration file in the standard location, /etc/apt/sources.list.d/

    Back to why it’s invalid, maybe it used to be valid in the past, or there is a temporary server error, this can be verified with the official documentation.

    If the documentation does not mention this repository URL, then it’s a mistake to use it.

    This is a good moment to google this URL and find out why/which guide tells you to use it, and to analyze which steps they made you take.

    From there, reverse those steps.

    Even if you hadn’t found this guide, you can be sure that by looking into /etc/apt/sources.list.d you would’ve found that file containing that URL, simply removing the file or URL would’ve removed the error.

    Lastly, you look for either the official documentation, or a more reliable guide.



  • What are your expectations?

    Most Qt modules are licensed under LGPL (in the Open Source edition of Qt) which allows you to distribute (and sell) your software without having to release your source code - AS LONG AS you use the dynamically linked version of Qt (i.e. the default: unless you recompile Qt yourself, you’ll have the correct configuration already).

    As long as you keep an eye out for that, there should be no issues.

    Additionally, keep in mind the lrelease tool for finding out all the Qt DLLs that your app will depend on.

    Technically, you can still sell your software under the GPL license, which some Qt modules are licensed under, but you may need to provide your source code if requested by a customer.

    Disclaimer: Not a lawyer, just a user.






  • SGH@lemmy.mltoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    5
    ·
    6 months ago

    I don’t know if the critique is well deserved, considering that “we” probably don’t “want people switching to”… a minecraft server management utility built in nodejs that’s also barely mantained.
    Yeah, I think it’s clear that I really didn’t get the reasoning behind “we want people switching to”.
    We’re talking about a server side utility, and whoever is using that should either have a bit of knowledge about servers, or be versatile enough to learn even if just by getting their hands dirty - on that regard, one should use a virtualisation system so that they can freely manage their OS and package versions without breaking everything in the meantime.

    To contribute to this discussion, I tried CubeCoders AMP and never looked back.

    Installation was relatively easy as it’s a one-liner installation script, but you have to purchase a license to set up a game server.

    Mod management isn’t the best, as there is no real utility other than the file manager, but I understand that’s an almost impossible issue to solve because of how many configuration variants exist.

    I had three instances running on three different systems at one point, even if just to host other game servers since it’s not limited to MC.






  • That seems legit to me.

    DRM content is usually encrypted and only decrypted through some proprietary plugins, so you have to agree to use these plugins if you want to watch these videos.

    This is the same mechanism that Netflix and Disney+ use and it helps them by not letting you download movies to your computer.