This repository has been archived by the owner on Mar 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7a0dcc1
Showing
34 changed files
with
1,335 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__pycache__ | ||
config.py | ||
downloads | ||
vectors | ||
autotest_*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1. `sudo pip3 install -r requirements.txt` | ||
2. `echo "APP_KEY = '...'" > config.py` | ||
3. `python3 main.py` | ||
4. `help` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Программа для сбора информации о цели из vk.com с использованием всех доступных | ||
возможностей. | ||
|
||
Первый запуск: | ||
1. Создать standalone приложение | ||
2. Прописать его ключ в config.py | ||
|
||
Этапы работы с программой: | ||
1. Добавление доступных векторов | ||
1. Получчение ссылки: vector add | ||
2. Переход по ссылке с аккаунта-вектора (со всех доступных аккаунтов) | ||
3. Ввод результирующей ссылки в программу: vector add <link> | ||
2. Добавление целей: target add <user_id> | ||
3. Просмотр списка целей: target list | ||
4. Эксплуатация цели с целью получения вектора (попытка взлома) | ||
1. Список эксплоитов: exploit list | ||
2. Информация об эксплоите: exploit info <name> | ||
3. Выбор эксплоита: exploit use <name> | ||
4. Установка требуемых параметров: exploit set <parameter> <value> | ||
5. Запуск: exploit start | ||
5. Подбор векторов для цели: vector get | ||
6. Просмотр векторов: vector list | ||
7. Применение полезной нагрузки | ||
1. Список нагрузок: payload list | ||
2. Информация о нагрузке: payload info <name> | ||
3. Выбор нагрузки: payload use <name> | ||
4. Установка требуемых параметров: payload set <parameter> <value> | ||
5. Запуск: payload start | ||
8. Сохранение результатов: save <filename> | ||
9. Выход: exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
payload list | ||
Выводит список доступных нагрузок | ||
payload info | ||
payload info <paiload_name> | ||
Выводит информацию о выбранной нагрузке. | ||
payload use <payload_name> | ||
Выбирает нагрузку для использования в дальнейшей атаке. | ||
Можно и нужно выбрать только одну нагрузку. | ||
payload set <var_name> <var_value> | ||
payload set <var_name> <value_1> <value_2> ... <value_n> | ||
Устанавливает значение переменной, используемой в нагрузке | ||
payload start | ||
Запускает нагрузку. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
payload info | ||
payload info <paiload_name> | ||
|
||
Выводит информацию о выбранной нагрузке. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
payload list | ||
|
||
Выводит список доступных нагрузок |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
payload set <var_name> <value> | ||
payload set <var_name> <value_1> <value_2> ... <value_n> | ||
|
||
Устанавливает значение переменной, используемой в нагрузке |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
payload start | ||
|
||
Запускает нагрузку. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
payload use <payload_name> | ||
|
||
Выбирает нагрузку для использования в дальнейшей атаке. | ||
Можно и нужно выбрать только одну нагрузку. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target add <user_id> | ||
target add <user_id_1> <user_id_2> ... <user_id_n> | ||
|
||
Добавляет пользователя в список целей |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target add <user_id> | ||
target add <user_id_1> <user_id_2> ... <user_id_n> | ||
|
||
удаляет пользователя из списка целей |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
target list | ||
|
||
Выводит список целей |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
vector add | ||
vector add <link> | ||
vector add <link1> <link_2> ... <link_n> | ||
|
||
При вводе команды без параметров программа выдаст ссылку, по которой необходимо | ||
перейти. На данной странице нужно нажать "разрешить", скопировать ссылку | ||
итоговой страницы и ввести команду на добавление вектора уже с данной ссылкой: | ||
vector add <link> | ||
|
||
Можно через пробел указывать несколько ссылок сразу: | ||
vector add <link1> <link_2> ... <link_n> | ||
|
||
Все векторы при выходе из программы сохраняются в файле "vectors" и заново | ||
инициализируются при каждом запуске программы. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vector delete <user_id> | ||
vector delete <user_id_1> <user_id_2> ... <user_id_n> | ||
|
||
Удаляет источник из списка доступных. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
vector get | ||
vector get <user_id> | ||
vector get <user_id_1> <user_id_2> ... <user_id_n> | ||
|
||
Используется для получения векторов атаки для заданных целей. Для этого из | ||
списка доступных векторов для каждой цели выбирается наиболее близкий вектор. | ||
|
||
Возможные уровни векторов: | ||
1. Источник и цель совпадают | ||
2. Цель находится в списке друзей источника | ||
3. У источника и цели есть общие друзья | ||
4. Выбран случайный источник из списка доступных |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vector list | ||
|
||
Выводит список источников и исписок векторов |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import readline | ||
|
||
class MyCompleter(object): # Custom completer | ||
|
||
def __init__(self, options): | ||
self.options = sorted(options) | ||
|
||
def complete(self, text, state): | ||
if state == 0: # on first trigger, build possible matches | ||
if text: # cache matches (entries that start with entered text) | ||
self.matches = [s for s in self.options | ||
if s and s.startswith(text)] | ||
else: # no text entered, all matches possible | ||
self.matches = self.options[:] | ||
|
||
# return match indexed by state | ||
try: | ||
return self.matches[state] | ||
except IndexError: | ||
return None | ||
|
||
keywords = [ | ||
'vector ', | ||
'payload ', | ||
'target ', | ||
'add ', | ||
'get ', | ||
'list ', | ||
'delete ', | ||
'info ', | ||
'use ', | ||
'set ', | ||
'start ', | ||
'help ' | ||
] | ||
from os import listdir | ||
pll = listdir('payloads') | ||
pll = [i[:-3] for i in pll if i.endswith('.py')] | ||
keywords.extend(pll) | ||
|
||
completer = MyCompleter(keywords) | ||
readline.set_completer(completer.complete) | ||
readline.parse_and_bind('tab: complete') | ||
|
||
if __name__ == '__main__': | ||
while 1: | ||
i = input("Input: ") | ||
print("You entered", i) | ||
readline.add_history(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
#!/usr/bin/python3 | ||
|
||
result = [] | ||
def myprint(*argv, sep=' ', end='\n', error=False): | ||
if error: | ||
print('\x1B[31m[!]', end=' ') | ||
else: | ||
text = sep.join([str(i) for i in argv])+end | ||
result.append(text) | ||
print(*argv, sep=sep, end='\x1B[0m'+end) | ||
|
||
|
||
from time import sleep | ||
def vk_request(vk, method, params): | ||
for i in (1,2,3,0): | ||
try: | ||
rez = vk(method, **params) | ||
except Exception as e: | ||
exc = e | ||
sleep(i) | ||
else: | ||
return rez | ||
if not str(exc).startswith('15.'): #if not "user deactivated" | ||
myprint(exc, error=True) | ||
return False | ||
|
||
|
||
import readline | ||
import inputer | ||
|
||
import vkehelp | ||
import target | ||
import vector | ||
import exploit | ||
import payload | ||
|
||
from sys import argv | ||
if len(argv)>1: | ||
fname = ' '.join(argv[1:]) | ||
try: | ||
f = open(fname) | ||
except: | ||
myprint('Файл', fname, 'не найден!', error=True) | ||
queue = [] | ||
else: | ||
queue = f.readlines() | ||
else: | ||
queue = [] | ||
|
||
|
||
|
||
def main(query): | ||
if query[0] == 'help': | ||
if len(query) == 1: | ||
query.append('main') | ||
vkehelp.fmain(query[1:]) | ||
elif query[0] == 'exit': | ||
print('Exit...') | ||
exit() | ||
elif len(query) == 1: | ||
vkehelp.fmain(query) | ||
|
||
elif query[0] == 'auto': | ||
try: | ||
f = open(' '.join(query[1:])) | ||
except: | ||
myprint('Файл не найден!', error=True) | ||
else: | ||
queue.extend(f.readlines()) | ||
|
||
elif query[0] == 'vector': | ||
if query[1] == 'add': | ||
if len(query) == 2: | ||
vector.fadd(False) | ||
else: | ||
vector.fadd(query[2:]) | ||
elif query[1] == 'list': | ||
vector.flist() | ||
elif query[1] == 'get': | ||
if len(query) == 2: | ||
vector.fget(list(target.targets)) | ||
else: | ||
vector.fget(query[2:]) | ||
elif query[1] == 'delete': | ||
if len(query) == 2: | ||
vector.fdelete(list(vector.vectors)) | ||
else: | ||
vector.fdelete(query[2:]) | ||
else: | ||
vkehelp.fmain(query) | ||
|
||
elif query[0] == 'target': | ||
if query[1] == 'list': | ||
target.flist() | ||
elif query[1] == 'delete': | ||
if len(query) == 2: | ||
target.fdelete(list(target.targets)) | ||
else: | ||
target.fdelete(query[2:]) | ||
elif len(query) == 2: | ||
vkehelp.fmain(query) | ||
elif query[1] == 'add': | ||
target.fadd(query[2:]) | ||
else: | ||
vkehelp.fmain([query[0]]) | ||
|
||
elif query[0] == 'payload': | ||
if query[1] == 'list': | ||
payload.flist() | ||
elif query[1] == 'start': | ||
payload.fstart() | ||
elif len(query) == 2: | ||
vkehelp.fmain(query) | ||
elif query[1] == 'info': | ||
payload.finfo(query[2:]) | ||
elif query[1] == 'use': | ||
payload.fuse(query[2:]) | ||
elif query[1] == 'set': | ||
payload.fset(*query[2:]) | ||
else: | ||
vkehelp.fmain([query[0]]) | ||
|
||
elif query[0] == 'save': | ||
fname = ' '.join(query[1:]) | ||
try: | ||
f = open(fname, 'w') | ||
except Exception as e: | ||
myprint(e, error=True) | ||
else: | ||
f.write(''.join(result)) | ||
f.close() | ||
print('Данные успешно сохранены!') | ||
else: | ||
myprint('Команда не найдена!', error=True) | ||
|
||
if __name__ == '__main__': | ||
try: | ||
while 1: | ||
if queue: | ||
query = queue.pop(0).replace('\n', '') | ||
print('\x1B[32m>', query, '\x1B[0m') | ||
else: | ||
query = input('\x1B[32m> ') | ||
print('\x1B[0m', end='') | ||
if not query: | ||
continue | ||
readline.add_history(query) | ||
query = query.split() | ||
main(query) | ||
except (EOFError, KeyboardInterrupt): | ||
print('\x1B[0m\nExit...') | ||
#except Exception as e: | ||
# myprint(e, error=True) | ||
finally: | ||
if vector.utokens: | ||
from pickle import dump | ||
with open('vectors', 'wb') as f: | ||
dump(vector.utokens, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from __main__ import vk_request, myprint | ||
import functools | ||
from random import choice | ||
|
||
from target import targets, vectors | ||
from vector import vectors as vectors_info | ||
def get_vk(uid=False): | ||
if uid: | ||
if uid in vectors_info: | ||
return vectors_info[uid] | ||
if uid in vectors: | ||
vector_id, lvl = vectors[uid] | ||
return vectors_info[vector_id] | ||
return choice(list(vectors_info.values())) | ||
|
||
@functools.lru_cache(maxsize=300) | ||
def friends(uid, vk=False): | ||
if not vk: | ||
vk = get_vk(uid) | ||
rez = vk_request(vk, 'friends.get', {'user_id': uid}) | ||
if rez: | ||
return set(rez['items']) | ||
else: | ||
return set() | ||
|
||
|
||
@functools.lru_cache(maxsize=100) | ||
def names(uid, vk=False): | ||
if not vk: | ||
try: | ||
vk = get_vk(uid) | ||
except IndexError: | ||
myprint('Прежде всего необходимо добавить векторы!') | ||
return '' | ||
if int(uid) > 0: | ||
rez = vk_request(vk, 'users.get', {'user_ids': uid}) | ||
if rez: | ||
return rez[0]['first_name']+' '+rez[0]['last_name'] | ||
else: | ||
return '' | ||
else: | ||
rez = vk_request(vk, 'groups.getById', {'group_ids': str(uid)[1:]}) | ||
if rez: | ||
return rez[0]['name'] | ||
else: | ||
return '' | ||
|
Oops, something went wrong.