ArticleslgStudy

science

Linux.Encoder

Linux.Encoder is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Linux.Encoder rather than just read about it. In short: Linux.Encoder (also known as ELF/Filecoder.A and Trojan.Linux.Ransom.A) is considered to be the first ransomware trojan targeting computers running Linux. There are additional variants of this Trojan that target other Unix and Unix-like systems.

Linux.Encoder — main illustration
Linux.Encoder — illustration

Key takeaways

  • Linux.Encoder belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Linux.Encoder to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Linux.Encoder from memory before moving on to harder problems.

Reference excerpt

Linux.Encoder (also known as ELF/Filecoder.A and Trojan.Linux.Ransom.A) is considered to be the first ransomware trojan targeting computers running Linux. There are additional variants of this Trojan that target other Unix and Unix-like systems. Discovered on November 5, 2015, by Dr. Web, this malware affected at least tens of Linux users. Linux.Encoder.1 is remotely executed on the victim's computer by using a flaw in Magento, a popular content management system app. When activated, the malware encrypts certain types of files stored on mounted local and network drives using AES and RSA public-key cryptography, with the private key stored only on the malware's control servers. The malware then stores a file called "readme_to_decrypt.txt" in every directory, containing a message, which offers to decrypt the data if a payment (through Bitcoin) is made. Compared to other ransomware such as CryptoLocker, the malware does not state a deadline to pay and the ransom does not increase over time.

Discovery On November 5, 2015, Dr. Web, a Russian anti-malware company, added Linux.Encoder.1 to its virus database. The company then published the malware description the day after. This ransomware is written in C using the PolarSSL library.

Operation

Propagation According to Bitdefender Labs, the most common infection vector is through a flaw in Magento, a shopping cart software. CheckPoint, reported this vulnerability in April 2015. After this report, Magento issued a fix. However, a lot of small e-commerce sites did not apply this critical update. Linux hosts may also be attacked using other exploits.

File encryption

Encrypted files When run as root, the program loads two files into memory containing the attackers' demands:

./readme.crypto ./index.crypto After this the ransomware receives the public RSA key. The malware will then start as a daemon and delete all its original files. The trojan will encrypt files with the extensions : ".php", ".html", ".tar", ".gz", ".sql", ".js", ".css", ".txt" ".pdf", ".tgz", ".war", ".jar", ".java", ".class", ".ruby", ".rar" ".zip", ".db", ".7z", ".doc", ".pdf", ".xls", ".properties", ".xml" ".jpg", ".jpeg", ".png", ".gif", ".mov", ".avi", ".wmv", ".mp3" ".mp4", ".wma", ".aac", ".wav", ".pem", ".pub", ".docx", ".apk" ".exe", ".dll", ".tpl", ".psd", ".asp", ".phtml", ".aspx", ".csv". The malicious program encrypts files with the aforementioned extensions in the following directories:

/home /root /var/lib/mysql /var/www /etc/nginx /etc/apache2 /var/log After this, the malware will encrypt all the files from directories with a name starting by:

public_html www webapp backup .git .svn The program will not encrypt files in the following directories:

/ /root/ .ssh /usr/bin /bin /etc/ssh

The program will then generate a file called "readme_for_decryption.txt" in every folder. This file contains the Bitcoin address generated specifically for the ransom and the website to download the decrypting tool hosted on a .onion website.

Encryption method Like other ransomware, Linux.Encoder.1 uses mixed-encryption algorithms to encrypt data. It starts by generating an AES key on the victim's device and encrypts all of the previous files using AES-CBC-128. Then the RSA-encrypted AES key is prepended to the beginning of every encrypted file, with the original file permissions and the IV used by the AES algorithm. All the encrypted files have ".encrypted" added at the end of their file name. The program uses the libc rand() function with the timestamp at the moment of encryption as a seed to generate the IV and the keys.

Decryption When the payment to the cybercriminal is made, the victim can download a PHP script to their computer. This script will use the RSA private key to recover the symmetric AES key and decrypt all the files with the ".encrypted" extension. Along with the file decryption, the decryption tool will also delete every "readme_for_decryption.txt" file on the hard drive.

Recovering files Because of the use of the timestamp as a seed for creating the keys and the IV for encryption, decryption of files encrypted by the ransomware is trivial given that the original timestamp information is kept intact. Researchers at Bitdefender Labs have found and exploited this weakness to recover the files without having to pay the criminals.

On other Unix systems Linux.Encoder.1 has been recompiled on Mac, called KeRanger. There is a version that infects FreeBSD.

References

Worked examples

Example 1 — a first encounter with Linux.Encoder

Start with the simplest possible case. Write down what Linux.Encoder claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Linux.Encoder before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Linux.Encoder ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Linux.Encoder

In research
Linux.Encoder appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Linux.Encoder in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Linux.Encoder is common in secondary-school and first-year university syllabi. It links to neighbouring topics Linux malware, Ransomware, Trojan horses, so understanding it makes those chapters shorter.
In everyday life
Look for Linux.Encoder outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Linux.Encoder” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Linux.Encoder in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Linux.Encoder means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Linux.Encoder out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Linux.Encoder in simple terms?

Linux.Encoder (also known as ELF/Filecoder.A and Trojan.Linux.Ransom.A) is considered to be the first ransomware trojan targeting computers running Linux. There are additional variants of this Trojan that target other Unix and Unix-like systems.

Why does Linux.Encoder matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Linux.Encoder?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Linux.Encoder.

Tags

  • Linux malware
  • Ransomware
  • Trojan horses

Keep exploring