[10620] 2016-10-19_如何进行Linux平台共享库替换

文档创建者:s7ckTeam
浏览次数:4
最后更新:2025-01-18
2016-10-19_如何进行Linux平台共享库替换 L i n u x g a e a r r o w   F r e e B u f   2 0 1 6 - 1 0 - 1 9 * g a e a r r o w F r e e B u f       P r e p r e s s i n g C o m p i l a t i o n A s s e m b l y L i n k i n g # W i n d o w s D y n a m i c - L i n k   L i b r a r y D L L L i n u x S h a r e d   O b j e c t S O L i n u x S O S O S O S O S O S O c p   n e w . s o   o l d . s o S O S O S O 使 S O r m   - f   o l d . s o S O m v   o l d . s o   o l d x . s o S O S O 访 S O i n o d e S O i n o d e i n o d e I D i n o d e   S O S O i n o d e S O S O S O i n o d e S O S O i n o d e 访 S O S O S O S O S O S O   S O   S O   L i n u x P t r a c e ( ) W i n d o w s 线 C r e a t e R e m o t e T h r e a d ( ) P t r a c e ( )
r e q u e s t P i d P i d A d d r D a t a P t r a c e ( ) P T R A C E _ P E E K D A T A P T R A C E _ K I L L P T R A C E _ C O N T I n t e l 3 8 6   1 S O 1 P t r a c e ( ) P t r a c e ( ) S h e l l c o d e h e l l o ( ) S O l i b f s o . s o m a i n 2 h e l l o + 8 h e l l o + 6 0 2 h e l l o + 8 h e l l o + 6 1 5 4 # i n c l u d e < s y s / p t r a c e . h > i n t   p t r a c e ( i n t   r e q u e s t , i n t   p i d , i n t   a d d r , i n t   d a t a ) ; P T R A C E _ A T T A C H /   P T R A C E _ D E T A C H i n t   p t r a c e ( P T R A C E _ A T T A C H , P i d , N U L L , N U L L ) ; i n t   p t r a c e ( P T R A C E _ D E T A C H , P i d , N U L L , N U L L ) ; P T R A C E _ P O K E D A T A i n t   p t r a c e ( P T R A C E _ ? P O K E D A T A , P i d , A d d r , D a t a ) ;
?   2 3 H e l l o   W o r l d ! 4 6 S h e l l c o d e h e l l o w o r l d 4   3
  4 A S L R A d d r e s s   s p a c e   l a y o u t   r a n d o m i z a t i o n S O S O l i n u x S O 5 0 x 2 b 6 9 0 1 e 0 f 0 0 0 S O 6 0 x 2 b 6 9 0 1 e 0 f 5 1 4 0 × 5 1 4   5
