-
Notifications
You must be signed in to change notification settings - Fork 5
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
spacesos: add writeup #7
base: master
Are you sure you want to change the base?
Conversation
@derlaft @Alagunto @pomo-mondreganto @jnovikov |
@@ -0,0 +1,40 @@ | |||
# Spacesos Writeup | |||
Есть сервис на дарте, который через `messages.dart` отправляет сообщения на сервис на php. В нём и будут все уязвимости. | |||
## First vulnerability |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it like 'SSRF vulnerability'
chdir("/tmp/messages"); | ||
echo file_get_contents(path_normalize($user)) ?? ""; | ||
``` | ||
Если в имени user будет #, то в `$_GET['user']` вернёт имя без # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The described method is good, but if you can please explain first the 'original' exploit and you can describe this as a second option (which comes from the one SSRF & no-sanitization problem).
echo file_get_contents(path_normalize($user)) ?? ""; | ||
``` | ||
Если в имени user будет #, то в `$_GET['user']` вернёт имя без # | ||
Получается можно посмотреть все public crashes, нарегать юзеров с таким же именем и #xxxx на конце и мы получим краши юзеров без #xxxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reader can misunderstood the sentence like 'the vuln allow you to read public crashes'
``` | ||
Если в имени user будет #, то в `$_GET['user']` вернёт имя без # | ||
Получается можно посмотреть все public crashes, нарегать юзеров с таким же именем и #xxxx на конце и мы получим краши юзеров без #xxxx | ||
## Second vulnerability |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it like 'PHP sanitization bypass'
@@ -0,0 +1,40 @@ | |||
# Spacesos Writeup | |||
Есть сервис на дарте, который через `messages.dart` отправляет сообщения на сервис на php. В нём и будут все уязвимости. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not true that all the vulns are in the PHP service.
Dart one is the one that should not allow to control the urlstring and causes SSRF.
} | ||
``` | ||
Как мы видим, если username будет путь, то он вырежет все `..`, поэтому по папкам походить не получится, но можно вставить `.`, и тогда будет всё отлично. | ||
Опять же, смотрим public crashes, регаем юзеров с именем xxxxx/./admin и смотрим краши админа. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- should it be
xxxx/../admin
? - There is no
admin
in this service, so it will be good to change likexxxxx/./<user_to_sploit>
Thanks for your contribution. I want to ask you to improve your writeup before merging.
|
No description provided.