Internet Censorship

1. Overview of Internet censorship

이제 인터넷은 일상 속의 일부가 된 지 꽤 오래다. 가상환경이라는 말이 무색하게 우리 생활에 깊이 관여하면서 지역, 사회, 국가, 시공간을 초월하여 정보를 얻을 수 있는 편리한 도구로 자리잡았다.  하지만 무수히 많은 정보 중 다양한 이유로 (문화, 관례, 관습, 종교, 정치 등) 특정한 정보를 탐탁치 않게 생각하는 세력이 있고 이를 조직, 이익단체, 회사, 정당, 또는 국가차원에서 일반인이 쉽게 접근할 수 없도록 검열(censorship)하기 시작했다.

일반적으로 검열이란 단어, 이미지, 생각 등을 억제하는 그 자체 또는 방법까지 포함하는 의미라고 볼 수 있다. 온라인에서 Censorship은 기술적으로 네트워크 계층 상단에서 종종 이뤄진다. 인터넷 이전에는 유선전화 선로를 물리적으로 단절하거나 신호를 방해하는 형태로(radio jamming이나 broadcast disruption) 가능했었다. 가장 간편한 방법은 인터넷 라인을 끊어버리는 것이지만, 국가 차원의 망을 AS 단위로 완전히 통제하지 않는 이상 IP의 Packet switching 특성 때문에 routing 경로는 다양할 수 밖에 없도록 설계되어 있다.  TCP/IP를 표준으로 사용하는 현대의 censorship은 크게 IP Layer에서 IP를 차단하거나 경로를 강제 우회하는 방식, TCP Layer에서 접속을 방해하는 방식, DNS 프로토콜 동작을 오용하는 방식,  그리고 Application Layer에서 사실상 정보교환의 표준이 된 HTTP 프로토콜에서 URL 접근차단이나 우회 등으로 나눌 수 있다.

 

2. Censorship at IP Layer

IP 계층에서 접속제한은 두 가지로 볼 수 있다.

첫째는 IP 주소자체에 대한 접근통제 목록 (ACL; Access Control List)을 router나 방화벽(firewall) 등 가능한 장비에 설정하는 방식이다. Router에서 Blackhole routing 설정도 같은 맥락이다. 이는 상당히 간편한 configuration으로 – CIDR (Classless Inter-Domain Routing) 등을 통해 – IP mapping이 가능하다는 장점이 있으나, 해당 IP를 일일히 조회해야 하는 번거로움이 있다. 설령 이를 자동화한다 해도 IP 자체 Blocking은 의도치 않게 개별이 아닌 NAT를 사용하는 조직이나 기관 단위 전체가 대상이 되어 버릴 수도 있고, Proxy를 통한 우회도 매우 쉽다. 또한 복수 개의 Host가 하나의 IP를 사용하는 경우에도 원하지 않는 차단이 이뤄질 수 있다. 영국같은 경우 해적 사이트의 경우 Proxy까지 아예 막기 시작했다. (관련기사)

둘째는 BGP (Border Gateway Protocol)를 이용해 주변 AS (Autonomous system)가짜 경로 정보(bogus route)를 뿌리는(advertise) 방식이다. 비록 의도하지 않았지만, 가장 악명높은 BGP 오용 사례 중 하나는 파키스탄 정부가 소유한 국영통신업체 PTA (Pakistan Telecommunication Authority)에서 특정 IP를 단속하고자 Youtube가 소유한 한 C Class 단위의 IP 대역을 neighbor AS에 가짜 정보를 흘린 (hijacking) 사고다. 당시 Youtube는 208.65.153.0/22 대역을 소유하고 있었는데, PTA AS (17557)에서 해당 IP대역 24 bit가 본인이 소유하고 있다고 거짓으로 알렸고 (announce), 이 정보를 받은 AS가 인접 AS에 퍼뜨리면서 수 분 내로 전 세계의 Youtube 트래픽 (AS 36561) 이 PTA로 몰리기 시작했다. 물론 PTA는 해당 IP를 블랙홀 처리했기 때문에 당연히 접속히 불가능했다. 아래 동영상을 보면 어떻게 해당 route 정보가 전파되었는지 알 수 있다. 시간대별로 세부 정보는 여기에서 확인할 수 있다.

