Pastebin – популярный сайт для хранения и общего использования текста. Хотя по большей части он используется для распространения легитимных данных, судя по всему его часто используют в качестве репозитория для украденной информации (детали конфигурации сетей, аутентификационные записи). Различные хакерские группировки и индивидуальные хакеры распространяют с помощью этого сервиса свою добычу. За последние недели в этом особо отличилась группировка LulzSec.
Что популярно на Pastebin
Почему хакерам нравится Pastebin
Чем Pastebin притягивает сообщество хакеров? И почему там упорно продолжают появляться скомпрометированные записи? Чтобы разобраться в этих вопросах, я задал в твиттере вопрос: «почему именно этот, а не какой-либо другой ресурс, стал популярной платформой для размещения украденных данных?» Полученные ответы подчеркнули основные возможности Pastebin:
- сервисом легко пользоваться;
- сервис может хранить большие текстовые файлы;
- нет премодерации;
- опубликование не требует регистрации;
- сервис уходит корнями в IRC.
А Джайп (Jipe) указал мне на статью Мэта Брайена (Matt Brian) Pastebin: How a popular code-sharing site became the ultimate hacker hangout (Pastebin: Как популярный сервис для общего использования кода стал основным местом сбора хакеров).
Работа над удалением записей
Более всего в статье Мэта меня заинтересовал комментарий Жерона Вадера (Jeroen Vader), владельца Pastebin, касающийся использования сайта для хранения украденных данных. Он сказал:
«Pastebin – сайт, который ежемесячно используют миллионы, и кто-то из них размещает здесь конфиденциальную информацию. Мы используем хорошую систему мониторинга таких проявлений, которая работает круглосуточно».
Жерон объяснил, что «если приходит отчет о том, что пост содержит конфиденциальную информацию, то он может быть немедленно удален».
Этого достаточно? Я могу понять, почему ресурс не хочет взять на себя обязанность модерирования контента. Тем не менее, идентификация и пометка файлов, которые могут содержать конфиденциальную информацию, не слишком сложная задача. Для начала, Pastebin мог бы просто рассматривать записи, которые входят в топ страницы Trending Pastes.
Автоматический поиск украденных данных на Pastebin
Pastebin мог бы также автоматически проводить сигнатурный анализ размещаемых данных на предмет содержания конфиденциальной информации. Фактически, это сделал Джейм Бласко (Jaime Blasco), создавший сервис PastebinLeaks, который автоматически идентифицирует украденные данные на Pastebin. Сервис довольно точный, и его находки, опубликованные в твиттере, поражают:

