Skip to content

photonepoch/1C-as-Initial-Access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

1C-as-Initial-Access

Этот проект показывает PoC как специалист red team может использовать возможности 1С для получение доступа к тестируемой машине.

PoC Video

PoC.2.mp4

Мануал

Перед тем как мы начнем, опишу используемое ПО:

  • 1C Предприятие 8 - Что бы разработать внешнюю обработку в конфигуратор и запустить её режиме предприятия
  • Wampserver - Сервер который выдаст полезную нагрузку в виде простого MessageBox

Файлы в репозитории:

  • code.1c - Файл с исходным кодом на 1С
  • sample.epf - Файл внешней обработки который использовался в видео

Создадим любой проект в режиме Конфигуратора

  1. Создадим внешнюю обработку, используя Файл -> Новый -> Внешняя обработка. 1

  2. Назовем его как хотим и нажмем на "лупу". 2

  3. Нажимаем "Готово". 3

  4. Добавляем команду и переносим её на панель, что бы пользователь нажал на кнопку и запустил нагрузку. 4 . 5

  5. Добавляем код из файла code.1c и сохраняем файл. 7

  6. Теперь мы можем как пример отправить письмо заинтересованному лицу (обычно бухгалтер), со следующим притекстом: Здравствуйте, мы компания, которая занимается 1С Разработкой, и у нас появился новый продукт по интеграции ЭДО, Ватсап, чего-либо-еще. Мы создали внешнюю обработку, попробуйте запустить её в 1С

Заметки

  1. Так как это PoC, то функционал предоставленный здесь довольно мал и сегодняшние технологии защиты быстро отсекут полезную нагрузку. Можно попытаться сделать запуск полезной нагрузки как fileless вызывая PowerShell.
  2. Прошу заметить что у каждого пользователя 1С стоят очень разные настройки. В видео запуска были видны "предупреждения", хотя при тестировании одного и того же кода на другой системе таких же уведомлений не поступало.

English Speaking Version

1C-as-Initial-Access

This project is Proof-of-Concept of using quite popular software called 1C as a means to achieve initial foothold at internal network.

What is 1C?

1C is complex ecosystem of software products in use in CIS countries (particularly Russia). Most often it is used for internal finance bookkeeping. You can learn more about particular use case related to this manual here: https://v8.1c.ru/buhv8/

How can I leverage 1C to achieve initial access?

Before we dive in, let me tell what I use for this PoC: I use Windows 10 machine with following software:

  • 1C Предприятие 8 - to develop this PoC and run it
  • Wampserver - to host simple MessageBox PE executable (http://localhost/hello.exe)

Files in repository are:

  • code.1c - source code
  • sample.epf - the "dropper" used in video

First let create any project under 1C and get to Конфигуратор mode

  1. We need to create Внешняя обработка, using Файл -> Новый -> Внешняя обработка. 1

  2. Then we name project whatever we want and click at icon of magnifying glass. 2

  3. Just click "Готово". 3

  4. We create command and move it to the form so user could click button and launch our payload. 4 . 5

  5. Insert code from code.1c file. 7

  6. After all of this, we could use mail to send phishing message to accountant (much more chance that they use 1C to do everyday tasks) with pretext like this: Hello, We are 1C Software development company and we created new product to integrate your database with Jira/Whatsapp whatever. You could try it using out external configuration. Please download it and put it inside your active 1C Client instance so you could see how amazing our product is

TODO

As 1C language could leverage COM objects and many more features, we can create fileless dropper. In video you can see user could be presented with warnings, but keep in mind that security configuration differs between different versions of 1C, different databases in use etc. I had tested it on two different machines, with different 'Demo database' configurations and language settings yet I wasnt warned as much as in PoC video.

About

Using 1C as means to get initial access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages