1. 소개

Solaris Kernel은 TCP/IP스택에 여러가지 사용자 인터페이스를 제공한다. Cache 테이블의 Lifetime 및 다수의 TCP 연결에 대한 여러가지 옵션을 통하여 Kernel Parameter의 설정 및 제어가 가능하다. 하지만 이러한 Kernel Parameter들을 Tunning하기 위하여 각각의 kernel parameter들에대한 정확한 기능들의 이해가 반드시 요구되어진다. 그리고 많은 시스템관리자들은 이러한 Kernel Parameter들을 사용 및 설정하는 등의 일련의 Security 업무에 소홀히 해왔다. 이 보고서에서는 solaris에서 제공되어지는 Network Security Kernel들에 관련하여 올바르게 이해해고 설정하여 Tunning하는 방법을 소개하고자 한다.

2. Solaris Kernel Tools

solaris에서는 TCP/IP 커널에 대한 드라이버로서 "ndd"가 유일한 도구이며 Solaris 시스템의 네트워크 커널 변수들을 Tunning하기 위한 가장 유용한 Tool이 "ndd"이다.

3. Solaris 네트워크 커널 변수들

일반적으로 TCP/IP 커널에 대한 변수들을 보는 방법은 다음과 같은 명령어를 실행함으로써 가능하다.

# ndd /dev/

여기서 TCP/IP 커널에 대하여 는 ARP, IP, TCP, UDP중에 하나이며 각각의 드라이버에 대하여 모든 변수들을 보는 명령어는 다음과 같다.

# ndd /dev/ \?

IP 드라이버에 대한 명령어를 실행하면 다음과 같이 출력된다.

[phoenix:root]:/ >ndd /dev/ip \?

? (read only)

ip_forwarding (read and write)

ip_respond_to_address_mask_broadcast(read and write)

ip_respond_to_echo_broadcast (read and write)

ip_respond_to_timestamp (read and write)

ip_respond_to_timestamp_broadcast(read and write)

ip_send_redirects (read and write)

ip_forward_directed_broadcasts(read and write)

ip_debug (read and write)

ip_mrtdebug (read and write)

ip_ire_cleanup_interval (read and write)

ip_ire_flush_interval (read and write)

ip_ire_redirect_interval (read and write)

ip_def_ttl (read and write)

ip_forward_src_routed (read and write)

ip_wroff_extra (read and write)

ip_ire_pathmtu_interval (read and write)

ip_icmp_return_data_bytes (read and write)

ip_send_source_quench (read and write)

ip_path_mtu_discovery (read and write)

ip_ignore_delete_time (read and write)

ip_ignore_redirect (read and write)

ip_output_queue (read and write)

ip_broadcast_ttl (read and write)

ip_icmp_err_interval (read and write)

ip_reass_queue_bytes (read and write)

ip_strict_dst_multihoming (read and write)

ip_addrs_per_if (read and write)

ip_ill_status (read only)

ip_ipif_status (read only)

ip_ire_status (read only)

ip_ipc_status (read only)

ip_rput_pullups (read and write)

ip_enable_group_ifs (read and write)

ndd를 사용하여 커널 변수를 설정하기 위하여는 다음과 같이 명령어를 실행하면 된다.

# ndd -set /dev/

ndd를 사용하여 커널 변수를 변경할때는 주의하여야 할 사항이 있다. 한번 설정된 parameter는 시스템을 재부팅할 경우에는 이전에 설정된 값이 원래의 기본설정값으로 변경된다는 점이다. 설정된 값을 계속적으로 사용하기 위해서는 시스템 관리자가 shell script등을 이용해서 시스템 부팅시 자동으로 시스템관리자가 원하는 설정값으로 설정되게 운영하여야 많다. 예를들어 /etc/init.d/inetinit나 개별적인 shell script로 운영하여야만 한다.

4. ARP (Address Resolution Protocol)