우리나라 또한 인터넷 검열에서 자유롭지 못하다. 여기 Wikipedia에  국가별 검열 현황이 잘 나타나 있다. 정치/종교/이해관계/문화/사회 등 여러 가지 이유로 censorship을 시행하고 있지만,  당장 옮고 그름으로 판단하기 어려워 보인다. 마지막으로 Netsweeper에서 제공하는 Deny Page Tests에서 어떤 URL이 Filtering되고 있는지 테스트해 보면 어떨런지.

[Paper Review] A Look Back at “Security Problems in the TCP/IP Protocol Suite”

Title A Look Back at “Security Problems in the TCP/IP Protocol Suite” [Link]
Author Steven M. Bellovin Email bellovin@acm.org
Publishing 20th Annual Computer Security Application Conference “classic paper” (ACSAC)AT&T Labs – Research Year 2004
Abstract About fifteen years ago, I wrote a paper on security problems in the TCP/IP protocol suite, In particular, I focused on protocol-level issues, rather than implementation flaws. It is instructive to look back at that paper, to see where my focus and my predictions were accurate, where I was wrong, and where dangers have yet to happen. This is a reprint of the original paper, with added commentary.
Summary  Security issues & Defenses

Issues Sub Problems/Possible Attacks Defenses/Countermeasures
TCP Sequence
Number Prediction
1. Makes “r” possibly execute malicious commands2. Generates queue overflows so that trusted client lost messages (DoS)3. Further session hijacking attack 1. A cryptographic hash function to create a separate sequence number space for each  “connection”, a connection being defined per RFC791 as the unique 4-tuple <localhost, localport, remotehost, remoteport>.2. Random ISN generation à negative effects on the correctness of TCP in the presence of duplicate packets, the sum of a sequence

of random increments will have a normal distribution, which implies that the actual range

of the ISNs is quite small with Central limit theorem (CERT CA-2001-09)

Routing Issues Source
Routing
1. Addr-based authentication 1. Configure routers to reject external packets2. Use firewall,3. Reject src-routed packets at border routers
RIP Attack 1. No authentication allows an intruder to send bogus routing info, whose entries are visible widely2. AS 7007 attack3. Spammers hijack route, inject spam, and then withdraw the route. 1. Filter out packets with bogus source. (Network ingress filtering)
EGP 1. Impersonates a second E/G for AS2. Claims reachability for some network where the real GW is down. 1. Reasonably secure due to restricted topologies, but now BGP
ICMP 1. ARP Spoofing 1. Includes plausible sequence number2. ICMP redirect disabled
“Authentication” Server 1. Do not use it
Applications Finger 1. Displaying useful info. about users 1. Firewall blocks the finger protocol
Email(POP) 1. Use encryption mode – SSL
DNS 1. DNS Sequence number attack2. Intercepts virtually all requests to translate names to IP addresses, and supply the address of a subverted  machine instead3. DNS Zone transfer (AXFR): no authentication on the request 1. DNSSec provides digitally signed resource records
FTP 1. FTP authentication in plaintext2. Anonymous FTP – bounce attack 1. Cryptographic protection for FTP
SNMP 1. No authentication reveals MIB 1. Use community string (simple plaintext pass)2. SNMPv3 defines user-based security model which provides cryptographic authentication
Remote Booting 1. RARP with TFTP2. BOOTP with TFTP3. Impersonate the server and send false DATA packets 1. 4 byte random transaction id2. DHCP
Trivial Attacks 1. LAN vulnerable to eavesdropping (ARP poisoning, smurf attack)2. TFTP with no authentication3. Reserved Ports

Comprehensive Defenses: Authentication, Encryption, Trusted Systems

Note This paper covers a general idea of overall security problems in TCP/IP suite. It also provides a lot of references to see countermeasures of certain issues at a glance.This paper is based on what the author wrote original paper back in 1989. It reviews different types of protocol flaws itself and possible attacks from TCP sequence guessing, routing protocol issues to application layer protocols such as finger, POP3, SNMP, DNS, and FTP. Also he corrected wrong descriptions in previous paper if any as well as defense techniques and their limitations against such attacks.

Diffie-Hellman Key Exchange Implementation Sample in Python

diffiehellman

뭐 새삼스러울 거 없지만, 예전에 python으로 구현해 봤던 Diffie-Hellman Key 교환 알고리즘 Class다. 표준으로 사용하는 SSL/TLS는 RSA를 적용해 Public/Private Key를 생성하고 인증서를 발급하면 된다. 사실 Cipher Spec에 있는 key exchange는 더 많지만, 여전히 DH은 건재(?)하다.

There is nothing new, but here is a simple sample python script for Diffie-Hellman key exchange. (NO RSA included)