[16492] 2021-02-27_截获TLS密钥——WindowsSchannel

文档创建者:s7ckTeam
浏览次数:4
最后更新:2025-01-18
2021-02-27_截获TLS密钥——WindowsSchannel T L S W i n d o w s   S c h a n n e l D h a k k a n   F r e e B u f   2 0 2 1 - 0 2 - 2 7 T L S 使 S C h a n n e l W i n d o w s T L S I I S R D P I E E d g e O u t l o o k P o w e r s h e l l 使 O p e n S S L N N S I E E d g e 使 S C h a n n e l S C h a n n e l S e c u r e   C h a n n e l   2 3 w i n d o w s w i n d o w s T L S T L S 使 S c h a n n e l S C h a n n e l S e c u r i t y   S u p p o r t   P r o v i d e r   I n t e r f a c e   ( S S P I ) S S P S S P C r e d S S P N e g o t i a t e N T L M K e r b e r o s D i g e s t 2 4 S C h a n n e l 使 H T T P S I E E d g e p o w e r s h e l l I I S   w e b   s e r v e r R D P m s t s c . e x e s v c h o s t . e x e t e r m s r v . d l l L D A P L D A P S H T T P S   l i s e n e r W i n R M P S   r e m o t i n g P S   r e m o t i n g 使 T L S S S L   a u t h e n t i c a t i o n s c h a n n e l F i r e f o x C h r o m e 使 T L S N S S O p e n S S L N S S O p e n S S L s e c r e t s F i r e f o x C h r o m e 使 T L S 1 . 2 使 s e c r e t s T L S T L S 1 2 . 2 T L S 1 . 2 T L S ( ) T L S I n v o k e W e b R e q u e s t S S L K E Y L O G F I L E
P e r f e c t   F o r w a r d   S e c r e c y P F S 2 5 使 P F S 使 T L S P F S   m a s t e r   k e y T L S 1 . 2 P r e - M a s t e r S e c r e t M a s t e r   S e c r e t I V w r i t e   k e y s M A C   k e y s M A C 使 A E A D T L S   s e s s i o n   t i c k e t s T L S T L S 使 s e s s i o n   I D s e s s i o n   I D 使 T L S   s e s s i o n   t i c k e t s ( r f c 5 0 7 7 ) 使 T L S   s e s s i o n   t i c k e t s 1 2 S S L   k e y l o g T L S d u m p T L S   1 . 2 O p e n S S L N S S 2 3 s s l   k e y l o g k e y l o g T L S s e c r e t s 4 W i r e s h a r k k e y l o g 使 s e c r e t s c l i e n t   r a n d o m     s e s s i o n   i d T L S 1 . 2 k e y l o g p r e - m a s t e r m a s t e r   s e c r e t s c l i e n t   r a n d o m ( T L S ) s e s s i o n   i d ( ) T L S 1 . 2 k e y l o g : T L S 1 . 3 T L S 1 . 2 T L S 1 . 3 s e c r e t s T L S 1 . 2 : T L S 1 . 2 k e y l o g ( 1 ) ( 2 ) s e c r e t s T L S 1 . 3 ( R F C 8 4 4 6 3 4 9 3 ) : C L I E N T _ R A N D O M   < c l i e n t _ r a n d o m >   < m a s t e r _ s e c r e t > ( 1 )   P r e - M a s t e r   S e c r e t = >   ( 2 )   M a s t e r   S e c r e t   = >   ( 3 )   A   s e t   o f   w r i t e   k e y s   a n d   I V s                 a n d   p o s s i b l y   m a c   k e y s   f o r   c l i e n t   a n d   s e r v e r ( 1 )   I n p u t   K e y i n g   M a t e r i a l   ( I K M ) = >   ( 2 )   A   s e t   o f   S e c r e t s :   E a r l y ,   H a n d s h a k e ,   M a s t e r   e t c
T L S 1 . 3   k e y l o g ( 2 ) s e c r e t s T L S   1 . 2 T L S s e c r e t s c l i e n t   r a n d o m T L S s e c r e t s s e c r e t s e c r e t k e y l o g : W i n d o w s   s c h a n n e l   A P I 5 , 使 ( t e r m i n a l   s e r v i c e s   c l i e n t ,   m s t s c ) T L S T L S ( l s a s s . e x e ) s e c r e t s ( T L S 1 . 2 p r e - m a s t e r m a s t e r   k e y s ) l s a s s . e x e m s t s c . e x e 使 s c h a n n e l . d l l s c h a n n e l   . d l l ( 1 2 . 6 2 . 7 ) 使 A L P C l s a s s s c h a n n e l   . d l l A L P C l s a s s . e x e s c h a n n e l   . d l l 使 A P I   ( C N G 6 ) S C h a n n e l S S P I 3 7 L S A w i n d o w s 使 N T L M K e r b e r o s l s a s s   . e x e S C h a n n e l 使 T L S h o o k / T L S W i r e s h a r k ( s e s s i o n   i d c l i e n t   r a n d o m ) / 使 W i r e s h a r k S C h a n n e l   T L S J a c o b   K a m b i c 1 ( d u m p ) 使 使 d b g h o o k : ; W i n d o w s / 西 ; ; l s a s s . e x e 1 0 T L S 1 . 2 = >   ( 2 )   A   s e t   o f   S e c r e t s :   E a r l y ,   H a n d s h a k e ,   M a s t e r   e t c = >   ( 3 )   A   s e t   o f   k e y s   a n d   I V s C L I E N T _ H A N D S H A K E _ T R A F F I C _ S E C R E T   < c l i e n t _ r a n d o m >   < c l i e n t _ h s _ t r a f f i c _ s e c r e t > S E R V E R _ H A N D S H A K E _ T R A F F I C _ S E C R E T   < c l i e n t _ r a n d o m >   < s e r v e r _ h s _ t r a f f i c _ s e c r e t > C L I E N T _ T R A F F I C _ S E C R E T _ 0   < c l i e n t _ r a n d o m >   < c l i e n t _ t r a f f i c _ s e c r e t _ 0 > C L I E N T _ T R A F F I C _ S E C R E T _ 0   < c l i e n t _ r a n d o m >   < s e r v e r _ t r a f f i c _ s e c r e t _ 0 > n c r y p t . d l l b c r y p t . d l l I n i t i a l i z e S e c u r i t y C o n t e x t S p I n i t L s a M o d e C o n t e x t F n S p I n i t U s e r M o d e C o n t e x t
T L S 1 . 2 c l i e n t   r a n d o m k e y l o g w i r e s h a r k S s l G e n e r a t e M a s t e r K e y ( ) T L S 1 . 2 S s l G e n e r a t e M a s t e r K e y 1 3 : O u t ( h e a d e r 1 4 ) m a s t e r   k e y * p h M a s t e r k e y 0 x 0 4 m a g i c   v a l u e 1 7 7 0 x 1 0 x 6 4 x 8 6 0 x 0 C m a g i c   v a l u e 1 6 4 - 6 8 x 6 4 p N c r y p t S s l K e y 0 0 0 0 0 2 a 8 S s l M a s t e r S e c r e t S S L 5 ` n c r y p t . d l l S s l G e n e r a t e M a s t e r K e y S E C U R I T Y _ S T A T U S   W I N A P I   S s l G e n e r a t e M a s t e r K e y ( _ I n _     N C R Y P T _ P R O V _ H A N D L E   h S s l P r o v i d e r , _ I n _     N C R Y P T _ K E Y _ H A N D L E     h P r i v a t e K e y , _ I n _     N C R Y P T _ K E Y _ H A N D L E     h P u b l i c K e y , _ O u t _   N C R Y P T _ K E Y _ H A N D L E     * p h M a s t e r K e y , _ I n _     D W O R D                             d w P r o t o c o l , _ I n _     D W O R D                             d w C i p h e r S u i t e , _ I n _     P N C r y p t B u f f e r D e s c     p P a r a m e t e r L i s t , _ O u t _   P B Y T E                             p b O u t p u t , _ I n _     D W O R D                             c b O u t p u t , _ O u t _   D W O R D                             * p c b R e s u l t , _ I n _     D W O R D                             d w F l a g s ) ; N c r y p t S s l K e y B D D D 5 l s s b c d 8 1 e 7 0
1 6 8 m a s t e r   k e y S S L 5 0 x 1 C x 6 4 x 8 6 0 x 1 4 4 8   ( 0 x 3 0 ) c l i e n t   r a n d o m 1 3 p P a r a m e t e r L i s t : r a n d o m 西 . N E T M S 1 7 p P a r a m t e r L i s t 0 x 0 4 0 x 0 8 N C r y p t B u f f e r : p B u f f e r s S s l G e n e r a t e M a s t e r K e y . . . _ I n _     P N C r y p t B u f f e r D e s c     p P a r a m e t e r L i s t , . . . p P a r a m e t e r L i s t   [ i n ] A   p o i n t e r   t o   a n   a r r a y   o f   N C r y p t B u f f e r   b u f f e r s   t h a t   c o n t a i n   i n f o r m a t i o n   u s e d   a s   p a r t   o f   t h e   k e y   e x c h a n g e   o p e r a t i o n . T h e   p r e c i s e   s e t   o f   b u f f e r s   i s   d e p e n d e n t   o n   t h e   p r o t o c o l   a n d   c i p h e r   s u i t e   t h a t   i s   u s e d .   A t   t h e   m i n i m u m ,   t h e   l i s t w i l l   c o n t a i n   b u f f e r s   t h a t   h o l d   t h e   c l i e n t   a n d   s e r v e r s u p p l i e d   r a n d o m   v a l u e s . N C r y p t B u f f e r N C r y p t B u f f e r D e s c t y p e d e f   s t r u c t   _ N C r y p t B u f f e r D e s c   { U L O N G                   u l V e r s i o n ; U L O N G                   c B u f f e r s ; P N C r y p t B u f f e r   p B u f f e r s ; }   N C r y p t B u f f e r D e s c ,   * P N C r y p t B u f f e r D e s c ; t y p e d e f   s t r u c t   _ N C r y p t B u f f e r   { U L O N G   c b B u f f e r ; U L O N G   B u f f e r T y p e ; P V O I D   p v B u f f e r ; }   N C r y p t B u f f e r ,   * P N C r y p t B u f f e r ; N c r y t B u f f e r D e s c N C r y p t B u f f e r
p B u f f e r s 0 x 0 4 B u f f e r T y p e = 0 x 1 4 = 2 0 N C R Y P T B U F F E R _ S S L _ C L I E N T _ R A N D O M B u f f e r T y p e = 0 x 1 5 = 2 1 N C R Y P T B U F F E R _ S S L _ S E R V E R _ R A N D O M B u f f e r T y p e 0 x 1 4 0 x 0 8 c l i e n t   r a n d o m 使 使 R S A S s l I m p o r t M a s t e r K e y 使 P F S ( D i f f i e - H e l l m a n ) 使 P F S R S A W i n d o w s w i n d o w s P F S 9 R S A m a s t e r   k e y D i f f i e   -   H e l l m a n ) 2 6 西 m a s t e r   k e y m a s t e r   k e y : c l i e n t   r a n d o m c l i e n t   r a n d o m S s l G e n e r a t e M a s t e r K e y n c r y p t ! N C r y p t D e r i v e K e y n c r y p t ! S s l I m p o r t M a s t e r K e y h P r i v a t e K e y p b E n c r y p t e d K e y p h M a s t e r K e y S E C U R I T Y _ S T A T U S   W I N A P I   S s l I m p o r t M a s t e r K e y ( _ I n _     N C R Y P T _ P R O V _ H A N D L E   h S s l P r o v i d e r , _ I n _     N C R Y P T _ K E Y _ H A N D L E     h P r i v a t e K e y , _ O u t _   N C R Y P T _ K E Y _ H A N D L E     * p h M a s t e r K e y , _ I n _     D W O R D                             d w P r o t o c o l , _ I n _     D W O R D                             d w C i p h e r S u i t e , _ I n _     P N C r y p t B u f f e r D e s c     p P a r a m e t e r L i s t , _ I n _     P B Y T E                             p b E n c r y p t e d K e y , _ I n _     D W O R D                             c b E n c r y p t e d K e y , _ I n _     D W O R D                             d w F l a g s ) ; S s l G e n e r a t e M a s t e r K e y p P a r a m t e r L i s t
  m a s t e r   k e y m a s t e r   k e y 使 使 T L S   S e s s i o n   H a s h a r g s c l i e n t _ r a n d o m 2 6 r a n d o m 2 2 2 5 2 2 N C R Y P T B U F F E R _ S S L _ H I G H E S T _ V E R S I O N 2 5 N C R Y P T B U F F E R _ S S L _ S E S S I O N _ H A S H 使 s e s s i o n   h a s h S e s s i o n   H a s h m a s t e r   k e y 使   c l i e n t / s e r v e r   r a n d o m T L S S e s s i o n   H a s h E x t e n d e d   M a s t e r   S e c r e t T L S ( R F C   7 6 2 7 2 7 ) m a s t e r   s e c r e t h a s h C l i e n t H e l l o ,   S e r v e r H e l l o c l i e n t / s e r v e r   r a n d o m W i r e s h a r k 使 S e s s i o n H a s h S e s s i o n   H a s h c l i e n t   r a n d o m 使 T L S s e s s i o n   i d c l i e n t   r a n d o m S s l H a s h H a n d s h a k e 2 8 n c r y p t . d l l / S s l H a s h H a n d s h a k e S S L h a s h 1 .   h a s h 2 .   h a s h h a s h 3 .   S s l C o m p u t e F i n i s h e d H a s h h a s h * p h M a s t e r K e y S s l { G e n e r a t e , I m p o r t } M a s t e r K e y p P a r a m e t e r L i s t p P a r a m e t e r L i s t S s l H a s h H a n d s h a k e
使 R F C   7 6 2 7   s e s s i o n   h a s h T L S 1 . 3 T L S 1 . 2 c l i e n t   h e l l o m s g _ t y p e   = =   1 v e r s i o n   = =   0 x 0 3 0 3 T L S 1 . 2 T L S 1 . 3 0 x 0 3 0 3 T L S   1 . 3 p b I n p u t   [ o u t ] h a s h c b I n p u t   [ i n ] p b I n p u t   b y t e s c l i e n t   r a n d o m n c r y p t . d l l / S s l H a s h H a n d s h a k e 3 p b I n p u t b u f f e r 4 c b I n p u t b u f f e r 1 m s g _ t y p e 4 2 v e r s i o n m s g _ t y p e 1 v e r s i o n 0 x 0 3 0 3 6 3 2 c l i e n t   r a n d o m S E C U R I T Y _ S T A T U S   W I N A P I   S s l H a s h H a n d s h a k e ( _ I n _         N C R Y P T _ P R O V _ H A N D L E   h S s l P r o v i d e r _ I n o u t _   N C R Y P T _ H A S H _ H A N D L E   h H a n d s h a k e H a s h , _ O u t _       P B Y T E                             p b I n p u t , _ I n _         D W O R D                             c b I n p u t , _ I n _         D W O R D                             d w F l a g s ) ;
T L S 1 . 3 R F C   8 4 4 6 3 4 9 2 - 9 4 ( ) :   h a n d s h a k e   t r a f f i c   s e c r e t s   a p p l i c a t i o n   t r a f f i c   s e c r e t s   e x p o r t e r   m a s t e r   s e c r e t   r e s u m p t i o n   m a s t e r   s e c r e t t r a f f i c   s e c r e t s w r i t e   k e y I V S s l E x p a n d T r a f f i c K e y s S s l E x p a n d W r i t e K e y s e c r e t s   h a n d s h a k e   t r a f f i c
s e c r e t s   a p p l i c a t i o n   t r a f f i c   s e c r e t s g h i d r a 使 g h i d r a : 4 5 h a n d s h a k e   t r a f f i c   s e c r e t s a p p l i c a t i o n   t r a i f f i c   s e c r e t s S s l E x p a n d T r a f f i c K e y s h o o k 4 5 B D D D T L S 1 . 2 C T l s 1 3 C o n t e x t : : G e n e r a t e H a n d s h a k e W r i t e K e y s C T l s 1 3 C o n t e x t : : G e n e r a t e A p p l i c a t i o n W r i t e K e y s C T l s 1 3 C o n t e x t : : E x p a n d T r a f f i c A n d W r i t e K e y s s c h a n n e l ! C T l s 1 3 C o n t e x t : : E x p a n d T r a f f i c A n d W r i t e K e y s S s l E x p a n d T r a f f i c K e y s S s l E x p a n d W r i t e K e y u l o n g   _ _ t h i s c a l l E x p a n d T r a f f i c A n d W r i t e K e y s     ( C T l s 1 3 C o n t e x t   * t h i s , _ _ u i n t 6 4   p a r a m _ 1 , _ _ u i n t 6 4   p a r a m _ 2 , _ _ u i n t 6 4   p a r a m _ 3 , _ _ u i n t 6 4   * p a r a m _ 4 ,     _ _ u i n t 6 4   * p a r a m _ 5 , _ _ u i n t 6 4   * p a r a m _ 6 , _ _ u i n t 6 4   * p a r a m _ 7 , e S s l E r r o r S t a t e   * p a r a m _ 8 ) { / /   < S N I P > u V a r 1   =   ( * ( c o d e   * ) _ _ i m p _ S s l E x p a n d T r a f f i c K e y s ) ( p a r a m _ 1 , p a r a m _ 2 , p a r a m _ 3 , p a r a m _ 4 , p a r a m _ 5 , 0 , 0 ) ; i f   ( u V a r 1   = =   0 )   { i f   ( t h i s [ 0 x a 9 ]   ! =   ( C T l s 1 3 C o n t e x t ) 0 x 0 )   { u V a r 1   =   ( * ( c o d e   * ) _ _ i m p _ S s l E x p a n d W r i t e K e y )                                     ( p a r a m _ 1 , * p a r a m _ 4 , p a r a m _ 6 , 0 , ( u l o n g l o n g ) p a r a m _ 5 . _ 4 _ 4 _   < <   0 x 2 0 ) ; i f   ( u V a r 1   ! =   0 )   {     * p a r a m _ 8   =   0 x 2 5 e ;     r e t u r n   u V a r 1 ; } u V a r 1   =   ( * ( c o d e   * ) _ _ i m p _ S s l E x p a n d W r i t e K e y )                                     ( p a r a m _ 1 , * p a r a m _ 5 , p a r a m _ 7 , 0 , ( u l o n g l o n g ) p a r a m _ 5 . _ 4 _ 4 _   < <   0 x 2 0 ) ; i f   ( u V a r 1   ! =   0 )   {     * p a r a m _ 8   =   0 x 2 5 f ;     r e t u r n   u V a r 1 ; } } u V a r 1   =   0 ; } / /   < S N I P > } S s l E x p a n d T r a f f i c K e y s S s l E x p a n d T r a f f i c K e y s N c r y p t S s l K e y p N c r y p t S s l K e y
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则