Skip to content

Zip bomb

zip 폭탄(zip bomb), 죽음의 zip(zip of death), 압축 해제 폭탄(decompression bomb)은 프로그램이나 시스템이 읽을 때 충돌하거나 뻗어버리게 만드는 악의적인 컴퓨터 압축 파일이다. 이 파일은 전통적인 방식의 바이러스가 침입하기 편하게 바이러스 검사 소프트웨어를 꺼버리는 역할을 한다.

이 프로그램은 정상적인 컴퓨터 동작을 방해하지 않으며 겉보기에는 평범한 ZIP 파일이다. 하지만 만일 바이러스 검사 소프트웨어가 검사하려 시도하는 등 이 파일의 압축을 해제하려 시도할 경우 엄청난 양의 하드디스크 용량과 메모리 용량이 필요하다.

현대 바이러스 검사 소프트웨어는 zip 파일이 zip 폭탄인지 아닌지 감별하며, 폭탄인 경우에는 압축을 풀지 않는 과정이 포함되어 있다.

Details

zip 폭탄은 사용자의 의심을 피하기 위해 압축된 상태의 용량은 작다. 그러나, 이 파일의 압축을 풀려 할 때 파일의 용량은 시스템이 버틸 수 있는 한도를 초과해 버린다. 이 기술은 과거 전자 게시판 전화 접속 시절에 이용하였다.

zip 폭탄의 대표적인 예로 42.zip 파일이 있다. 이 파일은 압축된 상태에서는 42KB이나, 이 압축된 파일은 안에 압축된 파일 16개가 각각 5겹으로 16개씩 존재한다. 가장 마지막 층에는 4.3GB(4 294 967 295 bytes)짜리 파일이 1개 있으며, 압축을 풀 경우 전체 파일의 용량은 3.99PB(4 503 599 626 321 920 Bytes)가 된다. 이 파일은 다양한 웹 사이트에서 다운로드 받을 수 있다. 많은 바이러스 검사 소프트웨어에서는 버퍼 오버플로, 메모리 부족, 프로그램 액세스 허용 시간 초과를 일으키는 공격을 막기 위해 반복되는 몇겹만 추출하여 검사한다.

zip 폭탄은 극단적인 압축률을 이루기 위해 파일 대부분이 반복되는 문구열인 경우가 많다. 이러한 파일을 압축하기 위하여 단 하나의 파일만이 각 재귀적인 층을 따라가고 기하급수적인 효율성을 이루기 위해 동적 프로그래밍 방법을 이용하기도 한다.

또한, 압축을 풀 때 스스로를 복제하는 방식으로 이루어져 있는 zip 파일도 있다.

2019년 7월 2일, 재귀적인 방법을 사용하지 않으면서 파일 헤더와 내용을 서로 겹쳐 쓰는 방식으로 작성한 zip 폭탄이 제시되었다. 이 파일은 압축 상태에서 10MB 정도이지만 압축을 풀면 281TB의 파일이 한꺼번에 튀어나온다.

Zip Bomb 생성 방법

dd if=/dev/zero bs=1G count=10 | gzip -c > 10GB.gz  
  • /dev/zero로 10GB의 0 바이트 데이터를 생성한 후 gzip으로 압축.
  • 결과물은 약 10MB 크기의 zip bomb.

서버 적용 예시

미들웨어에서 IP 블랙리스트 또는 악성 패턴을 감지하면 Zip Bomb 전송.

if (ipIsBlackListed() || isMalicious()) {  
    header("Content-Encoding: deflate, gzip");  
    header("Content-Length: "+ filesize(ZIP_BOMB_FILE_10G));  
    readfile(ZIP_BOMB_FILE_10G);  
    exit;  
}  

Table of Information Security

Table of Information Security

Related security categories

Computer security, Automotive security, Cybercrime (Cybersex trafficking, Computer fraud), Cybergeddon, Cyberterrorism, Cyberwarfare, Electronic warfare, Information warfare, Internet security, Mobile security, Network security, Copy protection, Digital rights management

Threats

Adware, Advanced persistent threat, Arbitrary code execution, Backdoors, Bombs (Fork, Logic, Time, Zip), Hardware backdoors, Code injection, Crimeware, Cross-site scripting, Cross-site leaks, DOM clobbering, History sniffing, Cryptojacking, Botnets, Data breach, Drive-by download, Browser Helper Objects, Viruses, Data scraping, Denial-of-service attack, Eavesdropping, Email fraud, Email spoofing, Exploits, Fraudulent dialers, Hacktivism, Infostealer, Insecure direct object reference, Keystroke loggers, Malware, Payload, Phishing (Voice), Polymorphic engine, Privilege escalation, Ransomware, Rootkits, Scareware, Shellcode, Spamming, Social engineering, Spyware, Software bugs, Trojan horses, Hardware Trojans, Remote access trojans, Vulnerability, Web shells, Wiper, Worms, SQL injection, Rogue security software, Zombie

Defenses

Application security (Secure coding, Secure by default, Secure by design (Misuse case)), Computer access control (Authentication, (Multi-factor authentication), Authorization), Computer security software (Antivirus software, Security-focused operating system), Data-centric security, Software obfuscation, Data masking, Encryption, Firewall, Intrusion detection system (Host-based intrusion detection system (HIDS), Anomaly detection), Information security management (Information risk management, Security information and event management (SIEM)) Runtime application self-protection, Site isolation

See also

  • Zip
  • 빌리언 러프(Billion laughs) - XML 파서에서의 비슷한 공격
  • 메일 폭탄
  • 논리 폭탄
  • 포크 폭탄
  • 비지 비버 - 종료하기 전까지 최대한 많은 출력물을 만들어내는 프로그램

Favorite site