?   6 C e n t O S   6 . 6   ( F i n a l ) L i n u x   v e r s i o n   2 . 6 . 3 2 g c c   v e r s i o n   4 . 4 . 7   2 0 1 2 0 3 1 3 n a s m   v e r s i o n   2 . 0 7 6 4 3 2 f o r S h e l l c o d e   s o S h e l l c o d e / / f s o . c / / g c c   - c   - W a l l   - W e r r o r   - f P I C   f s o . c / / g c c   - s h a r e d   - o   l i b f s o . s o   f s o . o # i n c l u d e   < s t d i o . h > v o i d   h e l l o ( ) {         i n t   i   =   0 ;         i n t   j   =   0 ;         p r i n t f ( " H e l l o   M y b o y ! n " ) ;         f o r ( i = 0 ;   i < 1 0 0 0 0 0 0 0 ;   i + + )         {                 j + + ;         } } / / m a i n . c / / g c c   - L   / h o m e / m y c o s / s o   - W a l l   - o   m a i n   m a i n . c   - l f s o / / e x p o r t   L D _ L I B R A R Y _ P A T H = / h o m e / m y c o s / s o   : $ L D _ L I B R A R Y _ P A T H # i n c l u d e   < s t d i o . h > e x t e r n   v o i d   h e l l o ( v o i d ) ; i n t   m a i n ( ) {         i n t   i   =   0 ;         p r i n t f ( " T h i s   i s   M a i n ! n " ) ;         w h i l e ( 1 )         {                 i f ( i % 1 0   = =   0 )   p r i n t f ( " n " ) ;                 s l e e p ( 1 ) ;                 h e l l o ( ) ;                 i + + ;         }               r e t u r n   0 ; }
h e l l o . a s m n o p S h e l l c o d e S h e l l c o d e 4 9 S h e l l c o d e 使 S h e l l c o d e G D B h e l l o 0 × 0 0 1 1 1 4 7 8 0 x 0 0 1 1 1 4 7 d 6 s h e l l c o d e 0 × 0 0 1 1 1 4 3 7 0 x 0 0 1 1 1 4 7 d 7 0 s h e l l c o d e 4 9 ;   3 2 - b i t   " H e l l o   W o r l d ! "   i n   C e n t O S   6   i 6 8 6 ;   n a s m   - f e l f 3 2   h e l l o . a s m   - o   h e l l o . o ;   l d   - s   - o   h e l l o   h e l l o . o g l o b a l   _ s t a r t _ s t a r t :         j m p   s t r i n g c o d e :         p o p           e c x         m o v           e a x ,   0 x 4         m o v           e b x ,   0 x 1         m o v           e d x ,   0 x D         i n t           0 x 8 0         n o p         n o p         n o p         n o p         n o p         n o p         n o p         n o p s t r i n g :         c a l l         c o d e         d b   ' H e l l o   w o r l d ! ' , 0 x 0 a f o r   i   i n   $ ( o b j d u m p   - d   h e l l o   | g r e p   " ^   "   | c u t   - f 2 ) ;   d o   e c h o   - n   ' x ' $ i ;   d o n e ;   e c h o x e 9 x 1 a x 0 0 x 0 0 x 0 0 x 5 9 x b 8 x 0 4 x 0 0 x 0 0 x 0 0 x b b x 0 1 x 0 0 x 0 0 x 0 0 x b a x 0 d x 0 0 x 0 0 x 0 0 x c d x 8 0 x 9 0 x 9 0 x 9 0 x 9 0 x 9 0 x 9 0 x 9 0 x 9 0 x e 8 x d f x f f x f f x f f x 4 8 x 6 5 x 6 c x 6 c x 6 f x 2 0 x 7 7 x 6 f x 7 2 x 6 c x 6 4 x 2 1 x 0 a
S h e l l c o d e 0 × 0 0 1 1 1 0 0 0 G D B 0 × 0 0 1 1 1 4 3 7 0 × 4 3 7 x 8 6 _ 6 4   s y s / u s e r . h     l i n u x / u s e r . h g e t d a t a / p u t d a t a   4     8 u s e r _ r e g s _ s t r u c t   e i p     r i p s h e l l c o d e x 8 6 _ 6 4 H e l l o   M y b o y !     H e l l o   w o r l d !   x e 9 x 1 a x 0 0 x 0 0 x 0 0 x 5 9 x b 8 x 0 4 x 0 0 x 0 0 x 0 0 x b b x 0 1 x 0 0 x 0 0 x 0 0 x b a x 0 d x 0 0 x 0 0 x 0 0 x c d x 8 0 x 8 3 x c 4 x 2 4 x 5 b x 5 d x c 3 x 9 0 x 9 0 x e 8 x d f x f f x f f x f f x 4 8 x 6 5 x 6 c x 6 c x 6 f x 2 0 x 7 7 x 6 f x 7 2 x 6 c x 6 4 x 2 1 x 0 a [ m y c o s @ l o c a l h o s t   s o ] $   p s   a u x   |   g r e p   m a i n m y c o s         1 3 8 3 4   1 2 . 2     0 . 0       1 8 7 2       3 8 4   p t s / 0         T         2 1 : 1 6       0 : 0 3   . / m a i n m y c o s         1 3 2 9 3     0 . 0     0 . 0       4 3 5 2       7 2 0   p t s / 1         S +       2 1 : 1 6       0 : 0 0   g r e p   m a i n [ m y c o s @ l o c a l h o s t   s o ] $   . / i n j e c t s o   1 3 8 3 4 [ m y c o s @ l o c a l h o s t   s o ] $   . / m a i n T h i s   i s   M a i n ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   M y b o y ! H e l l o   w o r l d ! H e l l o   w o r l d ! H e l l o   w o r l d ! H e l l o   w o r l d !
h t t p : / / w w w . l i n u x i d c . c o m / L i n u x / 2 0 1 1 - 0 1 / 3 1 6 2 2 . h t m h t t p : / / w w w . c n b l o g s . c o m / i t e c h / a r c h i v e / 2 0 1 2 / 0 5 / 1 5 / 2 5 0 2 2 8 4 . h t m l h t t p : / / b l o g . c s d n . n e t / m y a r r o w / a r t i c l e / d e t a i l s / 9 6 3 0 3 7 7 h t t p : / / b l o g . c s d n . n e t / t j u 3 5 5 / a r t i c l e / d e t a i l s / 6 8 8 4 6 9 6 h t t p : / / t h e a n t w a y . c o m / 2 0 1 3 / 0 1 / n o t e s - f o r - p l a y i n g - w i t h - p t r a c e - o n - 6 4 - b i t s - u b u n t u - 1 2 - 1 0 / h t t p : / / w w w . c n b l o g s . c o m / w a n g k a n g l u o 1 / a r c h i v e / 2 0 1 2 / 0 6 / 0 5 / 2 5 3 5 4 8 4 . h t m l h t t p : / / b l o g . s i n a . c o m . c n / s / b l o g _ 4 a c 7 4 e 9 a 0 1 0 0 n 7 w 1 . h t m l h t t p : / / b l o g . s i n a . c o m . c n / s / b l o g _ 6 0 1 f 2 2 4 a 0 1 0 1 3 a l j . h t m l * g a e a r r o w F r e e B u f  
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则