Security Engineering: Part 12. Network Attack and Defense, as well as Copyright and DRM
Network Attack and Defense (Vulnerabilities of Network Protocols)
Modern attacks are inextricably connected with network connectivity. To understand the scale of the threat, it is enough to consider several typical scenarios unfolding in corporate and home networks:
- An office worker opens an attachment in an electronic mail message. This infects his computer with malicious software, which intercepts passwords transmitted over the local network in the clear, and infects other machines in the office.
- A malicious letter arrives from the user's "mother". The virus automatically sends itself to all the addresses in the address book of the infected machine.
- Attackers do not try to guess the password for a particular account. Instead they try one and the same password against millions of accounts (for example, web-mail), in order to obtain control of them and to send spam.
- "Google hacking": attackers use search engines to discover web servers with vulnerable applications.
- Malicious software massively infects computers. It then looks for valuable data (for example, credit card numbers) or for web servers to host phishing pages. The remaining infected machines are sold for a dollar apiece to botnet operators, who rent them out to spammers, phishers and extortionists.
- Fast-flux technology: the IP address of a malicious web site changes, for example, every 20 minutes, so that it is harder to block. Different machines in the botnet take turns acting as hosts (or proxies), so blocking one address gives only a temporary effect. This is often used for phishing sites.
Vulnerabilities of Network Protocols
The fundamental network protocols (IP, TCP, DNS, ARP, DHCP) were developed in an era when the network consisted of trusted hosts and security questions were not in first place. This initial openness laid the foundation for a multitude of attack vectors.
Attacks on Local Area Networks (LAN)
If an attacker gains control of even one PC in a local network, his capabilities expand sharply:
- Sniffing and spoofing. The attacker can install a packet sniffer to intercept passwords transmitted over the network in the clear, in order to obtain administrator (root) privileges. In addition, he can forge MAC and IP addresses (spoofing) in order to bypass network protection or to pass himself off as another machine.
- File system vulnerabilities. The classic example is the Network File System (NFS). NFS allows clients to mount remote file systems. If the client machine is compromised and the server trusts the client without proper authentication, the attacker can obtain unauthorized access to files on the server.
Attacks Using Internet Protocols and Mechanisms
SYN Flooding
The TCP protocol uses a three-way handshake to establish a connection. In a SYN flood the attacker sends the target server an enormous number of SYN packets, but deliberately ignores the server's replies (SYN-ACK). The server allocates resources to wait for the confirmation (creating half-open connections) and in the end exhausts the available memory or buffers, which leads to a complete denial of service (DoS).
This attack was known theoretically since the 1980s, but gained wide publicity in 1996, when with its help the New York provider Panix was put out of action for several days.
Countermeasures: The use of the "syncookies" mechanism. In this case the server does not store the state of half-open connections, but instead sends the client an encrypted value (a cookie). If the client is legitimate, it will return the cookie, and the server will restore the state of the connection. This protection is implemented in Linux and other systems; however, SYN floods still remain one of the most common types of attack.
Smurfing
The attack uses the ICMP protocol (echo requests, ping). The attacker forms an ICMP packet with a forged source address (the victim's address) and sends it to the broadcast address of an amplifier network (smurf amplifier). All the hosts in this network receive the request and send a reply to the victim's address, many times amplifying the traffic and overloading her channels.
Countermeasures: The problem was solved at the level of standards (RFC 2644), which prohibited routers by default from forwarding broadcast ICMP packets. Network administrators must also configure their routers to ignore such requests. By 2007 smurfing had practically died out.
Distributed Denial-of-Service Attacks (DDoS)
Unlike local DoS attacks, DDoS uses a distributed network of thousands of compromised machines (a botnet). The attacker controls the botnet and forces all the machines simultaneously to send junk traffic to the target.
DDoS attacks became publicly known in 1996 (the attack on Panix), and at the end of the 1990s teenage hackers used them to seize IRC servers. Later the attacks acquired a commercial character: hackers attacked the sites of online bookmakers before major sports events and demanded money to stop the attacks.
Countermeasures:
- Moving sites to hostings with high bandwidth (for example, Akamai), whose distributed infrastructure is capable of absorbing large volumes of traffic.
- The use of specialized "packet-washing" machines, which filter malicious traffic at high speed.
- The economic approach: the bookmakers joined forces, worked out a policy of collective refusal to pay ransoms, and the police (in particular, in Russia) arrested a gang of extortionists.
Spam
Spam is closely connected with DDoS, since it also relies on the infrastructure of botnets.
- Consolidation: If formerly spam was sent by millions of small operators, by 2007 the market had consolidated. The volumes of spam began to fluctuate sharply depending on the campaigns of a few large groups.
- Backscatter: When a spammer forges the sender's address, the delivery error messages (bounce messages) go to the forged address, creating additional junk traffic for the unsuspecting victim.
- Countermeasures at the level of providers (ISPs): Providers begin to track outgoing spam from their networks and to place infected machines into "walled gardens". From such networks users can obtain access only to a page with antivirus software, which deprives the botnet of the ability to send spam.
DNS Security and Pharming
DNS (Domain Name System) converts convenient domain names into IP addresses. DNS vulnerabilities allow users to be redirected to malicious sites.
- Cache poisoning: If an attacker can forge a reply and poison the cache of a DNS server, he can replace the IP address of a legitimate site with an address under his control.
- Pharming: An attack in which users are redirected to fake (for example, phishing) sites even when they enter the correct URL.
- Drive-By Pharming: A special kind of attack on home routers. The attacker lures the user to a web page with JavaScript code which, through vulnerabilities in the router, changes the DNS server settings of the router to a server controlled by the attacker. After this all the devices in the home network will be redirected to phishing sites.
- Countermeasures: Users need to change the factory passwords on their routers and to update their firmware. At a higher level, the introduction of cryptographic protection of DNS (DNSSEC) is required, although at the moment these technologies were described it had not yet been mass-deployed.
Network Attack and Defense (Malicious Code)
Computer security experts have long been aware of the threat of malicious code. The terminology in this area sometimes provokes disputes, but the generally accepted definitions sound as follows:
- A Trojan (Trojan horse) is a program that performs some malicious action (for example, intercepts passwords) when an unsuspecting user runs it.
- A worm is a self-replicating malicious program.
- A virus is a worm that replicates by attaching itself to other programs.
- A rootkit is a piece of software which, after being installed on a machine, covertly transfers it to remote control.
Rootkits can be used for targeted attacks (for example, by law enforcement agencies to turn suspects' laptops into listening devices) or for financial fraud (equipped with keyloggers to steal passwords). The main feature of modern rootkits is stealth: they try to hide from the operating system so that they cannot be detected and removed by standard means.
The Early History of Malicious Code
Malicious code appeared practically simultaneously with computers themselves.
- The early 1960s: The first Trojan programs appeared on the early computer EDSAC. Students wrote computer games with "Trojan" code inside, which checked whether the program had been run with root privileges and, if so, created an additional privileged account with a known password.
- The 1970s: Large time-sharing systems in universities became the target of various hooligan pranks using Trojans.
- 1978: John Shoch and Jon Hupp of Xerox PARC wrote a program that they called a "worm". It replicated over the network in search of idle processors in order to assign tasks to them.
- 1984: Ken Thompson published the classic paper "On Trusting Trust" ("Reflections on Trusting Trust"), in which he showed that even if the source code of a system has been carefully checked and contains no vulnerabilities, a trapdoor can be built into the compiler.
- 1984: Fred Cohen, as part of his diploma work, carried out a series of experiments with various operating systems, proving that code can spread from one machine to another and even cross boundaries in multilevel protected systems. This caused alarm and led to the appearance of the first real viruses "in the wild" approximately three years later. Almost all of them were viruses for PCs, since DOS was the dominant OS. Viruses spread when users shared programs on floppy disks or through bulletin boards (BBS).
The Internet Worm
The first case that attracted the attention of the press and of the general public occurred in November 1988. It was the internet worm written by Robert Morris Jr. The program used several vulnerabilities to spread from one machine to another:
- General vulnerabilities: guessing from 432 common passwords and the exploitation of
.rhostsfiles. - Specific vulnerabilities: holes in
sendmailandfingerd.
The worm took steps to disguise itself: it called itself sh (shell) and encrypted its data strings with the help of a Caesar cipher. However, there was an error in its code: it could not correctly determine that a machine was already infected, and continued to reinfect it. This led to machines beginning to generate an enormous volume of network traffic, completely clogging the Internet.
Despite the fact that the Internet (and its predecessor Arpanet) was designed with the highest margin of resistance to attacks, including a strategic nuclear strike, a program written by a student was able to paralyze it. Fortunately, the consequences were eliminated in a day or two, and the worm mainly affected systems based on Berkeley Unix and their derivatives.
How Viruses and Worms Work
A malicious program usually consists of two components: a replication mechanism and a payload.
The replication mechanism:
- A worm simply copies itself to another place (for example, hacks another system or sends itself to the addresses in the address book of the infected machine).
- A virus (in the DOS era) added itself to the end of an executable file and patched it so that the execution path first went to the virus code and then returned to the original program.
- A specific trick: if there was a file
ACCOUNTS.EXEin the system, the virus could create a fileACCOUNTS.COM. Since DOS executed.COMfiles as a priority, the user, trying to run the program, unknowingly launched the virus.
The Payload:
It is usually activated by a trigger (for example, by date) and can perform one or several malicious actions:
- Selective or random alteration of the protection state of the machine.
- Alteration of user data (for example, encryption of the hard disk with a demand for a ransom for decryption).
- Blocking of the network (for example, beginning replication at maximum speed).
- Execution of malicious tasks (for example, using the processor to brute-force DES keys).
- Forcing the modem to dial premium-rate numbers to transfer money to telephone fraudsters.
- Installation of spyware or adware to steal data or to show advertisements.
- Installation of a rootkit to turn the machine into part of a botnet.
The History of the Development of Malicious Software
At the end of the 1980s and the beginning of the 1990s, PC viruses became such a serious problem that they gave rise to a whole industry of antivirus software manufacturers. Many hoped that the transition to "real" 32-bit operating systems (such as Windows) would solve this problem, but this did not happen.
- Interpreted languages: The spread of interpreted languages provided hackers with fertile ground. At the end of the 1990s malicious Java applets exploiting vulnerabilities in browsers flourished. By 2000 the main carriers of threats had become macro languages in products such as Microsoft Word. Macro viruses dominated because documents were sent by electronic mail.
- The "Love Bug" worm (2000): Became a turning point. This was a self-propagating worm that sent itself to everyone in the victim's address book with the subject line "I love you".
- "Flash worms": Threats such as Code Red and Slammer appeared, which scanned the whole Internet for vulnerable machines and infected them within a matter of hours or minutes.
- The transition to organized crime (~2004): From this moment the motivation shifted from hooliganism and boasting to the creation of an organized criminal economy. The goal of the authors of malicious software became not the creation of "glitchy" viruses that are quickly detected, but the covert recruitment of machines for subsequent sale to botnet operators.
- The dominance of Trojans: Trojans began to occur more often than worms. If a worm sends itself by electronic mail, it attracts the victim's attention. Trojans, on the other hand, are spread directly by botnet operators, who use spam or phishing.
- The Storm botnet (2007): One of the largest botnets, numbering about a million machines. Its operators used professional online marketing to spread Trojans (for example, spam with offers to download a football match tracker). The botnet used a P2P architecture and was rented out for fraudulent share schemes (pump-and-dump) and for the sale of fake medicines.
Countermeasures
The fight against malicious code resembles an arms race.
- Scanners and checksums: The first antiviruses looked for known signatures or checked the checksums of files.
- Polymorphism: In response, virus authors began to apply polymorphism. The virus encrypted its code with a simple cipher, and left at the beginning of the file a small header with the decryption code. At each replication the virus changed the encryption key and modified the decryption code (replacing instructions with equivalent ones) in order to bypass signature analysis.
- Modern reality: Antivirus software is becoming ever less effective. The operators of large botnets use automated tools for testing exploits. Rootkits not only hide from the OS, but also receive "after-sales service" from their creators: as soon as a tool appears for removing a particular rootkit, its authors quickly release an updated version invisible to that tool.
Protection Against Network Attacks and Network Topology
The provision of security in a network environment rests on four main tools: configuration management, filtering, intrusion detection and encryption. Let us consider each of them, as well as the influence of network topology on its vulnerability.
Configuration Management and Operational Security
Most technical vulnerabilities in corporate networks are exploited not on the day of their discovery, but months later, when patches have already been released but not installed. The vulnerability management cycle has become a critical process.
- Patching: There is a tension between the need to close vulnerabilities quickly and the need to test them thoroughly. Microsoft introduced the practice of "Patch Tuesday" (the release of updates on the second Tuesday of each month) so that corporate customers could plan testing and deployment. Attackers, for their part, learned to reverse-engineer patches in order to create "zero-day" exploits against systems that had not yet been updated.
- Reduction of the attack surface: It has become standard practice to remove all unnecessary network services and daemons from servers. The fewer ports are open, the fewer vectors there are for attack.
- Operational security: People remain the weak link. Training users not to click on suspicious links in electronic mail is important but insufficient, since many employees by the nature of their work have to click on links. Operational security must include not only instructions, but also mechanisms limiting the damage from a successful compromise (for example, running browsers with limited privileges).
Filtering: Firewalls and Proxies
Filters analyze packet flows and discard or modify undesirable traffic. They are divided into three main classes:
1. Packet Filtering
Works at the network level (IP). A router or firewall checks the packet headers (source/destination IP addresses, port numbers).
- Protection against spoofing: Firewalls can block outgoing packets with forged internal IP addresses (protection against smurf attacks) and discard incoming packets from external networks if they claim to be internal addresses.
- Limitations: Simple filtering is vulnerable to packet fragmentation, when the attacker splits a packet so that the header with a prohibited port falls into one fragment and the payload into another, bypassing the filtering rules.
2. Circuit Gateways
Work at the transport level (TCP). They establish a session, checking its legitimacy, and then pass the traffic.
- VPN: Gateways are often used to create virtual private networks (VPN), where traffic between remote offices is encrypted and encapsulated, passing through the public Internet as an ordinary data flow.
3. Application Gateways and Relays (Application Relays)
Work at the application level. They fully understand the protocol (for example, SMTP for mail or HTTP for the web) and can filter content.
- Mail filters: They remove attachments with executable files or macros.
- Web proxies: They block the downloading of malicious code or access to certain categories of sites.
- The arms race: Attackers bypass such filters by packing executable files into ZIP archives, and then into encrypted archives with a password transmitted in the body of the letter.
Ingress and Egress Filtering
- Ingress (incoming): The traditional protection of the perimeter against external attacks.
- Egress (outgoing): A relatively new concept, aimed at controlling the traffic leaving the network. Providers are beginning to use egress filtering to detect infected machines sending spam. Infected hosts are placed in "walled gardens", from which they have access only to a portal with an antivirus, which deprives the botnet of the ability to send junk.
Architecture
Complex networks use a multilayer architecture. The classic example is the DMZ (demilitarized zone). An external firewall separates the DMZ (where the public servers stand) from the Internet, while an internal firewall protects the corporate network from the DMZ.
Example: At Hanscom Air Force Base a complex system of firewalls was implemented, separating networks with different levels of trust. This showed that even with a clear policy, the integration of different systems and the management of rules require constant attention, since errors in configuration nullify all the protection.
Intrusion Detection
Intrusion detection systems (IDS) monitor the network or hosts for anomalies or for known attack signatures.
- Misuse detection: Looks for known patterns (signatures) of attacks, for example specific sequences of bytes in network traffic corresponding to an exploit.
- Anomaly detection: Builds a profile of the normal behavior of a system or user and signals deviations.
- Limitations: The main problem of IDS is the high level of false positives. If the system generates too many false alarms, administrators stop reacting to them. In addition, IDS are useless against traffic encrypted with the help of TLS or IPsec, since they cannot analyze the contents of the packets.
Encryption
Encryption protects the confidentiality and integrity of data, but does not solve all problems (for example, it does not protect against phishing or against malicious software on the endpoints).
SSH (Secure Shell)
Developed by Tatu Ylönen in 1995, SSH replaced the insecure remote access protocols (telnet, rsh). SSH provides traffic encryption and authentication. However, its security depends on correct configuration: the use of weak keys or of vulnerabilities in the implementation (for example, insufficient entropy during key generation) can lead to compromise.
WiFi (IEEE 802.11)
- WEP (Wired Equivalent Privacy): The initial WiFi encryption protocol. It turned out to be fatally vulnerable because of weaknesses in the RC4 algorithm and the use of short initialization vectors (IV). The attack of Fluhrer, Mantin and Shamir allowed WEP keys to be broken within minutes by collecting traffic.
- WPA / WPA2: Were developed as a temporary (WPA) and a permanent (WPA2) solution. WPA2 uses AES in counter mode with CBC-MAC (CCMP), which provides reliable protection if a complex password (pre-shared key) is used or a corporate infrastructure with a RADIUS server.
Bluetooth
Was originally designed for personal area networks (PAN) with low power consumption.
- Vulnerabilities: The pairing protocols were subjected to attacks. Researchers (Shaked and Wool) showed that the Bluetooth PIN code can be guessed by intercepting traffic during the pairing process. Newer versions of the specification (Secure Simple Pairing) use elliptic curves for protection against passive eavesdropping, but man-in-the-middle attacks are still possible if the devices have no reliable way of verification (for example, comparing a numeric code on the screens).
HomePlug
A technology for the transmission of data over power wiring.
- Security: Since the signal goes beyond the limits of the apartment (into the common electricity network), encryption is obligatory. HomePlug AV uses AES. The management keys are entered by the user manually when setting up the network. Research showed that users often neglect the configuration of encryption, leaving the network open to neighbors or to attackers who have physical access to a socket.
IPsec
A set of protocols for the protection of IP connections at the network level. It supports tunneling modes (for VPN) and transport modes (for the protection of connections).
- IKE (Internet Key Exchange): A protocol for the secure exchange of keys. IPsec is widely used in corporate environments, but its complexity often leads to configuration errors that nullify the advantages of encryption.
TLS (Transport Layer Security)
The successor of SSL, it provides security at the transport level (usually on top of TCP). It is used to protect web traffic (HTTPS), electronic mail and other applications.
- Mechanism: The client and the server agree on cryptographic algorithms (a ciphersuite), exchange certificates for authentication and generate a common secret session key.
- Vulnerabilities: TLS protects the channel, but not the endpoints. If the server or the client is compromised, encryption will not help. In addition, the introduction of TLS into web browsers led to users becoming accustomed to ignoring warnings about invalid certificates, which is exploited by phishers.
PKI (Public Key Infrastructure)
The public key infrastructure was supposed to solve the problem of trust on the Internet by binding public keys to real persons or organizations through certification authorities (CA).
- Reality: During the dot-com boom PKI was regarded as a panacea, and companies were valued at billions of dollars. However, in practice PKI ran into problems of scalability, of managing certificate revocation (CRL) and of usability.
- Limitations: Most users do not understand how certificates work. Commercial CAs sometimes issued certificates to fraudsters because of errors in the verification procedure (due diligence). As a result PKI did not become a universal solution for the protection of electronic commerce, remaining a niche tool for corporate networks and specific applications.
Topology
The topology of a network (the way the nodes are connected) critically affects its resistance to attacks and to the spread of malicious code.
- Scale-free networks: The research of Albert, Jeong and Barabasi showed that many real networks (including the Internet and social networks) have a power-law distribution of connections. In such networks there is a small number of "hubs" (nodes with an enormous number of connections) and a multitude of weakly connected nodes.
- Resistance to failures and to attacks: Such networks are extremely resistant to random failures (the disconnection of a random node will not destroy the network). However, they are critically vulnerable to targeted attacks. If an attacker identifies and puts out of action the key hubs (for example, backbone routers or large autonomous systems), the network will fall apart into isolated fragments.
- The spread of malicious code: Topology also determines the speed of the spread of worms. In social networks (where the nodes are people or their accounts) worms can use the trust between nodes for rapid propagation. An understanding of topology is necessary for developing strategies to contain epidemics of malicious code (for example, by local filtering of traffic at the level of providers).
Copyright and DRM (Introduction, the Protection of Software, Books, Audio and Video)
Introduction
Copyright and digital rights management (DRM) have become some of the most acute and contentious questions of the digital era. As John Perry Barlow aptly remarked: "It is not about censorship, but about the defining battle for censorship in cyberspace". At the same time John Gilmore warned: "Rejoice that your PC is insecure — this means that after buying it you can hack it and install any software you want. What YOU want, and not what Sony, Warner or AOL want".
The conflict between the Hollywood industry and the computer industry moved into the legal plane. The fears of the music and film industries about losses from digital copying led to the lobbying of laws "convenient" for them, such as the Digital Millennium Copyright Act (DMCA) in the USA and a series of intellectual property (IP) directives in Europe. These laws provided special legal protection for DRM mechanisms, which made it possible to use them not only to combat piracy, but also for the most varied purposes — from blocking phishing sites to prohibiting the refilling of printer cartridges.
Copyright
History shows that any attempts to control the distribution of information meet resistance. For a long time the industries tried to introduce taxes on blank audio and video cassettes in order to compensate rightsholders for losses from amateur copying. However, technological progress constantly bypassed these restrictions.
Software
In the early days of computing, the protection of software copyright was not a problem. Software was distributed free of charge either by hardware manufacturers (for example, IBM) or by the users themselves. IBM even instituted a scheme allowing users to exchange the programs they had written, although most of them were too specific.
The situation changed with the appearance of minicomputers in the 1960s. The cost of software became significant, and companies began to sell not simply "hardware", but integrated solutions. At first these were unique systems written to order, but over time they turned into replicable "packages" (for example, accounting systems).
The need for protection against copying appeared. The first tool became the analysis of "software birthmarks" — unique features of coding style by which it could be proved that a competitor had stolen the source code.
With the coming of the era of microcomputers and PCs, protection became more aggressive. Developers used:
- Hardware keys (dongles): devices connected to the PC's ports, without which the program would not run.
- Damaged sectors on floppy disks: the program checked for the presence of data in specially "broken" sectors that could not be copied by standard utilities.
- Checking of the PC configuration: binding to unique hardware.
Psychological methods were also applied: the display of warning messages or the use of "time bombs" (although the latter often provoked legal disputes).
In the end the industry came to the conclusion that fighting each individual user is economically inexpedient. Many companies moved to business models in which the product itself is given away free or cheaply, and the money is earned on accompanying services or consumables (for example, printers are sold cheaply, while the ink costs a lot). The open source movement also gained strength, which proved that collaborative development can be more effective than proprietary development.
Books
The history of the 19th century offers a useful lesson for publishers. "Circulating libraries" (book rental) appeared then, and publishers feared that this would destroy sales. However, the libraries only whetted the appetite of readers: people who had read a book on rental often wanted to buy it for their own collection. In the end book sales rose sharply.
Audio
Musicians have always tried to control their works. Niccolò Paganini kept his scores secret so that they would not be stolen.
In the era of audio cassettes the industry panicked again. In response SCMS (Serial Copy Management System) was introduced — a system adding one bit that prohibited copying a copy (that is, you could make a copy from the original, but not from a copy). This system worked badly, but it did not matter: cassette sales were enormous anyway.
Later the DAT format (digital audio cassette) appeared, and then MP3. MP3 compression algorithms made it easy to transmit music over the internet, which led to the explosive growth of peer-to-peer (P2P) networks and to a new wave of conflict with rightsholders.
Video and Pay-TV
With the appearance of video cassettes Hollywood was again in terror, fearing that home copying would kill the cinemas. However, as in the case of books and audio, video cassettes became an enormous market, and Hollywood studios began to earn more from sales than from theatrical release.
The situation with pay television (Pay-TV) was different. Satellite and cable TV operators needed to restrict access to channels only to subscribed users. For this, conditional access systems were developed.
A typical architecture of video protection systems: The system uses a hybrid of analog and digital technologies. The video signal is transmitted in analog form, but access control is digital. The architecture includes three components:
- The subscription management service: encrypts the video stream and embeds in it entitlement management messages (EMM) and entitlement control messages (ECM).
- The set-top box: receives the signal and decrypts the video.
- The smart card: personalizes the set-top box. It stores the cryptographic keys, interprets the ECMs and provides the set-top box with the "control words" for decrypting the current frame.
Video Scrambling Methods
Early systems (for example, Videocrypt) used analog methods, such as inverting the signal or adding interference. Later they moved to digital methods, but with analog output.
One of the known algorithms was cut-and-rotate. A line of the video signal was cut at a certain point, and the halves were swapped. The point of the cut was determined by a cryptographic key.
However, such methods were vulnerable to attacks using signal processing: knowing the algorithm, one could recover the original image by analyzing the scrambling artifacts.
Attacks on Hybrid Scrambling Systems
Pirates quickly found ways of bypassing the protection of set-top boxes and smart cards.
- The key-log attack: Since the control word was the same for all set-top boxes watching one channel, pirates installed a device between the smart card and the set-top box, recorded the stream of keys and posted it on the internet. People who had recorded the encrypted transmission could download the keys and watch the video later.
- Cryptanalysis: Many systems used linear feedback shift registers (LFSR). Pirates found "narrow pipes" in the algorithms, which allowed keys to be recovered.
- Psychological and legal measures: TV operators had constantly to update the algorithms so that the pirates did not have time to adapt. A "revocation tree" was also applied — a binary tree of group keys allowing compromised cards to be revoked efficiently without sending millions of individual messages.
The legal struggle was also tough. The case of Chris Cary, an Irish pirate who mass-produced cloned cards, is known. He was caught not only with the help of technical means, but also thanks to a thorough financial investigation and the work of undercover agents.
DVB (Digital Video Broadcasting)
The transition to fully digital television (the DVB standards) required new approaches. DVB uses the Common Scrambling Algorithm.
Since a digital signal can be copied without loss, the industry developed the CPCM (Content Protection & Copy Management) system. Its goal is to control what can be done with content after it has been decrypted inside the home (for example, whether it can be recorded onto a hard disk, whether it can be copied to another medium). This provoked new disputes about how far DRM technologies ought to go in controlling the actions of the user inside his own desired network.
Common DRM Platforms (WMRM, OMA, P2P Networks, the Protection of Semiconductor IP)
With the transition to the internet era, the industry faced the task of controlling the sale and distribution of digital goods directly to consumers. Initially these technologies were developed for online subscriptions to newspapers and scientific journals, but it quickly became clear that music and video would become the main objects of protection.
The basic problem is that a personal computer is a universal device capable in principle of copying any file and sending it anywhere. Unlike analog copying, digital copies are perfect, and millions of copies can be made from a single original. The problem is aggravated by the fact that, from the point of view of the rightsholder, the owner of a PC is the "enemy". The music and film industries considered that unlimited copying would destroy their business, while the computer industry asserted that DRM is inherently impossible on a universal computer, and proposed changing the business models. Despite the fact that the size of the media industry was only a tenth of that of the computer industry, Hollywood had far more political influence in Congress. In the end Hollywood got its way, and the result was the appearance of a number of products united by the term "digital rights management" (DRM).
Windows Media Rights Management (WMRM)
One of the first mass systems became WMRM, built into Windows Media Player (WMP), which was supplied with every copy of Windows. The architecture of the system was built around the encryption of the media object with a content key. The user was then sold a "license", which consisted of this key encrypted with the help of the user's unique key, together with a set of rules in a "rights management language" defining what the user could do with the content (for example, how many times it could be listened to or recorded onto a CD).
For the system to work, the player had to go through a process of "personalization": on first use it generated a public/private key pair and sent the public key to the license server. This allowed the server to encrypt content keys so that only that particular player could decrypt them.
Other Online Rights Management Systems
Besides Microsoft's solution, other platforms were present on the market:
- Apple FairPlay: The system used in iTunes and the iPod. It also tied licenses to users' accounts and devices, creating a closed ecosystem.
- OMA (Open Mobile Alliance) DRM: A standard developed for mobile devices. Version 1.0 was widely used to protect ringtones and applied a "forward lock" mechanism (a prohibition on forwarding). Version 2.0 was more complex and supported music and video; however, its introduction was resisted by cellular operators. They did not want content providers to obtain direct access to their customers, bypassing the operators' billing systems.
Peer-to-Peer (P2P) Systems
In parallel with the development of DRM, peer-to-peer networks flourished, which became the main way of distributing music in bypass of the restrictions.
* The first wave was represented by Napster, whose centralized music exchange service was quickly shut down thanks to lawsuits by the music industry.
* It was replaced by decentralized systems such as Gnutella and Freenet. They borrowed ideas from the world of censorship-resistant systems, creating networks without a central node that could be shut down by legal means.
* Later, dominance was seized by protocols such as BitTorrent, which use "swarming" mechanisms for the efficient downloading of files, which made the fight against piracy an even more difficult task for rightsholders.
The Protection of Semiconductor Intellectual Property (Semiconductor IP)
A separate and very acute problem is the protection of the designs of integrated circuits licensed for use in semiconductor devices. Companies such as ARM earn money by designing processors and other components, which they sell to firms producing custom chips (ASIC) or field-programmable gate arrays (FPGA).
Two main threats arise here:
- Overrun production: The manufacturing factory (foundry) may produce more chips than were ordered under the license, and sell the surplus on the "grey" market.
- IP theft: Competitors may try to copy or reverse-engineer the design of the chip itself.
To combat this, cryptographic keys embedded in the hardware are applied. However, the industry faces a dilemma: how to provide rigid protection while preserving the possibility of debugging and testing devices. The balance between security and the convenience of development remains a difficult engineering task.
Copyright and DRM (Information Hiding, Policy and Accessory Control)
Information Hiding
Hollywood's interest in the protection of copyright coincided in the mid-1990s with the military's interest in inconspicuous means of communication and with the public's concern about control over cryptography. This led to the rapid development of the area known as information hiding.
The conceptual model proposed by Gustavus Simmons assumes the presence of a sender and a receiver who wish to hide the fact of transmitting a message from a warden. Unlike encryption, where the secrecy lies in the content, here the very existence of the message is secret.
The terminology in this area includes:
- watermarks — hidden messages about copyright.
- fingerprints — hidden serial numbers (for example, for tracking leaks).
- cover-text — the original object (an image, audio).
- stego-text — the object with the hidden message.
- stego-key — the secret parameter used for embedding and extraction.
Watermarks and Copy Management
The DVD consortium faced the problem of the "analog hole" — the possibility of recording a digital signal onto an analog medium and copying it without loss. To solve this problem a copy management system was proposed. The idea was to mark content as "never copy" or "copy once".
Technically this was implemented as follows: a random "ticket" X is chosen, its hash is computed, which is embedded in the form of an invisible watermark into the video stream. Compatible devices read the hash. If the mark "copy once" is set, the device permits recording, but automatically changes the marker on the new copy to "copy prohibited". This system is used in DVD-audio, as well as in more complex schemes such as SPDC in Blu-ray, where each decoded stream receives a unique fingerprint.
General Methods of Information Hiding
The history of information hiding goes back to deep antiquity. Herodotus described how messages were tattooed on the shaved head of a slave and, after the hair grew back, became invisible. In the Renaissance Francis Bacon used microscopic differences in fonts to transmit hidden bits.
In the modern digital era the following methods are applied:
- Modification of the least significant bits (LSB). The simplest method, in which data are hidden in the low-order bits of pixels or audio samples. It is extremely unstable: the low-order bits are easily zeroed during compression or filtering.
- The Cardano grille and pseudo-random positions. The bits of the message are embedded not sequentially, but in randomly chosen positions determined by a key. This complicates detection, but is still vulnerable to an active warden.
- Spread Spectrum coding. A pseudo-random sequence is used to "smear" the signal over the whole frequency spectrum. This makes the watermark resistant to the loss of part of the data (for example, during lossy compression).
- Perceptual filtering. The signal is embedded only in those parts of the image or sound that are most "noisy" or least noticeable to human perception.
- Medium-specific methods. For example, shifting the lines of printed text by a fraction of a millimeter, or adding inaudible echo signals to music.
Attacks on Copyright Protection Schemes
Like any cryptographic systems, information hiding schemes are subject to attacks.
- The attack through geometric distortions (Stirmark). Researchers created the Stirmark tool, which introduces microscopic distortions (stretching, shifting, rotation) into an image, imitating the process of printing and subsequent scanning. This attack successfully destroyed most early watermark algorithms, since they did not take into account the loss of synchronization.
- The attack through a chosen distortion. If the attacker knows the embedding algorithm, he can deliberately distort the content so as to destroy the hidden marker but leave the file fit for use.
- The evolution of protection. The company Digimarc, whose algorithms were broken in digital form, shifted its focus to physical protection: its invisible markers are now used in banknotes and documents, and graphic editors (for example, Photoshop) block the processing of images bearing their watermarks.
Applications of Copyright Protection Schemes
Besides the protection of content, information hiding technologies find application in other spheres:
- Control of copying equipment. Color copiers (for example, Xerox) embed invisible yellow dots (a machine identification code) containing the serial number and the date, which allows the source of forged documents or banknotes to be traced.
- Medicine. Embedding patient data directly into digital X-ray images, in order to exclude the risk of separating the image from its medical history.
- Automation of purchases. Radio stations can transmit hidden metadata about a track, allowing the listener automatically to order a CD he has liked.
Policy
The introduction of DRM provoked acute political and legal debates. Laws such as the DMCA in the USA and EU directives gave rightsholders legal protection for DRM mechanisms. This led to copyright laws being used not only to combat piracy, but also to block phishing, to prohibit the refilling of cartridges and to control competition.
The Intellectual Property Lobby
The modern "IP lobby" was born not in Hollywood, but in the pharmaceutical industry. In the 1970s the company Pfizer and other drug manufacturers lobbied for the extension of patent protection in developing countries (Brazil, India).
Later they were joined by the music and film industries, as well as by manufacturers of luxury goods. This coalition achieved the adoption of international agreements (TRIPS in 1994 and the WIPO treaties in 1996), which effectively imposed rigid IP protection standards on the whole world under threat of trade sanctions.
However, over time the public became aware of the threats that these laws carry for freedom of speech, for libraries and for the right to privacy. The lobby lost part of its influence. For example, attempts in France to pass a law placing responsibility for piracy on internet providers provoked mass indignation.
In addition, the problem of the preservation of the digital heritage arose. If physical books are kept for centuries, digital files require constant expenditure on the migration of formats. Since the laws prohibit the bypassing of DRM even for archiving, libraries face legal barriers when preserving the cultural heritage.
Who Wins?
In 2005 the economist Hal Varian predicted that the strengthening of DRM would bring more benefit to the manufacturers of platforms (Apple, Microsoft) than to the creators of content (music labels).
Economic theory says that in the value chain the side that possesses greater market concentration and creates a "lock-in" effect wins. The music industry turned out to be dispersed, whereas Apple was able to create a closed ecosystem (iTunes + iPod), obtaining the main profit.
Hollywood, trying to avoid the fate of the music labels, is trying itself to become the "owner of the platform", introducing such mechanisms as SPDC in Blu-ray in order to control not simply the content, but the playback devices themselves.
Accessory Control
One of the most controversial consequences of DRM became the use of cryptography for accessory control. Manufacturers began to embed authentication chips into consumables in order to block the use of third-party or refilled cartridges.
- Printers. If a printer detects a non-original cartridge, it may imperceptibly reduce the print quality to 300 dpi or refuse to work altogether. Regional encoding is also applied: ink bought in the USA will not work in a printer bought in the UK.
- Game consoles and telephones. Companies (Sony, Motorola) use cryptographic chips in batteries and memory modules in order to prevent the use of non-original components.
- Automobiles. Car manufacturers (for example, Volkswagen) are considering the introduction of systems under which the car will authenticate spare parts, not allowing cheap analogues to be used.
The legal and economic aspect.
Attempts to regulate this at the level of environmental laws (for example, the WEEE directive in the EU) ran up against the lobbying of manufacturers and produced no result. In the USA the courts (for example, the case of Lexmark versus Static Control) considered the questions of whether the use of the DMCA to block competitors violates antitrust legislation.
The economist Hal Varian notes that if the market is competitive, accessory control simply shifts the costs onto the consumer. But if the market is monopolized, such practices become an instrument of unfair competition and of the infringement of consumers' rights.
Conclusion
The technical protection of digital content and the management of rights is an extremely difficult task at the junction of technology, economics and politics.
- Technical complexity. A universal computer is by its nature capable of copying any bits. The creation of DRM systems that are simultaneously reliable, unobtrusive and resistant to attacks (such as geometric distortions or reverse engineering) requires colossal effort.
- Political complexity. Copyright laws are increasingly used not to protect creators, but to create artificial barriers, to control consumers and to suppress competition.
- The economic shift. Power in the value chain is shifting from the creators of content to the owners of platforms and devices.
For the security engineer the lessons from the field of DRM are obvious: complexity is the main enemy. Systems that try to control every aspect of the user's behavior inevitably generate vulnerabilities and provoke rejection. The future of information protection lies not in total control, but in finding a balance between security, convenience and the economic interests of all participants.