Home

Awesome

Role Description

Installs Thinkst OpenCanary and configures options.

Example Playbooks

Install from Github Branch

- hosts: canaries
  roles:
    - role: ansible-role-opencanary
      vars:
        opencanary_version: master
        install_source: github
        portscan_enabled: "true"
        ssh_enabled: "true"
        ssh_port: 2222

Install from PyPi.Org

- hosts: canaries
  roles:
    - role: ansible-role-opencanary
      vars:
        opencanary_version: 0.9.0
        portscan_enabled: "true"
        mssql_enabled: "true"
        smb_enabled: "true"
        samba_share: "E$"

Install from PyPi.Org and ignore IP's

- hosts: canaries
  roles:
    - role: ansible-role-opencanary
      vars:
        opencanary_version: 0.9.0
        ip_ignorelist:
          - 192.168.1.54/24
          - 192.168.1.154/24
        portscan_enabled: "true"
        mssql_enabled: "true"
        smb_enabled: "true"
        samba_share: "E$"

Role Variables

NameDefault ValueDescription
opencanary_install_dir/opt/opencanaryInstall directory for opencanary virtual environment.
opencanary_versionlatestSpecifies the version of OpenCanary to install from PyPi.org/GitHub Tag/Branch.
install_sourcepypiSpecifies where to get the install from PyPi.org or GitHub.
github_src_dir/opt/opencanary_srcDirectory to clone git repo to and build src.
device_node_idopencanary-{{ ansible-hostname }}OpenCanary device node id.
ip_ignorelistN/AAnsible list of IP addresses using CIDR notation.
logtype_ignorelistN/ASpace delimited list of log codetypes to ignore.
git_enabledfalseEnable git canary.
git_port9418Port for git canary.
ftp_enabledfalseEnable ftp canary.
ftp_port21Port for ftp canary.
ftp_bannerFTP Server ReadyBanner for ftp canary.
http_bannerApache/2.2.22 (Ubuntu)Banner for http canary.
http_enabledfalseEnable http canary.
http_port80Port for http canary.
http_skinbasicLoginSkin to use for http canary. (basicLogin, nasLogin)
http_customskin_folderN/AFolder to copy to HTTP skin folder. Place in same directory as playbook or specify path relatic to playbook.
https_enabledfalseEnable https canary.
https_port443Port for https canary.
https_skinbasicLoginSkin to use for https canary.
https_certificateN/ACertificate for https canary.
https_key N/AKey for certificate for https canary.
httpproxy_enabledfalseEnable http proxy canary.
httpproxy_port8080Port for http proxy canary.
httpproxy_skinms-isaSkin to use for http proxy canary. (snort, ms-isa)
llmnr_enabledfalseEnable LLMNR listener.
llmnr_query_interval60How often to broadcast the LLMNR query (in seconds)
llmnr_query_splay5Splay time to add randomness to the broadcast (in seconds)
llmnr_hostname{{ ansible_hostname }}Canary LLMNR Hostame.
llmnr_port5353LLMNR Port.
logger_syslog_addressN/ASyslog address/domain name to send logs.
logger_syslog_port514Port to use for syslog logging.
logger_file_filename/var/log/opencanary.logFile path/name of local log.
smtp_mailhostN/AMail server to use.
smtp_port25SMTP port to mail server.
smtp_from_addrN/AFrom address.
smtp_to_addrN/ATo Address.
smtp_subjectOpenCanary AlertEmail subject.
slack_webhook_urlN/AIncoming Slack Webhook URL for Slack Alerts.
teams_webhook_urlN/AIncoming Teams Webhook URL for Teams Alerts.
webhook_urlN/AGeneric Webhook URL.
webhook_methodPOSTHTTP method to use (GET, POST, PUT).
webhook_data'{"message": "%(message)s"}'Data to be sent to webhook.
webhook_status_code200HTTP status code that is expected for a success.
webhook_ignoreN/AList of strings that will not emit any log that contains the pattern. ie "192.0.2."
portscan_enabledfalseEnable port scan canary.
portscan_ignore_localhostfalseDisables portscan for localhost.
portscan_logfile/var/log/kern.logLog file scanned by port scan canary.
portscan_synrate5SYN rate for port scan canary.
portscan_nmaposrate5Nmap OS rate for port scan canary.
portscan_lorate3LO rate for port scan canary.
portscan_ignore_portsN/AComma separated list of ports to ignore.
portscan_iptables_pathN/APath to iptables binary.
smb_auditfile/var/log/samba-audit.logSamba log for samba canary to watch.
smb_enabledfalseEnable samba canary.
samba_workgroupWORKGROUPSamba workgroup name.
samba_server_stringN/ASamba server string.
samba_netbios_name{{ ansible_hostname }}Netbios name for Samba server.
samba_sharepersonalSamba share name.
samba_commentPersonal docsSamba share comment.
samba_path/opt/{{ samab_share }}Samba path that houses the share.
mysql_enabledfalseEnable mysql canary.
mysql_port3306Port to use for mysql canary.
mysql_banner5.5.43-0ubuntu0.14.04.1Banner for mysql canary.
ssh_enabledfalseEnable ssh canary.
ssh_port22Port to use for ssh canary.
ssh_bannerSSH-2.0-OpenSSH_5.1p1 Debian-4Banner for ssh canary.
redis_enabledfalseEnable redis canary.
redis_port6379Port to use for redis canary.
rdp_enabledfalseEnable rdp canary.
rdp_port3389Port to use for rdp canary.
sip_enabledfalseEnable sip canary.
sip_port5060Port to use for sip canary.
snmp_enabledfalseEnable snmp canary.
snmp_port161Port to use for snmp canary.
ntp_enabledfalseEnable ntp canary.
ntp_port123Port to use for ntp canary.
tftp_enabledfalseEnable tftp canary.
tftp_port69Port to use for tftp canary.
tcpbanner_maxnum10Max number of connections to tcpbanner canary.
tcpbanner_enabledfalseEnable tcpbanner canary.
tcpbanner_1_enabledfalseEnable tcpbanner_1 canary.
tcpbanner_1_port8001Port for tcpbanner_1 canary.
tcpbanner_1_datareceivedbannerN/AData received banner for tcpbanner_1 canary.
tcpbanner_1_initbannerN/AInit banner for tcpbanner_1 canary.
tcpbanner_1_alertstring_enabledfalseEnable alert string for tcpbanner_1 canary.
tcpbanner_1_alertstringN/AAlert string for tcpbanner_1 canary.
tcpbanner_1_keep_alive_enabledfalseEnable keep alive for tcpbanner_1 canary.
tcpbanner_1_keep_alive_secretN/AKeep alive secret for tcpbanner_1 canary.
tcpbanner_1_keep_alive_probes11Keep alive probes for tcpbanner_1 canary.
tcpbanner_1_keep_alive_interval300Keep alive interval for tcpbanner_1 canary.
tcpbanner_1_keep_alive_idle300Keep alive idle for tcpbanner_1 canary.
telnet_enabledfalseEnable telnet canary.
telnet_port23Port to use for telnet canary.
telnet_bannerN/ABanner for telnet canary.
mssql_enabledfalseEnable mssql canary.
mssql_version2012Version of MSSQL to emulate with mssql canary.
mssql_port1433Port to use for mssql canary.
vnc_enabledfalseEnable vnc canary.
vnc_port5000Port to use for vnc canary.

License

MIT