[14276] 2019-06-26_企业威胁情报平台建设之暗网监控

文档创建者:s7ckTeam
浏览次数:6
最后更新:2025-01-18
2019-06-26_企业威胁情报平台建设之暗网监控 s h y s t a r t r e e   F r e e B u f   2 0 1 9 - 0 6 - 2 6 使 使 T o r 访 访 1 2 3 0 6 访 u b u n t u   1 8 . 0 4 ( ) T o r P r i v o x y 访   2 . 1   P r i v o x y h t t p s o c k s 5 T o r s o c k s 5 T o r 访   1 . o n i o n P r i v o x y 8 1 1 8 访 h t t p   2 . P r i v o x y h t t p T o r T o r T o r T o r . o n i o n 2 . 2   T o r s u d o   a p t - g e t   i n s t a l l   t o r T o r v 2 访 使   T o r   v 2 T o r   v 3   1 . S H A 1 / D H / R S A 1 0 2 4 S H A 3 / e d 2 5 5 1 9 / c u r v e 2 5 5 1 9 2 . T o r   d i r e c t o r y   p r o t o c o l 3 . s h a 3 4 . v 3 T o r 1 . / e t c / a p t / s o u r c e s . l i s t 2 . g p g 3 . T o r 4 . T o r T o r 0 . 3 . 5 . 8 r o o t @ 5 3 6 e f 9 9 c a b 9 4 : / #   c a t   / e t c / i s s u e . n e t U b u n t u   1 8 . 0 4 . 2   L T S d e b   h t t p s : / / d e b . t o r p r o j e c t . o r g / t o r p r o j e c t . o r g   b i o n i c   m a i n d e b - s r c   h t t p s : / / d e b . t o r p r o j e c t . o r g / t o r p r o j e c t . o r g   b i o n i c   m a i n c u r l   h t t p s : / / d e b . t o r p r o j e c t . o r g / t o r p r o j e c t . o r g / A 3 C 4 F 0 F 9 7 9 C A A 2 2 C D B A 8 F 5 1 2 E E 8 C B C 9 E 8 8 6 D D D 8 9 . a s c   |   g p g   - - i m p o r t g p g   - - e x p o r t   A 3 C 4 F 0 F 9 7 9 C A A 2 2 C D B A 8 F 5 1 2 E E 8 C B C 9 E 8 8 6 D D D 8 9   |   a p t - k e y   a d d   - a p t   u p d a t e a p t   i n s t a l l   t o r   d e b . t o r p r o j e c t . o r g - k e y r i n g r o o t @ 5 3 6 e f 9 9 c a b 9 4 : / #   t o r   - v
2 . 3   T o r T o r / e t c / t o r / t o r r c / e t c / t o r / t o r s o c k s . c o n f   / e t c / t o r / t o r s o c k s . c o n f s o c k s T o r   / e t c / t o r / t o r r c T o r h t t p p o l i p o p r i v o x y p i d g i n l r s s i T o r D N S   T o r v 3 / e t c / t o r / t o r r c s e r v i c e   t o r   s t a r t t o r T o r 2 . 4   P r i v o x y a p t - g e t   i n s t a l l   p r i v o x y   P r i v o x y h t t p T o r / e t c / p r i v o x y / c o n f i g s e r v i c e   p r i v o x y   r e s t a r t 2 . 5   T o r 使 m e e k - a z u r e 访 访 T o r i p 1 1 . 1 1 . 1 1 . 1 1   访 访 访 m e e k - a z u r e 1 7 8 . 1 7 5 . 1 3 2 . 2 2 5 T o r r o o t @ 5 3 6 e f 9 9 c a b 9 4 : / #   t o r   - v J u n   1 8   1 4 : 3 0 : 4 3 . 5 3 0   [ n o t i c e ]   T o r   0 . 3 . 5 . 8   r u n n i n g   o n   L i n u x   w i t h   L i b e v e n t   2 . 1 . 8 - s t a b l e ,   O p e n S S L   1 . 1 . 1 ,   Z l i b   1 . 2 . 1 1 ,   L i b l z m a   5 . 2 . 2 ,   a n d   L i b z s t d   1 . 3 . 3 . J u n   1 8   1 4 : 3 0 : 4 3 . 5 3 1   [ n o t i c e ]   T o r   c a n ' t   h e l p   y o u   i f   y o u   u s e   i t   w r o n g !   L e a r n   h o w   t o   b e   s a f e   a t   h t t p s : / / w w w . t o r p r o j e c t . o r g / d o w n l o a d / d o w n l o a d # w a r n i n g J u n   1 8   1 4 : 3 0 : 4 3 . 5 3 1   [ w a r n ]   C o m m a n d - l i n e   o p t i o n   ' - v '   w i t h   n o   v a l u e .   F a i l i n g . J u n   1 8   1 4 : 3 0 : 4 3 . 5 3 1   [ e r r ]   R e a d i n g   c o n f i g   f a i l e d - - s e e   w a r n i n g s   a b o v e . H i d d e n S e r v i c e D i r   / v a r / l i b / t o r / o t h e r _ h i d d e n _ s e r v i c e / H i d d e n S e r v i c e P o r t   8 0   1 2 7 . 0 . 0 . 1 : 8 0 H i d d e n S e r v i c e V e r s i o n   3 f o r w a r d - s o c k s 5   /   1 2 7 . 0 . 0 . 1 : 9 0 5 0   l i s t e n - a d d r e s s   0 . 0 . 0 . 0 : 8 1 1 8     ~   c u r l   - x   1 1 . 1 1 . 1 1 . 1 1 : 8 1 1 8   h t t p s : / / h t t p b i n . o r g / i p {     " o r i g i n " :   " 1 7 8 . 1 7 5 . 1 3 2 . 2 2 5 ,   1 7 8 . 1 7 5 . 1 3 2 . 2 2 5 " }
访 T o r + 访 2 4 3 . 1   j s 1 . R e f e r e r 2 . C o o k i e 3 . U s e r - A g e n t 4 . 5 . h t m l 3 . 2   3 . 1 1 . r e f e r e r 访 2 . C o o k i e 使 R e d i s u r l 3 . U s e r - A g e n t F i r e F o x { U s e r - A g e n t :   M o z i l l a / 5 . 0   ( W i n d o w s   N T   6 . 1 ;   r v : 6 0 . 0 )   G e c k o / 2 0 1 0 0 1 0 1   F i r e f o x / 6 0 . 0 } 4 . 使 o c r t e s s e r a c t 5 . 3 . 3   S c r a p y P y t h o n S c r a p y S c r a p y   S c r a p y 3 . 2 3 . 4     S c r a p y c l a s s   D a r k w e b S p i d e r D o w n l o a d e r M i d d l e w a r e ( o b j e c t ) :         d e f   p r o c e s s _ r e q u e s t ( s e l f ,   r e q u e s t ,   s p i d e r ) :                 r e q u e s t . m e t a [ ' p r o x y ' ]   =   ' h t t p : / / 1 1 . 1 1 . 1 1 . 1 1 : 8 1 1 8 ' f o r   a c c o u n t s   i n   A c c o u n t s :         c o u n t   =   0         t r y :                 l o g g i n g . i n f o ( ' A c c o u n t   % s   i s   l o g i n i n g   . . . . . . '   %   a c c o u n t s )                 c o o k i e ,   s i d   =   g e t _ C o o k i e S i d ( a c c o u n t s ,   ' T e s t t e s t ' )                 _ _ i _ _   =   { ' c o o k i e ' :   c o o k i e ,   ' s i d ' :   s i d }                 #   p r i n t ( _ _ i _ _ )
r e f e r e r U s e r - A g e n t                 #   p r i n t ( _ _ i _ _ )                 l o g g i n g . i n f o ( ' A c c o u n t   % s   f i n i s h   l o g i n   ! '   %   a c c o u n t s )                 _ _ v a l u e _ _ . a p p e n d ( _ _ i _ _ )         e x c e p t   E x c e p t i o n   a s   e :                 l o g g i n g . e r r o r ( ' [ * ]   ! ' )                 c o u n t   + =   1                 i f ( c o u n t   >   7 ) :                         l o g g i n g . e r r o r ( ' [ * ]   ~ ' )                         r e t u r n                 c o n t i n u e c l a s s   D u p l i c a t e R e q u e s t M i d d l e w a r e ( o b j e c t ) :         # r e d i s         d e f   _ _ i n i t _ _ ( s e l f ) :                 s e l f . R e d i s Q u e r y   =   R e d i s O p e r a ( ' q u e r y ' )         # r e d i s u r l         d e f   p r o c e s s _ r e q u e s t ( s e l f ,   r e q u e s t ,   s p i d e r ) :                 s p i d e r . l o g g e r . i n f o ( ' d u p l i c a t i n g   > > > > > >   % s '   %   r e q u e s t . u r l )                 u   =   r e q u e s t . u r l                 i m p o r t   h a s h l i b                 i f   ' v p i c '   i n   r e q u e s t . u r l :                         b   =   u . i n d e x ( ' = ' )   +   1                         M D 5   =   h a s h l i b . m d 5 ( )                         M D 5 . u p d a t e ( b y t e s ( s t r ( b ) ,   ' u t f - 8 ' ) )                         i f   s e l f . R e d i s Q u e r y . q u e r y ( M D 5 . h e x d i g e s t ( ) ) :                                 s p i d e r . l o g g e r . i n f o ( ' d u p l i c a t e   > > > > > >   % s '   %   r e q u e s t . u r l )                                 r a i s e   I g n o r e R e q u e s t ( " I g n o r e R e q u e s t   :   % s "   %   r e q u e s t . u r l )                 e l s e :                         s p i d e r . l o g g e r . i n f o ( ' i g n o r e   d u p l i c a t e   > > > > > >   % s '   %   r e q u e s t . u r l )                         r e t u r n   N o n e L O G I N _ H E A D E R S   =   {         ' H o s t ' :   ' % s '   % l o a d ( ) [ ' d o m a i n ' ] . s p l i t ( ' , ' ) [ i n d e x ] ,         ' A c c e p t ' :   ' t e x t / h t m l , a p p l i c a t i o n / x h t m l + x m l , a p p l i c a t i o n / x m l ; q = 0 . 9 , * / * ; q = 0 . 8 ' ,         ' A c c e p t - E n c o d i n g ' :   ' g z i p ,   d e f l a t e ' ,         ' R e f e r e r ' :   ' h t t p : / / % s / i n d e x . p h p '   % l o a d ( ) [ ' d o m a i n ' ] . s p l i t ( ' , ' ) [ i n d e x ] ,         ' C o n t e n t - T y p e ' :   ' a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d ' ,         ' C o n n e c t i o n ' :   ' k e e p - a l i v e ' ,         ' U s e r - A g e n t ' :   ' M o z i l l a / 5 . 0   ( W i n d o w s   N T   6 . 1 ;   r v : 6 0 . 0 )   G e c k o / 2 0 1 0 0 1 0 1   F i r e f o x / 6 0 . 0 ' } d e f   p a r s e ( s e l f ,   r e s p o n s e ) :         i t e m   =   D a r k w e b S p i d e r I t e m ( )         s o u p   =   B e a u t i f u l S o u p ( r e s p o n s e . t e x t ,   ' l x m l ' )         #           t a b l e   =   s o u p . f i n d _ a l l ( n a m e   =   ' t a b l e ' ,   a t t r s   =   { ' c l a s s ' : ' v _ t a b l e _ 1 ' } )         t r _ l i s t   =   t a b l e [ 0 ] . f i n d _ a l l ( ' t r ' )         t d _ l i s t _ p r i c e   =   t r _ l i s t [ 4 ] . f i n d _ a l l ( ' t d ' )         p r i c e _ l i s t   =   r e . f i n d a l l ( r ' d + . ? d * ' ,   t d _ l i s t _ p r i c e [ 3 ] . g e t _ t e x t ( ) )         p r i c e   =   p r i c e _ l i s t [ 0 ]         #           t d _ l i s t _ v o l u m e   =   t r _ l i s t [ 6 ] . f i n d _ a l l ( ' t d ' )         v o l u m e _ l i s t   =   r e . f i n d a l l ( r ' d + ' ,   t d _ l i s t _ v o l u m e [ 3 ] . g e t _ t e x t ( ) )         v o l u m e   =   v o l u m e _ l i s t [ 0 ]         #           c o n t e n t _ l i s t   =   s o u p . f i n d _ a l l ( n a m e = ' d i v ' ,   a t t r s = { ' c l a s s ' :   ' c o n t e n t ' } )         i f   l e n ( c o n t e n t _ l i s t ) :                 c o n t e n t   =   c o n t e n t _ l i s t [ 0 ] . g e t _ t e x t ( )         e l s e :                 c o n t e n t   =   ' '         #   u r l         i m g _ l i s t   =   s o u p . f i n d _ a l l ( n a m e   =   ' i m g ' ,   a t t r s   =   { ' c l a s s ' : ' p o s t i m a g e ' } )         i t e m [ ' i m a g e _ u r l s ' ]   =   [ ]
G r a f a n a 4 . 3 M y S Q L 使 G r a f a n a 便 :         i t e m [ ' i m a g e _ u r l s ' ]   =   [ ]         i f   l e n ( i m g _ l i s t )   >   0   :                 u r l _ l i s t   =   [ ]                 f o r   i m g _ u r l   i n   i m g _ l i s t :                         i f   i m g _ u r l [ ' s r c ' ] . f i n d ( s e l f . i m a g e _ d o m a i n )   >   0 :                                 d o w n l o a d _ u r l   =   i m g _ u r l [ ' s r c ' ]                         e l s e :                                 d o w n l o a d _ u r l   =   s e l f . t a r g e t _ u r l   +   i m g _ u r l [ ' s r c ' ] . r e p l a c e ( ' . / ' ,   ' ' )                         u r l _ l i s t . a p p e n d ( d o w n l o a d _ u r l )                 i t e m [ ' i m a g e _ u r l s ' ]   =   u r l _ l i s t         #           p _ a u t h o r   =   s o u p . f i n d _ a l l ( ' p ' ,   a t t r s = { ' c l a s s ' :   ' a u t h o r ' } )         o r i g i n _ p u b l i s h _ t i m e   =   p _ a u t h o r [ 0 ] . c o n t e n t s [ 4 ] . s t r i p ( )         i f   l e n ( o r i g i n _ p u b l i s h _ t i m e ) :                 #   o r i g i n _ p u b l i s h _ t i m e   =   p t _ s t r                 p t r _ l i s t   =   [ x   f o r   x   i n   f i l t e r ( s t r . i s d i g i t ,   s t r ( o r i g i n _ p u b l i s h _ t i m e ) ) ]                 p t _ s t r   =   " " . j o i n ( p t r _ l i s t )                 y   =   p t _ s t r [ : 4 ]                 d   =   p t _ s t r [ - 6 : - 4 ]                 h   =   p t _ s t r [ - 4 : - 2 ]                 m i n   =   p t _ s t r [ - 2 : ]                 i f   l e n ( p t _ s t r )   = =   1 2 :                         m   =   p t _ s t r [ 4 : 6 ]                 e l s e :                         m   =   ' 0 '   +   p t _ s t r [ 4 ]                 p u b l i s h _ t i m e   =   y   +   ' - '   +   m   +   ' - '   +   d   +   "   "   +   h   +   " : "   +   m i n   +   " : 0 0 "         e l s e :                 p u b l i s h _ t i m e   =   ' '         d t   =   d a t e t i m e . d a t e t i m e . s t r p t i m e ( p u b l i s h _ t i m e ,   " % Y - % m - % d   % H : % M : % S " )         p u b l i s h _ t i m e   =   d t . a s t i m e z o n e ( p y t z . t i m e z o n e ( ' U T C ' ) ) . s t r f t i m e ( ' % Y - % m - % d   % H : % M : % S ' )         b   =   r e s p o n s e . m e t a [ ' c o n t e n t _ u r l ' ] . i n d e x ( ' = ' )   +   1         i t e m [ ' t i t l e _ i d ' ]   =   ( r e s p o n s e . m e t a [ ' c o n t e n t _ u r l ' ] ) [ b : ]         i t e m [ ' t i t l e ' ]   =   r e s p o n s e . m e t a [ ' t i t l e ' ]         i t e m [ ' u r l ' ]   =   r e s p o n s e . m e t a [ ' c o n t e n t _ u r l ' ]         i t e m [ ' c o n t e n t ' ]   =   c o n t e n t         i t e m [ ' p r i c e ' ]   =   p r i c e         i t e m [ ' v o l u m e ' ]   =   v o l u m e         i t e m [ ' v i s i t s ' ]   =   r e s p o n s e . m e t a [ ' v i s i t s ' ]         i t e m [ ' p u b l i s h _ t i m e ' ]   =   p u b l i s h _ t i m e         y i e l d   i t e m d e f   s e n d _ h t m l _ e m a i l ( t i t l e ,   h t m l ,   c o n t e n t ,   m a i l t o ,   c c = N o n e ) : h t m l _ c o n t e n t   =   r e n d e r _ t o _ s t r i n g ( h t m l ,   c o n t e n t ) s e n d _ m a i l   =   s e t t i n g s . E M A I L _ T O . s p l i t ( ' , ' )   i f   m a i l t o   = =   ' '   e l s e   s e t t i n g s . E M A I L _ T O m s g   =   E m a i l M u l t i A l t e r n a t i v e s ( t i t l e ,   h t m l _ c o n t e n t ,                                                           s e t t i n g s . E M A I L _ L U C K Y _ N A M E   +         ' < '   +   s e t t i n g s . E M A I L _ H O S T _ U S E R   +   ' > ' ,   s e n d _ m a i l ,   c c = c c ) m s g . a t t a c h _ a l t e r n a t i v e ( h t m l _ c o n t e n t ,   " t e x t / h t m l " ) m s g . s e n d ( )
G r a f a n a 使 p . s . y 1 r 0 n z * s h y s t a r t r e e F r e e B u f

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

本版积分规则