I was just advised to re-ask my question from https://security.stackexchange.com/questions/72795/command-execution-dvwa-creating-file-in-tmp here.
I use CentOS 7, and I'm trying to understand command execution attack. I found a tutorial which described a task to create a file. Simply using
cat /etc/passwd | tee -a /tmp/passwd
Should create copy of
/etc/passwd. And it is (running
cat /tmp/passwd from the same place, where I ran the previous command returns exactly what I was expecting). But there is no
/tmp/passwd if I try to run this command from the server's terminal (not from the site).
I did no setup for apache and php.
Where should I search for the missing
As @terdon asks:
mount | grep tmp
devtmpfs on /dev type devtmpfs (rw,nosuid,size=1966708k,nr_inodes=491677,mode=755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) /dev/sda7 on /tmp type xfs (rw,relatime,attr2,inode64,noquota) /dev/sda7 on /var/tmp type xfs (rw,relatime,attr2,inode64,noquota)