Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 575  / 2 Years ago, sat, november 5, 2022, 8:24:54

Let´s assume that I programmatically download a malicious file, e.g. using wget, and try to import in e.g. R or Python as a text file. If it fails, I delete it using rm. There is any chance that my Linux system gets infected?


More From » python

 Answers
2

Transferring a file to your system, opening it with a text editor (or equivalent, as with text input functions in common programming languages), and deleting it if that fails seems very unlikely to run any code on your system, which would be required for malware to install itself.


That said, all large, complex software systems contain bugs, and in the case of an operating system, some of those bugs are security holes. One of the ones I recall reading about some time ago was a buffer overrun bug that allowed an unpatched system (Windows XP, as I recall -- told you it was a while ago) to be made to run "arbitrary code" simply by previewing (not even fully opening) an email message that contained data that would produce the buffer overrun.


Modern security bugs are much more subtle, in many cases, and it's not uncommon at all for security experts to find "zero day vulnerabilities" that are as yet unpatched by the software developers and maintainers, but previously unreported and that may therefore be available to attackers. This makes it impossible to be really certain that any seemingly innocuous thing you do is completely safe.


Keeping updated anti-malware software running on your computer is said to be the best way to protect yourself from this, but for your case, I'd also suggest testing your software on a clean-install machine, freshly updated, that contains no data you don't care to either lose or have published to the world (or stolen for use by a malware user); this machine should not be networked to any other machine that contains such data, either, as some malware ("worms") can spread through a LAN without user intervention (how to keep an internet connection on this machine and avoid connection to any of your other computers is left as an exercise, as they say).


[#988] Monday, November 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laceanz

Total Points: 86
Total Questions: 113
Total Answers: 104

Location: Australia
Member since Thu, Jan 26, 2023
1 Year ago
laceanz questions
Tue, Apr 26, 22, 07:43, 2 Years ago
Sat, Oct 23, 21, 09:40, 3 Years ago
Sat, Mar 12, 22, 07:56, 2 Years ago
Tue, Mar 28, 23, 23:58, 1 Year ago
;