Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÍø¹Üѧϰ±Ê¼Ç£¨12£©¹ØÓÚLinuxµÄÄں˰²È«

LinuxÄÚºËÊÇ×÷ΪMonolithic architecture (µ¥ÄÚºËÌåϵ½á¹¹) ¶øʵÏֵģ¬ÎªÁË»ñµÃ Microkernel architecture (΢ÄÚºËÌåϵ½á¹¹) ´øÀ´µÄ¿ÉÀ©Õ¹ÐԺͿÉά»¤ÐÔ£¬Linux ÒýÈëÁËÄ£¿é (module) »úÖÆ£¬(±È½Ï׼ȷµÄ˵·¨ÊÇ Loadable Kernel Module, ¿É×°ÔØÄÚºËÄ£¿é)£¬½å´ËÀ´±£Ö¤Äں˵Ľô´ÕÐÔºÍLinux±¾Éí¹ÌÓеĵ¥Ò»Ìåϵ½á¹¹µÄÓŵ㗗ÉÏÏÂÎÄÇл»Ëٶȿ졣 ÔÚLinuxÖУ¬Óû§(ͨ³£ÐèÒªrootȨÏÞ)ͨ¹ýmodutilsÈí¼þ°üÖÐÌṩµÄ¹¤¾ß£¬¶¯Ì¬µØ½«Ä£¿é(ÈçÍøÂçÇý¶¯µÈ)²åÈë¡¢ÒƳöÄںˡ£ÕâÑù£¬Äں˵ŦÄÜ¿ÉÒÔ¶¯Ì¬µØÌí¼ÓºÍɾ³ý£¬È´²»ÐèҪÿ´Î¶¼¾­¹ýÈß³¤µÄ¹Ø»ú/ÖØÆô¹ý³Ì¡£ÒòΪģ¿éÔËÐеĻ·¾³ÊÇÄںˣ¬Òò¶øËü¾ßÓÐÄÚºËÌØȨ£¬Ä£¿é±à³ÌÒ²¾ÍÊÇÄں˱à³Ì£¬ËüÊÇLinux Kernel Hacking µÄÖ÷Òª¹¤¾ß¡£ÏÂÃ棬½²ÊöÔÚLinuxÏÂÈçºÎͨ¹ýmodule À´À¹½Øϵͳµ÷Óã¬ÒÔ¼°Kernel Hacking µÄһЩ·À·¶ÊֶΡ£ Linuxͨ¹ýint 0x80 ÈíÖжÏʵÏÖϵͳµ÷Óá£ÏµÍ³µ÷ÓÃÁбíÔÚLinux×Ô¾Ùʱͨ¹ýinit_IRQ( ) µ÷Óúê set_intr_gate ³õʼ»¯¡£µ±ÏµÍ³µ÷Ó÷¢Éúʱ£¬Äں˼ì²éϵͳµ÷ÓõÄÓÐЧÐÔ£¬È»ºó½«¿ØÖÆȨת¸øʵ¼ÊµÄϵͳµ÷ÓôúÂ롣ϵͳµ÷Óñí sys_call_table[] ¿ÉÒÔÔÚÎļþ entry.S ÖÐÕÒµ½¡£Ëü¿´ÆðÀ´Ó¦¸ÃÈçÏÂËùʾ£º ¡­ ¡­ ENTRY (sys_call_table) .long SYMBOL_NAME (sys_ni_syscall) /* ¡­¡­ */ .long SYMBOL_NAME (sys_exit) .long SYMBOL_NAME (sys_fork) .long SYMBOL_NAME (sys_read) ¡­ ¡­ Îļþunistd.h Ϊÿ¸öϵͳµ÷Óù涨ÁËΨһµÄ±àºÅ£¬Ëü¿´ÆðÀ´Ó¦¸ÃÈçÏÂËùʾ£º ¡­ ¡­ #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 ¡­ ¡­ ²»ÄÑ¿´³ö£¬Ã¿¸öϵͳµ÷ÓÃËù¶ÔÓ¦µÄ±àºÅÕýÊǸÃϵͳµ÷ÓÃÔÚÖ¸Ïòº¯ÊýµÄÖ¸ÕëÊý×ésys_call_table[]ÖеÄϱꡣÄں˼ì²é%eaxµÄÓÐЧÐÔ£¬sys_call_table[%eax]±ãÊÇÓû§ÒªÇóµÄϵͳµ÷ÓõÄÈë¿ÚÖ¸Õë¡£ÄÇô£¬ÔõÑù²ÅÄÜÀ¹½Øϵͳµ÷ÓÃÄØ£¿ºÜ¼òµ¥£¬Ö»Òª½«sys_call_table[]ÖжÔÓ¦µÄÈë¿ÚÖ¸ÕëÌæ»»³ÉÎÒÃÇ×Ô¼ºµÄº¯ÊýÖ¸Õë¼´¿É¡£ ºÃÁË£¬ÓÐÁËÉÏÊö֪ʶ£¬ÏÖÔÚ¿ÉÒÔ½øÐбà³ÌÁË¡£×÷Ϊ×î¼òµ¥µÄÀý×Ó£¬ÎÒÃÇ¿ÉÒÔÊÔ×ÅÀ¹½Ømkdir()ϵͳµ÷Óᣠ/* *hack_mkdir.c David 2003-4-19 *It shows how to intercept a system call. */ #include /*±àÒëÄ£¿é±ØÐèµÄÍ·Îļþ*/ #include #include extern void *sys_call_table []; int (*origin_mkdir) (const char *); /*ÓÃÓÚ±£´æ¾ÉµÄϵͳµ÷ÓÃ*/ int hacked_mkdir(const char *pathname) /*еÄϵͳµ÷ÓÃ*/ { return 0; } int init_module() /*Ä£¿éÈë¿Úµ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