ARP는 Layer3의 네트워크 주소를 data-link 주소(MAC Address)로 동적 맵핑(mapping)하는데 사용된다. 하나의 시스템이 한 네트워크 상에서 다른 시스템과 통신하고자 한다면 broadcast주소인 ff:ff:ff:ff:ff:ff로 ARP 패킷을 첫번째로 보낸다. 그 패킷은 단순한 패킷으로서 해당 주소를 어떤 시스템이 사용하고 있는지에 대한 질의 패킷이다. 예를 들어 누가 주소 A를 사용하고 있느지에 대하여 ARP패킷을 broadcast하면, 한 network 상에 존재하는 모든 호스트들이 이 패킷을 수신하게 된다. 이때 시스템 A는 ARP 요구에 대한 응답으로서 답을 보내게된다. ARP Broadcast패킷을 보냈던 해당 시스템은 32bit IP주소를 layer-2인 MAC주소로 매핑하면서 table과 cache를 구성하여 운영하게 된다. 이때 해당 시스템은 network layer에의한 두번째 테이블을 구성하게 된다. 이 테이블은 data-link layer에의해 제공되어지는 정보로부터 구성되어지며, 활성화된 연결에대한 네트워크 라우팅 정보를 포함하고 있다. network layer는 data-link layer로부터 MAC주소를 요청하며, 요청된 결과로부터 수신된 이러한 주소를 네트워크 라우팅 테이블에 저장되어진다. Network layer의 정보는 20분 후에 만료된다.

하나의 네트워크에서 호스트는 다른 시스템과 통신하기 우히아여 첫번째로 IP layer의 ARP cache를 체크한다. 이때 네트워크 peer에대한 엔트리가 cache에 존해하지 않으면 ARP 요청이 broadcast되어 진다. ARP Cache 엔트리는 5분후에 만료된다. ARP Cache를 이용한 공격은 두가지 종류가 있다. 하나는 ARP cache poisoning이며 다른 하나는 ARP spoofing이다.

ARP cache poisoning은 존재하지 않는 ARP주소나, 잘못된 ARP주소를 시스템의 ARP cache에 삽입시키는 것이다. 이것은 target시스템이 peer의 IP주소로 패킷을 보내지만 MAC주소가 잘못되어 있기때문에 해당 시스템으로 하여금 서비스 거부를 일으킬수 있다,

ARP spoofing은 system compromise결과를 초래할 수 있다. IP spoofing처럼 ARP spoofing은 네트워크상에 존재하는 하나의 호스트를 네트워크 기능을 정상적으로 처리하지 못하게 해서 모든 ARP 요청 broadcast에 대한 응답을 못하도록 한다. 이것이 행해지기만 하면 공격자는 무능력해진 호스트의 IP주소를 공격 호스트로서 구성하여 사용할 수가 있게 되어진다. 피해 호스트가 무능력해진 호스트와 통신하려 할때 공격자의 시스템이 모든 ARP broadcast의 요청에 응답하게 된다. 이렇게 하면 그것의 MAC주소가 피해시스템의 ARP Cache에 저장되어지게 되서 피해시스템은 disable된 시스템이 공격자의 시스템으로 알게되서 공격시스템과 피해시스팀과의 정상적인 통신이 가능하게 되어진다.

ARP 공격에 대응하기는 매우 어렵다. ARP공격에 대한 한가지 대응방법은 cache 엔트리의 lifetime을 줄이는 것이다. cache lifetime은 네트워크 커널 변수인 arp_cleanup_interval에 의하여 결정되어 진다. IP routing 테이블 엔트리의 lifetime은 커널 변수인 ip_ire_flush_interval에 의해서 조정되어 질 수 있다. 이에 대한 커널 변수는 다음과 같은 명령어의 실행에 의해서 가능하다.

# ndd -set /dev/arp arp_cleanup_interval
2005/07/05 14:02 2005/07/05 14:02

트랙백 주소 :: 이 글에는 트랙백을 보낼 수 없습니다