°Ô½Ã¹° 17°Ç
   
[RHEL7.4] ping ¸í·É¾î ¾ÈµÉ¶§ [ setcap / getcap ]
±Û¾´ÀÌ : ´õÄÚ ³¯Â¥ : 2018-12-26 (¼ö) 10:12 Á¶È¸ : 4767


1. ¹®Á¦Á¡

root# ping 127.0.0.1 
socket: Permission denied    

ÀÌ¿Í °°ÀÌ ping ÀÌ ¾ÈµÈ´Ù. (³»°¡ °æÇèÇÑ°Ç root´Â µÇ°í ÀϹÝÀ¯Àú°¡ ¾ÈµÊ)


2. È®ÀÎ ¹æ¹ý

1) ls -l /usr/bin/ping
-rwxr-xr-x. 1 root root 66168 May 22  2017 /usr/bin/ping

2) # getcap /usr/bin/ping
/usr/bin/ping = cap_net_admin,cap_net_raw+p

ÀÌ¿Í °°ÀÌ ¾ÈµÇ¾îÀÖ´Ù¸é ¼³Á¤À» ÇؾßÇÑ´Ù. 

setcap cap_net_raw+ep /usr/bin/ping



Âü°í»çÇ× : ping À» ÇÒ¶§´Â ÀÏ¹Ý À¯Àúµµ root±ÇÇÑÀ» ȹµæÇÏ¿© ÇÏ´Â ÀÛ¾÷ÀÌ´Ù. 
±×·¡¼­ setuid ³ª 2¹ø°ú °°Àº ¼³Á¤ÀÌ µÇ¾îÀÖ¾î¾ßÇÑ´Ù.


´õÄÚ 2018-12-26 (¼ö) 13:58
TEST ¹æ¹ý

ping -s 9000 -c 2 -I Source_IP  Target_IP
ping -s 1500 -c 2 -I Source_IP  Target_IP

ping -s 1500 -c 2 -I Source_IP  Target_IP
À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com