You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see that file.getName () is not filtered, causing the.. /.. / directory to traverse to the ssh directory, there is no restriction on the suffix name, and you can write the public key to get shell.
Then replace the path "/".
Reappearance
ssh-keygen -t rsa -f id_rsa
upload.
You can see the successful upload
Success
The text was updated successfully, but these errors were encountered:
0x01 File upload
Interface:/adminPage/main/upload
com/cym/controller/adminPage/MainController.java#upload
You can see that file.getName () is not filtered, causing the.. /.. / directory to traverse to the ssh directory, there is no restriction on the suffix name, and you can write the public key to get shell.
Then replace the path "/".
Reappearance
ssh-keygen -t rsa -f id_rsa
upload.
You can see the successful upload
![image](https://private-user-images.githubusercontent.com/66824584/284859722-db6e7884-e144-4ac2-b043-bb37b1f32d54.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3Nzg3MzgsIm5iZiI6MTcyMTc3ODQzOCwicGF0aCI6Ii82NjgyNDU4NC8yODQ4NTk3MjItZGI2ZTc4ODQtZTE0NC00YWMyLWIwNDMtYmIzN2IxZjMyZDU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDIzNDcxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU2ZmQ4NTg4Y2VhYTFiOTczYTg2ODYxNWY0N2I3OGJkZjBmYzZjMTBkOGRhMDcyYzBmMmRhZGM3ZTk3MjU2NDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.neB4o3mfIol2LnGoti5TBuDmm50_YVujGRYa9sHftSs)
Success
The text was updated successfully, but these errors were encountered: