SURFnet/AIRT

GitHub: SURFnet/AIRT

AIRT 是一个为安全事件响应团队设计的事件管理与协作平台,帮助团队高效跟踪、分类和处理安全事件。

Stars: 6 | Forks: 2

## 概述 AIRT 曾经在 http://www.airt.nl 有一个主页。 ## 安装说明 这取决于您想如何安装 AIRT 系统。最简单的方法是从软件包安装,但如果您读到这里,您可能想要做一些更复杂的操作。 对于 AIRT 的典型开发安装(在个人工作站上),请确保您拥有带有 PHP 的可用 Apache 和可用的 PostgreSQL 数据库服务器。然后 cd 到源代码目录并输入: $ ./bootstrap 这会创建 GNU Autoconf 系统需要的一些脚本和文件。现在输入: $ ./configure 默认情况下,它会将相关内容配置到以下位置: /usr/local/bin CLI 程序:airt_import, airt_export... /usr/local/etc/airt 配置文件:airt.cfg, importqueue.cfg... /usr/local/lib/man man 手册页:airt.1, airt_export.1... /usr/local/share/airt/php 将在 www 上发布的 PHP 文件。 /usr/local/share/airt/lib 不在 www 上发布的 PHP(库)文件。 /usr/local/share/doc/airt 文档文件。 它实际上并没有将文件放到那里。./configure 只是创建了一堆填充了正确路径的文件,这样您现在可以输入: $ make 这会生成更多的文件,并使您的源代码树中散落着代码的生产版本。但上面的目录列表中仍然没有安装任何东西。为此,您需要: $ make install 您也可以在较低层级的目录中执行此操作。例如,如果您修改了 source/php 目录中的某些内容,您只需要在该目录中执行 "make install",因为所有其他目录都没有被更改。 特别是在 source/etc 目录中,您通常不会希望执行 "make install",因为这会用带有默认值的新版本覆盖您自己的实时配置文件(在 /usr/local/etc/airt 中)。如果您在 source 目录本身执行 "make install",它将向下递归遍历整个目录树,因此考虑到 etc 目录,请务必小心。 bootstrap、configure 和 make 是“安全的”,它们不会触碰您正在运行的 AIRT 安装环境中的任何内容。"make install" 并不安全,它会触碰您正在运行的 AIRT 安装环境中的内容,通常您不希望 etc 目录被触碰。 您还需要安装以下软件包: $ apt install php-mail php-mail-mime php-mail-mimedecode php-soap ## 站点定制 没有任何两个事件响应团队是完全相同的。AIRT 提供了许多本地站点定制钩子,可用于针对本地环境量身定制其行为。目前提供的钩子有 * 特定站点的 IP 地址分类 根据站点的设置,将 IP 地址简单分类到网络中可能是不够的。AIRT 通过定义一个函数提供定制功能 function custom_categorize($ip, $networkid) { return $networkid; } 该函数接受需要分类的 IP 地址以及由 AIRT 内置分类系统将其归入的网络 ID 作为输入。返回您希望该 IP 分类的网络 ID。 * 特定站点的 IP 地址详细信息 在 IP 地址被分类到网络中之后,可以通过定义此函数来提供额外的详细信息。请注意,可以在此函数中查看会话变量。可设置的会话变量列表可以在文档树中找到。 function search_info($ip, $networkid) { return; } // search_info * "events" 的钩子 使用 customfunctions.plib 列表添加自定义事件处理程序。事件处理程序采用以下格式 addEventHandler($eventType, $handlerFunction) 例如,要添加用于创建新事件的本地事件处理程序,请添加一行 addEventHander("newincident", "local_NewIncident"); 每次创建新事件时,都会调用函数 local_NewIncident,该函数可以接受一个参数。该参数将包含特定于事件的字符串。 ## 软件包安装手册 1. 安装后配置 AIRT 安装 AIRT 后,需要执行一些操作。 步骤 1. 创建配置文件中引用的数据库。通常,这可以通过切换到 postgres 用户并执行以下命令来实现 postgres:~% createdb airt CREATE DATABASE 步骤 2. 创建配置文件中引用的数据库用户。例如, postgres:~% createuser airt --no-createdb --no-adduser -P CREATE USER 系统将提示您输入 AIRT 用户的密码。请妥善保管此密码,因为您稍后还会用到它。 ``` Step 3. Edit /opt/airt/etc/airt/airt/airt.cfg and set the variables apropriately. Note that the configuration file is a regular PHP program, and any PHP construct can be used in it. For example, it is possible to move the database password out of the main configuration file and move it to its own file by using PHP's require_once operator. Step 4 (preferred). Make sure that the airt user has access to the database. Edit pg_ident.conf and add a map airt-users www-data airt Also, in pg_hba.conf, make sure that the airt-users have access to the database. local airt airt ident airt-users Step 4 (alternative). If you do not wish to use ident maps, you need to use username/password authentication. Since the password will be available in plain text in your filesystem, you will need to take precautions. Make sure the airt user has access to the database. Edit pg_hba.conf. On most systems, that file can be found in /etc/postgresql, but your milage may vary. Keep in mind that the order of access control rules in pg_hba.conf is important. Add the following line after the line which grants the postgres user access to all databases: local airt airt password Step 5. As root, signal postgres to reload the configuration. On most installations, this may be achieved by a command similar to /etc/init.d/postgresql restart, however you may have chosen a different setup. Debian administrators may use the command: root:~# invoke-rc.d postgresql reload Step 6. Initialise the database. Dont worry if the script outputs ERRORs in the the beginning; this is due to the fact that it tries to drop sequences and tables that may not exist yet. Having psql and gunzip in your PATH, do: postgres:~% gunzip -c /opt/airt/doc/database/airtschema.sql.gz \ |psql airt airt Step 7. Bootstrap the database. postgres:~% psql airt airt < \ /opt/airt/doc/database/airtbootstrap.sql Step 8. Configure your web server. If you are using Apache, the easiest way to do this is to add a symbolic link in your configuration directory and include that file. Debian administrators can achieve the same by adding a symbolic link in /etc/apache/conf.d (or /etc/apache2/conf.d) which leads to /opt/airt/etc/airt/airt/airt-apache.conf Step 9. Confirm that the configuration file is correct. Apache administrators do root:~# apachectl configtest (or apache2ctl, or apache-sslctl, etc) Step 10. If everything checks out, reload the apache configuration and you should be done. If apache is already running, do root:~# /etc/init.d/apache reload else do root:~# /etc/init.d/apache start Step 11. Change the admin password. Point your browser at the machine that hosts the application, typically: http://your.host.com/airt/ (mind the trailing slash) and log in with user admin, password admin. On the main menu, click Edit settings > Edit users. Then, on the line with the admin user, click edit and set a (different) password. ``` ## AIRT 软件包卸载手册 卸载 AIRT 包括以下步骤: ``` Step 1: Remove PHP files; generally this may be achieved by root:~# rm -rf /usr/share/airt Depending on your packacing policy, this may differ. Debian administrators do root:~# apt-get remove --purge airt Step 2: Remove data files. Generally this may be achieved by root:~# rm -rf /var/lib/airt Debian administrators can skip this step, as it is taken care of by the --purge option to apt-get remove. Step 3: Remove the database. This may be achieved by postgres:~% psql template1 Welcome to psql 7.4.6, the PostgreSQL interactive terminal. ... template1=# drop database airt; DROP database Step 4: Remove the database user. This may be achieved by template1=# drop user airt; DROP USER Step 5: Update pg_hba.conf. Remove the line which grants access to the airt database from pg_hba.conf and signal Postgresql to reload its configuration files. ``` ## AIRT 软件包升级手册 如果您在带有活动数据库的情况下升级 AIRT,当前的软件包系统*还不会*自动执行数据库架构升级。您需要手动执行此操作。但是,我们为您提供了一个工具来完成此操作。 每个版本都包含一个数据库架构文件,可用于将您当前的数据库与其应有的状态进行比较。该文件是 /opt/airt/doc/database/airtschema.sql。在任何时候,您的数据库都应与此架构文件保持一致。 在相关时,新版本会包含一个数据库升级脚本来促进您的数据库升级。升级脚本命名为: /opt/airt/doc/database/airtschema-from-PREVREL-to-CURRENTREL.sql 如果您针对来自 PREVREL 的数据库运行相应的脚本,您有望得到一个用于 CURRENTREL 的数据库。开发团队已经测试了这些升级脚本,但一如既往,在对数据库运行任何非同寻常的操作之前,先完整备份您的 AIRT 数据库是明智之举。 示例升级会话(先备份,然后升级): ``` postgres:~% pg_dump -f /var/tmp/airt-20050607.1.sql airt postgres:~% psql airt airt < \ /opt/airt/doc/database/airtschema-from-20050607.1-to-20050610.1.sql ``` 如果您看到任何警告或错误,请仔细检查它们。在许多情况下,这并不是真正的问题,但出于一致性原因,您应该尝试修复这些引起问题的错误。 ## 使用 GPG 对外发邮件进行数字签名 AIRT 能够使用 GPG 对邮件进行数字签名。要启用此功能,请编辑配置文件并取消注释定义 GPG_KEYID 的行。将 keyID 替换为您自己的密钥,并将 GPG_HOMEDIR 设置为一个可以找到密钥环的目录,该密钥环包含必须用于签名邮件的密钥。 GPG_HOMEDIR 应指向一个属于 www-data.www-data 且权限模式为 700 的目录。必须存在于该目录中的 pubring.gpg 和 secring.gpg 文件的权限必须为 500。 # EOF
标签:AIRT, Apache, ESC漏洞, ffuf, FTP漏洞扫描, GPT, incident response, OpenVAS, PHP, PostgreSQL, SecOps, SOC工具, 事件响应团队, 云安全架构, 威胁管理, 安全事件响应, 安全编排, 安全运营, 工单管理, 库, 应急响应, 扫描框架, 数据库, 测试用例, 漏洞发现, 漏洞管理, 证据收集