[13249] 2018-10-01_ThinkPHP5.1.xSQL注入漏洞分析

文档创建者:s7ckTeam
浏览次数:12
最后更新:2025-01-18
2018-10-01_ThinkPHP5.1.xSQL注入漏洞分析 T h i n k P H P   5 . 1 . x   S Q L a l p h a l a b   F r e e B u f   2 0 1 8 - 1 0 - 0 1 T h i n k P H P     M V C     P H P     A p a c h e 2   T h i n k P H P   W E B     A P I   T h i n k P H P   S Q L S Q L 广   1 . 1   T h i n k P H P 5 . 1 . 2 3 S Q L o r d e r   b y   k e y 1 . 2   T h i n k P H P   <   5 . 1 . 2 3 1 . 3   C V E - 2 0 1 8 - 1 6 3 8 5 1 . t h i n k p h p 5 . 1 . x t h i n k p h p 5 . 1 . x G i t h u b C o m p o s e r G i t C o m p o s e r   L i n u x     M a c   O S   X     W i n d o w s     C o m p o s e r - S e t u p . e x e   W E B t p 5 . 1 t h i n k 5 . 1 . 1 2 . 访 访     c u r l   - s S   h t t p s : / / g e t c o m p o s e r . o r g / i n s t a l l e r   |   p h p m v   c o m p o s e r . p h a r / u s r / l o c a l / b i n / c o m p o s e r c o m p o s e r c r e a t e - p r o j e c t   t o p t h i n k / t h i n k = 5 . 1 . 1   t p 5 . 1   - - p r e f e r - d i s t
3 . D e m o D e m o T e s t . p h p / t p 5 . 1 / a p p l i c a t i o n / i n d e x / c o n t r o l l e r / 4 . D e m o u s e r ( i d ) / t h i n k p h p / l i b r a r y / t h i n k / d b / B u i l d e r . p h p   p a r s e O r d e r ( ) D e m o o r d e r $ o r d e r f o r e a c h $ o r d e r k e y v a l u e
p a r s e O r d e r F i e l d ( ) $ v a l p a r s e O r d e r F i e l d ( ) p a r s e O r d e r F i e l d ( ) g e t O p t i o n s ( ) g e t F i e l d s B i n d ( ) f o r e a c h $ v a l $ v a l $ k e y $ v a l   $ k e y $ k e y # $ v a l p a r s e K e y ( ) p a r s e K e y ( ) $ k e y 1 .   i s _ n u m e r i c 2 .   $ k e y E x p r e s s i o n 3 .   s t r p o s ( $ k e y ,   - > )   & &   f a l s e   = = = s t r p o s ( $ k e y ,   ( )   4 .   ( *   ! =   $ k e y   & &   ( $ s t r i c t   | | ! p r e g _ m a t c h ( / [ , ' " * ( ) ` . s ] / ,   $ k e y ) ) ) $ k e y s q l 1 . 2 . 3 4
$ k e y   `   $ t a b l e $ k e y   `   $ k e y $ v a l f i e l d r e t u r n a r r a y a r r a y o r d e r   b y   o r d e r   b y q u e r y ( ) f i e l d f i e l d ( ) M y S Q L f i e l d ( ) S Q L o r d e r   b y   使 1 f i e l d ( ) 2 f i e l d   ` `     ,
f i e l d ( ) P a y l o a d p a y l o a d 1 . $ o r d e r 2 . $ v a l   3 . 4 .   `   P a y l o a d d e b u g p a y l o a d d e b u g h t t p : / / 1 2 7 . 0 . 0 . 1 / t p 5 . 1 / p u b l i c / i n d e x / t e s t / i n d e x ? o r d e r [ i d ` , 1 1 1 ) | u p d a t e x m l ( 1 , c o n c a t ( 0 x 3 a , u s e r ( ) ) , 1 ) % 2 3 ] [ ] = 1 h t t p : / / 1 2 7 . 0 . 0 . 1 / t p 5 . 1 / p u b l i c / i n d e x / t e s t / i n d e x ? o r d e r [ i d ` , ' a a a ' ) |   u p d a t e x m l ( 1 , c o n c a t ( 0 x 3 a , u s e r ( ) ) , 1 ) % 2 3 ] [ ] = 1
$ v a l p a r s e O r d e r F i e l d ( ) F 7 p h p s t o r m F 7 f o r e a c h $ v a l $ k e y $ k e y $ v a l   $ k e y : d a t a _ _ 0 F 7 p a r s e K e y ( ) $ k e y i f   `  
$ k e y   `     a r r a y f i l e v a l F 7 l i m i t u n i o n r e m o v e o p t i o n ( )
$ s q l s q l s q l q u e r y ( ) S Q L T h i n k P H P 5 . 1 . 2 4 h t t p s : / / g i t h u b . c o m / t o p - t h i n k / f r a m e w o r k / c o m m i t / f 0 f 9 f c 7 1 b 8 b 3 7 1 6 b d 2 a b d f 9 5 1 8 b c d f 1 8 9 7 b b 7 7 6 * a l p h a l a b F r e e B u f . C O M

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

本版积分规则