Идея ничем не отличается от парсинга социальных сетей для выявления фактов опубликования данных компаний.
Исследовать технологические, исторические и социологические причины популярности Pastebin для размещения украденных данных – весьма интересное занятие. Возможно, более важным является то, что нам нужно понять, как компании могут идентифицировать факт публикации их данных на ресурсах типа Pastebin. Также, я надеюсь, что такие сайты будут внедрять проактивный мониторинг и разбираться с возможными утечками данных до формального обращения к ним с этой проблемой.
| _ _ _ ____ _ _ |
| | | | | __ _ ___| | __ | __ ) __ _ ___| | _| | |
| | |_| |/ _` |/ __| |/ / | _ / _` |/ __| |/ / | |
| | _ | (_| | (__| |
| [2] https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerUp |
| [3] https://github.com/PowerShellEmpire/Empire/blob/master/data/module_source/privesc/Invoke-BypassUAC.ps1 |
| Remote Movement: |
| 1) psexec |
| The tried and true method for lateral movement on windows. You can use |
| psexec [1], winexe [2], metasploit’s psexec_psh [3], Powershell Empire’s |
| invoke_psexec [4], or the builtin windows command "sc" [5]. For the |
| metasploit module, powershell empire, and pth-winexe [6], you just need the |
| hash, not the password. It’s the most universal method (it works on any |
| windows computer with port 445 open), but it’s also the least stealthy. |
| Event type 7045 "Service Control Manager" will appear in the event logs. In |
| my experience, no one has ever noticed during a hack, but it helps the |
| investigators piece together what the hacker did afterwards. |
| 2) WMI |
| The most stealthy method. The WMI service is enabled on all windows |
| computers, but except for servers, the firewall blocks it by default. You |
| can use wmiexec.py [7], pth-wmis [6] (here’s a demonstration of wmiexec and |
| pth-wmis [8]), Powershell Empire’s invoke_wmi [9], or the windows builtin |
| wmic [5]. All except wmic just need the hash. |
| 3) PSRemoting [10] |
| It’s disabled by default, and I don’t recommend enabling new protocols. |
| But, if the sysadmin has already enabled it, it’s very convenient, |
| especially if you use powershell for everything (and you should use |
| powershell for almost everything, it will change [11] with powershell 5 and |
| windows 10, but for now powershell makes it easy to do everything in RAM, |
| avoid AV, and leave a small footprint) |
| 4) Scheduled Tasks |
| You can execute remote programs with at and schtasks [5]. It works in the |
| same situations where you could use psexec, and it also leaves a well known |
| footprint [12]. |
| 5) GPO |
| If all those protocols are disabled or blocked by the firewall, once you’re |
| Domain Admin, you can use GPO to give users a login script, install an msi, |
| execute a scheduled task [13], or, like we’ll see with the computer of |
| Mauro Romeo (one of Hacking Team’s sysadmins), use GPO to enable WMI and |
| open the firewall. |
| [1] https://technet.microsoft.com/en-us/sysinternals/psexec.aspx |
| [2] https://sourceforge.net/projects/winexe/ |
| [3] https://www.rapid7.com/db/modules/exploit/windows/smb/psexec_psh |
| [4] http://www.powershellempire.com/?page_ > |
| [5] http://blog.cobaltstrike.com/2014/04/30/lateral-movement-with-high-latency-cc/ |
| [6] https://github.com/byt3bl33d3r/pth-toolkit |
| [7] https://github.com/CoreSecurity/impacket/blob/master/examples/wmiexec.py |
| [8] https://www.trustedsec.com/june-2015/no_psexec_needed/ |
| [9] http://www.powershellempire.com/?page_ > |
| [10] http://www.maquinasvirtuales.eu/ejecucion-remota-con-powershell/ |
| [11] https://adsecurity.org/?p=2277 |
| [12] https://www.secureworks.com/blog/where-you-at-indicators-of-lateral-movement-using-at-exe-on-windows-7-systems |
| [13] https://github.com/PowerShellEmpire/Empire/blob/master/lib/modules/lateral_movement/new_gpo_immediate_task.py |
| "In place" Movement: |
| 1) Token Stealing |
| Once you have admin access on a computer, you can use the tokens of the |
| other users to access resources in the domain. Two tools for doing this are |
| incognito [1] and the mimikatz token::* commands [2]. |
| 2) MS14-068 |
| You can take advantage of a validation bug in Kerberos to generate Domain |
| Admin tickets [3][4][5]. |
| 3) Pass the Hash |
| If you have a user’s hash, but they’re not logged in, you can use |
| sekurlsa::pth [2] to get a ticket for the user. |
| 4) Process Injection |
| Any RAT can inject itself into other processes. For example, the migrate |
| command in meterpreter and pupy [6], or the psinject [7] command in |
| powershell empire. You can inject into the process that has the token you |
| want. |
| 5) runas |
| This is sometimes very useful since it doesn’t require admin privileges. |
| The command is part of windows, but if you don’t have a GUI you can use |
| powershell [8]. |
| [1] https://www.indetectables.net/viewtopic.php?p=211165 |
| [2] https://adsecurity.org/?page_ > |
| [3] https://github.com/bidord/pykek |
| [4] https://adsecurity.org/?p=676 |
| [5] http://www.hackplayers.com/2014/12/CVE-2014-6324-como-validarse-con-cualquier-usuario-como-admin.html |
| [6] https://github.com/n1nj4sec/pupy |
| [7] http://www.powershellempire.com/?page_ > |
| [8] https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Invoke-Runas.ps1 |
| —-[ 13.2 — Persistence ]—————————————————— |
| Once you have access, you want to keep it. Really, persistence is only a |
| challenge for assholes like Hacking Team who target activists and other |
| individuals. To hack companies, persistence isn’t needed since companies never |
| sleep. I always use Duqu 2 style "persistence", executing in RAM on a couple |
| high-uptime servers. On the off chance that they all reboot at the same time, |
| I have passwords and a golden ticket [1] as backup access. You can read more |
| about the different techniques for persistence in windows here [2][3][4]. But |
| for hacking companies, it’s not needed and it increases the risk of detection. |
| [1] http://blog.cobaltstrike.com/2014/05/14/meterpreter-kiwi-extension-golden-ticket-howto/ |
| [2] http://www.harmj0y.net/blog/empire/nothing-lasts-forever-persistence-with-empire/ |
| [3] http://www.hexacorn.com/blog/category/autostart-persistence/ |
| [4] https://blog.netspi.com/tag/persistence/ |
| —-[ 13.3 — Internal reconnaissance ]—————————————— |
| The best tool these days for understanding windows networks is Powerview [1]. |
| It’s worth reading everything written by it’s author [2], especially [3], [4], |
| [5], and [6]. Powershell itself is also quite powerful [7]. As there are still |
| many windows 2000 and 2003 servers without powershell, you also have to learn |
| the old school [8], with programs like netview.exe [9] or the windows builtin |
| "net view". Other techniques that I like are: |
| 1) Downloading a list of file names |
| With a Domain Admin account, you can download a list of all filenames in |
| the network with powerview: |
| Invoke-ShareFinderThreaded -ExcludedShares IPC$,PRINT$,ADMIN$ | |
| select-string ‘^(.*) -‘ | % |
| select fullname | out-file -append files.txt> |
| Later, you can read it at your leisure and choose which files to download. |
| 2) Reading email |
| As we’ve already seen, you can download email with powershell, and it has a |
| lot of useful information. |
| 3) Reading sharepoint |
| It’s another place where many businesses store a lot of important |
| information. It can also be downloaded with powershell [10]. |
| 4) Active Directory [11] |
| It has a lot of useful information about users and computers. Without being |
| Domain Admin, you can already get a lot of info with powerview and other |
| tools [12]. After getting Domain Admin, you should export all the AD |
| information with csvde or another tool. |
| 5) Spy on the employees |
| One of my favorite hobbies is hunting sysadmins. Spying on Christian Pozzi |
| (one of Hacking Team’s sysadmins) gave me access to a Nagios server which |
| gave me access to the rete sviluppo (development network with the source |
| code of RCS). With a simple combination of Get-Keystrokes and |
| Get-TimedScreenshot from PowerSploit [13], Do-Exfiltration from nishang |
| [14], and GPO, you can spy on any employee, or even on the whole domain. |
| [1] https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerView |
| [2] http://www.harmj0y.net/blog/tag/powerview/ |
| [3] http://www.harmj0y.net/blog/powershell/veil-powerview-a-usage-guide/ |
| [4] http://www.harmj0y.net/blog/redteaming/powerview-2-0/ |
| [5] http://www.harmj0y.net/blog/penetesting/i-hunt-sysadmins/ |
| [6] http://www.slideshare.net/harmj0y/i-have-the-powerview |
| [7] https://adsecurity.org/?p=2535 |
| [8] https://www.youtube.com/watch?v=rpwrKhgMd7E |
| [9] https://github.com/mubix/netview |
| [10] https://blogs.msdn.microsoft.com/rcormier/2013/03/30/how-to-perform-bulk-downloads-of-files-in-sharepoint/ |
| [11] https://adsecurity.org/?page_ > |
| [12] http://www.darkoperator.com/?tag=Active+Directory |
| [13] https://github.com/PowerShellMafia/PowerSploit |
| [14] https://github.com/samratashok/nishang |
| —[ 14 — Hunting Sysadmins ]—————————————————- |
| Reading their documentation about their infrastructure [1], I saw that I was |
| still missing access to something important — the "Rete Sviluppo", an isolated |
| network with the source code for RCS. The sysadmins of a company always have |
| access to everything, so I searched the computers of Mauro Romeo and Christian |
| Pozzi to see how they administer the Sviluppo network, and to see if there |
| were any other interesting systems I should investigate. It was simple to |
| access their computers, since they were part of the windows domain where I’d |
| already gotten admin access. Mauro Romeo’s computer didn’t have any ports |
| open, so I opened the port for WMI [2] and executed meterpreter [3]. In |
| addition to keylogging and screen scraping with Get-Keystrokes and |
| Get-TimeScreenshot, I used many /gather/ modules from metasploit, CredMan.ps1 |
| [4], and searched for interesting files [5]. Upon seeing that Pozzi had a |
| Truecrypt volume, I waited until he’d mounted it and then copied off the |
| files. Many have made fun of Christian Pozzi’s weak passwords (and of |
| Christian Pozzi in general, he provides plenty of material [6][7][8][9]). I |
| included them in the leak as a false clue, and to laugh at him. The reality is |
| that mimikatz and keyloggers view all passwords equally. |
| [1] http://hacking.technology/Hacked%20Team/FileServer/FileServer/Hackingteam/InfrastrutturaIT/ |
| [2] http://www.hammer-software.com/wmigphowto.shtml |
| [3] https://www.trustedsec.com/june-2015/no_psexec_needed/ |
| [4] https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Credentials-d44c3cde |
| [5] http://pwnwiki.io/#!presence/windows/find_files.md |
| [6] http://archive.is/TbaPy |
| [7] http://hacking.technology/Hacked%20Team/c.pozzi/screenshots/ |
| [8] http://hacking.technology/Hacked%20Team/c.pozzi/Desktop/you.txt |
| [9] http://hacking.technology/Hacked%20Team/c.pozzi/credentials/ |
| —[ 15 — The bridge ]———————————————————— |
| Within Christian Pozzi’s Truecrypt volume, there was a textfile with many |
| passwords [1]. One of those was for a Fully Automated Nagios server, which had |
| access to the Sviluppo network in order to monitor it. I’d found the bridge I |
| needed. The textfile just had the password to the web interface, but there was |
| a public code execution exploit [2] (it’s an unauthenticated exploit, but it |
| requires that at least one user has a session initiated, for which I used the |
| password from the textfile). |
| [1] http://hacking.technology/Hacked%20Team/c.pozzi/Truecrypt%20Volume/Login%20HT.txt |
| [2] http://seclists.org/fulldisclosure/2014/Oct/78 |
| —[ 16 — Reusing and resetting passwords ]————————————— |
| Reading the emails, I’d seen Daniele Milan granting access to git repos. I |
| already had his windows password thanks to mimikatz. I tried it on the git |
| server and it worked. Then I tried sudo and it worked. For the gitlab server |
| and their twitter account, I used the "forgot my password" function along with |
| my access to their mail server to reset the passwords. |
| —[ 17 — Conclusion ]———————————————————— |
| That’s all it takes to take down a company and stop their human rights abuses. |
| That’s the beauty and asymmetry of hacking: with 100 hours of work, one person |
| can undo years of work by a multi-million dollar company. Hacking gives the |
| underdog a chance to fight and win. |
| Hacking guides often end with a disclaimer: this information is for |
| educational purposes only, be an ethical hacker, don’t attack systems you |
| don’t have permission to, etc. I’ll say the same, but with a more rebellious |
| conception of "ethical" hacking. Leaking documents, expropriating money from |
| banks, and working to secure the computers of ordinary people is ethical |
| hacking. However, most people that call themselves "ethical hackers" just work |
| to secure those who pay their high consulting fees, who are often those most |
| deserving to be hacked. |
| Hacking Team saw themselves as part of a long line of inspired Italian design |
| [1]. I see Vincenzetti, his company, his cronies in the police, Carabinieri, |
| and government, as part of a long tradition of Italian fascism. I’d like to |
| dedicate this guide to the victims of the raid on the Armando Diaz school, and |
| to all those who have had their blood spilled by Italian fascists. |
| [1] https://twitter.com/coracurrier/status/618104723263090688 |
| —[ 18 — Contact ]————————————————————— |
| To send me spear phishing attempts, death threats in Italian [1][2], and to |
| give me 0days or access inside banks, corporations, governments, etc. |
| [1] http://andres.delgado.ec/2016/01/15/el-miedo-de-vigilar-a-los-vigilantes/ |
| [2] https://twitter.com/CthulhuSec/status/619459002854977537 |
| only encrypted email please: |
| https://securityinabox.org/es/thunderbird_usarenigmail |
| ——BEGIN PGP PUBLIC KEY BLOCK—— |
| mQENBFVp37MBCACu0rMiDtOtn98NurHUPYyI3Fua+bmF2E7OUihTodv4F/N04KKx |
| vDZlhKfgeLVSns5oSimBKhv4Z2bzvvc1w/00JH7UTLcZNbt9WGxtLEs+C+jF9j2g |
| 27QIfOJGLFhzYm2GYWIiKr88y95YLJxvrMNmJEDwonTECY68RNaoohjy/TcdWA8x |
| +fCM4OHxM4AwkqqbaAtqUwAJ3Wxr+Hr/3KV+UNV1lBPlGGVSnV+OA4m8XWaPE73h |
| VYMVbIkJzOXK9enaXyiGKL8LdOHonz5LaGraRousmiu8JCc6HwLHWJLrkcTI9lP8 |
| Ms3gckaJ30JnPc/qGSa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WvSR7nwcUkZglZCq3Jpmsy1VLjCrMC4hXnFeGi9AX1fh28RYHudh8pecnGKh+Gi |
| JKp0XtOqGF5NH/Zdgz6t+Z8U++vuwWQaubMJTRdMTGhaRv+jIzKOiO9YtPNamHRq |
| Mf2vA3oqf22vgWQbK1MOK/4Tp6MGg/VR2SaKAsqyAZC7l5TeoSPN5HdEgA7u5GpB |
| D0lLGUSkx24yD1sIAGEZ4B57VZNBS0az8HoQeF0k |
| =E5+y |
| ——END PGP PUBLIC KEY BLOCK—— |
| If not you, who? If not now, when? |
| _ _ _ ____ _ _ |
| | | | | __ _ ___| | __ | __ ) __ _ ___| | _| | |
| | |_| |/ _` |/ __| |/ / | _ / _` |/ __| |/ / | |
| | _ | (_| | (__| |
This comment has been minimized.
Copy link Quote reply
mnranas commented Jul 22, 2016
- © 2019 GitHub, Inc.
- Terms
- Privacy
- Security
- Status
- Help
You can’t perform that action at this time.
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.

Всем привет! Сегодня мы поговорим про сервис pastebin.com.
pastebin.com — сервис, который позволяет обмениваться фрагментами текста с окружающими. Обычно это код. Если вы подписаны на какие-то группы программистов, то могли часто видеть правила, что фрагменты кода, большие какого-то определенного количества строк, должны быть вставлены в сервис pastebin.com, а в комментариях нужно просто дать ссылку. Естестевенно, это не единственный сервис такого рода, но он считается лучшим.
Во-первых, он поддерживает кириллицу в полной мере, что делают не все, следовательно, проблем с copy-paste у вас не будет.
Во-вторых, есть функция, показывающая различия версий.
В-третьих, присутствует капча, благодаря чему спама вы не увидите.
В-четвертых, понятный и удобный интерфейс, позволяющий удобно работать с кодом.
В-пятых, нет той самой назойливой рекламы, из-за которой многие хорошие сервисы теряют посетителей.
Здесь я перечислил одни из его основных плюсов, хотя, понятно, что их больше.
Разобраться с сервисом, думаю, не составит труда. Перейдите по ссылке pastebin.com, вставьте в поле свой код, выберите ниже нужную подсветку синтаксиса, срок годности, область видимости и название. Теперь нажмите на кнопку Submit. Поздравляю, это все, что нужно! Теперь вы можете скопировать ссылку такого вида: http://pastebin.com/0JeNRG3D и отправлять ее тому, кому хотите показать ваш код.
Сервис еще удобен и тем, что вам не нужно регистрироваться, чтобы пользоваться им, а также имеются версии для:
Помимо всего вышесказанного, у сервиса есть хороший API, который вы можете смело использовать на своих сайтах.
Итак, сегодня мы поговорили про сервис pastebin.com и, думаю, теперь вы часто будете им пользоваться.
Спасибо за внимание и удачи!

Копирование материалов разрешается только с указанием автора (Михаил Русаков) и индексируемой прямой ссылкой на сайт (http://myrusakov.ru)!
Добавляйтесь ко мне в друзья ВКонтакте: http://vk.com/myrusakov.
Если Вы хотите дать оценку мне и моей работе, то напишите её в моей группе: http://vk.com/rusakovmy.
Если Вы не хотите пропустить новые материалы на сайте,
то Вы можете подписаться на обновления: Подписаться на обновления
Если у Вас остались какие-либо вопросы, либо у Вас есть желание высказаться по поводу этой статьи, то Вы можете оставить свой комментарий внизу страницы.
Порекомендуйте эту статью друзьям:
Если Вам понравился сайт, то разместите ссылку на него (у себя на сайте, на форуме, в контакте):
Она выглядит вот так:
Комментарии ( 1 ):
Кстати есть русский клон, доступен он по адресу: pastebin.ru
Для добавления комментариев надо войти в систему.
Если Вы ещё не зарегистрированы на сайте, то сначала зарегистрируйтесь.
Copyright © 2010-2019 Русаков Михаил Юрьевич. Все права защищены.