linuxÅäÖÃiptablesºÍsquid

iptables-save > ipt.v1.0
iptables-save > ipt.v1.1
iptables-restore < ipt.v1.0
cp /etc/sysconfig/iptables iptables.raw
service iptables save
ipαװµÄ½Å±¾Îļþiptables_masquerade
#!/bin/bash
//ÉèÖÃlinuxϵͳÔÊÐíip°üµÄת·¢
echo "1" > /proc/sys/net/ipv4/ip_forward
//¼ÓÔØʵÏÖ ......

Linux±Ê¼Ç£¨11£©Èë¶ÔÐÐÓë¼Þ¶ÔÀÉ£ºLinuxµÄְҵǰ¾°

  ºÍÎÒÃÇÌÖÂÛµÄÖ÷ÌâÔ½À´Ô½½üÁË¡£¡°ÄÐÅÂÈë´íÐУ¬Å®Å¼޴íÀÉ¡±£¬ÎÒ¶ÔÕâ¾ä»°µÄÌå»áÔ½À´Ô½Éî¿ÌÁË¡£×î½üÓиöÃñÉúÒøÐеÄÀÏ×ܺÍÎÒ̽ÌÖÁËÕâ¸öÎÊÌ⣬ºÁÎÞÒÉÎÊ£¬ÔÚÒøÐÐÕâ¸öÐÐÒµ¿Ï¶¨±ÈÒ»°ãµÄÐÐÒµÕõÇ®¡£ÓÚÊÇ£¬×ÔÈ»Çе½ÎÒÃǵĻ°Ì⣺LinuxÕâ¸öÐÐÒµÔõôÑù£¿ÕõÇ®Âð£¿ÒÔºó¿ªÔ´ÁËÎÒ»¹Óз¹³ÔÂð£¿×î½ü£¬ÎÒÄõ½ÁËÒ»·ÝLinuxµÄÖ°Òµ±¨¸æ¡£µ÷²é ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