Bsides Calgary 2017 Instructions for Running the Demo

Total Page:16

File Type:pdf, Size:1020Kb

Bsides Calgary 2017 Instructions for Running the Demo BSides Calgary 2017 Title: Using Netflow & Open Source Tools for Network Behavioral Analysis Presenter: Yves B. Desharnais, MBA, CISSP, PCIP Instructions for running the demo. The demo was done under CentOS 7, but the solution was also tested under Ubuntu so most instructions should work on most Linux systems (and potentially other OSes). 1) Install OS 2) Install Fluentd (instructions: https://docs.fluentd.org/v0.12/categories/installation) a) Generally as regular user (I remember having issues installing as root) 3) Install other required packages a) The default NetFlow plugin, unless using my plugin i) sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-netflow b) The MariaDB / MySQL package i) Dependencies (needs to recompile code) (1) sudo yum install gcc mysql-devel ruby-devel rubygems mariadb-server c) Secure mysql i) sudo mysql_secure_installation d) Install the fluentd mysql plugin i) sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-mysql-prepared- statement e) Enable/start MySQL (now MariaDB) daemon i) systemctl enable mariadb ii) systemctl start mariadb f) Allow firewall traffic through local firewall (IPTables, firewalld, etc.) 4) Install demo code a) As root, from the unzipped archive folder: i) mv /etc/td-agent/td-agent.conf mv /etc/td-agent/td-agent.back ii) cp –R etc/td-agent/* /etc/td-agent/ iii) chmod -R 740 /etc/td-agent b) For demo 8, we need to create the databases and users (I would recommend changing the passwords…) i) mysql –u root –p < demo8.sql c) For demo 9, we need to: i) Create the database and user: mysql –u root –p < demo9.sql ii) Create the file structure for our interprocess communications (1) cp -R logmon / (2) chmod -R 775 /logmon iii) setup the cron jobs, adding line to “crontab –e”, for example: (1) 0 0 * * * * /logmon/cron/ping/sweep.sh # Daily at midnight (2) */5 * * * * /logmon/cron/nmap/nmapcronq.sh # Every 5 minutes d) edit the /etc/td-agent/td-agent.conf and to select the right demo include file e) run the service i) sudo service td-agent start (or restart) .
Recommended publications
  • Implementation of Centralized Logging and Log Analysis in Cloud Transition
    Implementation of Centralized Logging and Log Analysis in Cloud Transition Antti Vainio School of Science Thesis submitted for examination for the degree of Master of Science in Technology. Espoo 3.7.2018 Supervisor Prof. Jukka Suomela Advisor MSc Cyril de Vaumas Copyright ⃝c 2018 Antti Vainio Aalto University, P.O. BOX 11000, 00076 AALTO www.aalto.fi Abstract of the master’s thesis Author Antti Vainio Title Implementation of Centralized Logging and Log Analysis in Cloud Transition Degree programme Computer, Communication and Information Sciences Major Computer Science Code of major SCI3042 Supervisor Prof. Jukka Suomela Advisor MSc Cyril de Vaumas Date 3.7.2018 Number of pages 84 Language English Abstract Centralized logging can be used to collect log data from multiple log files on multiple separate server machines and transmit the data to a single centralized location. Log analysis on top of that can automatically process large amounts of logs for various different purposes including problem detection, troubleshooting, monitoring system performance, identifying security incidents, and understanding user behavior. As the volume of log data is growing when software systems, networks, and services grow in size, the log data located on multiple separate server machines can be difficult to manage. The traditional way of manually inspecting logs hasalso become too labor-intensive and error-prone when large amounts of log data need to be analyzed. Setting up centralized logging and automatic log analysis systems can be used to solve this problem. This thesis explains the concepts of log data, centralized logging, and log analysis, and also takes a look at existing software solutions to implement such a system.
    [Show full text]
  • Vmware Fusion 12 Vmware Fusion Pro 12 Using Vmware Fusion
    Using VMware Fusion 8 SEP 2020 VMware Fusion 12 VMware Fusion Pro 12 Using VMware Fusion You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com © Copyright 2020 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc. 2 Contents Using VMware Fusion 9 1 Getting Started with Fusion 10 About VMware Fusion 10 About VMware Fusion Pro 11 System Requirements for Fusion 11 Install Fusion 12 Start Fusion 13 How-To Videos 13 Take Advantage of Fusion Online Resources 13 2 Understanding Fusion 15 Virtual Machines and What Fusion Can Do 15 What Is a Virtual Machine? 15 Fusion Capabilities 16 Supported Guest Operating Systems 16 Virtual Hardware Specifications 16 Navigating and Taking Action by Using the Fusion Interface 21 VMware Fusion Toolbar 21 Use the Fusion Toolbar to Access the Virtual-Machine Path 21 Default File Location of a Virtual Machine 22 Change the File Location of a Virtual Machine 22 Perform Actions on Your Virtual Machines from the Virtual Machine Library Window 23 Using the Home Pane to Create a Virtual Machine or Obtain One from Another Source 24 Using the Fusion Applications Menus 25 Using Different Views in the Fusion Interface 29 Resize the Virtual Machine Display to Fit 35 Using Multiple Displays 35 3 Configuring Fusion 37 Setting Fusion Preferences 37 Set General Preferences 37 Select a Keyboard and Mouse Profile 38 Set Key Mappings on the Keyboard and Mouse Preferences Pane 39 Set Mouse Shortcuts on the Keyboard and Mouse Preference Pane 40 Enable or Disable Mac Host Shortcuts on the Keyboard and Mouse Preference Pane 40 Enable Fusion Shortcuts on the Keyboard and Mouse Preference Pane 41 Set Fusion Display Resolution Preferences 41 VMware, Inc.
    [Show full text]
  • Logging in the Cloud: from Zero to (Incident Response) Hero
    SESSION ID: CSV-W01 Logging in the Cloud: From Zero to (Incident Response) Hero Jonathon Poling Managing Principal Consultant Secureworks @JPoForenso #RSAC 1 #RSAC Agenda for those in [ , , ]: print(“What Should I Be Logging?”) print(“How *Specifically* Should I Configure it?”) print(“What Should I Be Monitoring?”) else: print(“Questions?”) 2 2 #RSAC Today, We (Attempt to) Make History… I plan to live here… 3 3 #RSAC Why Me? Cloud (AWS) SME for Secureworks Developed Secureworks’ AWS Incident Response Service Line Help SMB through Fortune 10 Customers… – Intelligently Configure/Instrument Their Environments – Protect Their Infrastructure – Effectively Respond to Incidents 4 4 #RSAC Why This Presentation? Too many clouds, too little time – Many of us are still lacking foundational understanding of Cloud operations and security – It’s extremely hard to master one cloud, let alone multiple Tired of presentations with no actionable takeaways – People need prescriptive actions to take that can help them to immediately start getting/operating/securing their Cloud(s) better Helping us to help you (to help us and help you) 5 5 #RSAC How Will This Help You? In this talk you will (hopefully) learn: –Core log capabilities of each Cloud provider –Which core logs should be configured (specifically how) –Tips for Monitoring core logs –A few tips/tricks for Incident Response along the way 6 6 #RSAC Get Ready for a LOT of Material… 7 7 #RSAC Amazon Web Services (AWS) Overview of Logging 8 #RSAC Core Logs CloudTrail – Your account’s syslog on steroids
    [Show full text]
  • This Guide Provides Basic Information About the Logging Agent, an Application Based on Uentd
    1/25/2020 About the Logging agent | Stackdriver Logging | Google Cloud This guide provides basic information about the Logging agent, an application based on uentd (http://www.uentd.org/) that runs on your virtual machine (VM) instances. In its default conguration, the Logging agent streams logs from common third-party applications and system software to Logging; see the list of default logs (/logging/docs/agent/default-logs). You can congure the agent to stream additional logs; see Conguring the Logging agent (/logging/docs/agent/conguration) for details on agent conguration and operation. It is a best practice to run the Logging agent on all your VM instances. The agent runs under both Linux and Windows. To install the Logging agent, see Installing the agent (/logging/docs/agent/installation). https://cloud.google.com/logging/docs/agent/ 1/5 1/25/2020 About the Logging agent | Stackdriver Logging | Google Cloud You can run the Logging agent on the following operating systems on compatible virtual machine (VM) instances: CentOS 6, 7, and 8 Debian 9 "Stretch" and 10 "Buster" Red Hat Enterprise Linux 6, 7, and 8 Ubuntu LTS 16.04 "Xenial", LTS 18.04 "Bionic", and 19.04 "Disco" Ubuntu Minimal LTS 16.04 "Xenial", LTS 18.04 "Bionic" SUSE Linux Enterprise Server 12 SP3, 12 SP2 for SAP, 12 SP3 for SAP, 15, 15 for SAP, and 15 SP1 for SAP Windows Server 2008 R2, 2012 R2, 2016, and 2019 Amazon Linux AMI (except Amazon Linux 2.0 AMI) The Logging agent is compatible with the following environments: Compute Engine (/compute) instances.
    [Show full text]
  • Department of Defense Enterprise Devsecops Initiative
    Headquarters U.S. Air Force I n t e g r i t y - S e r v i c e - E x c e l l e n c e How did the Department of Defense move to Kubernetes and Istio? Mr. Nicolas Chaillan Chief Software Officer, U.S. Air Force Co-Lead, DoD Enterprise DevSecOps Initiative V2.5 – UNCLASSFIED Must Adapt to Challenges Must Rapidly Adapt To Challenges I n t e g r i t y - S e r v i c e - E x c e l l e n c e 2 Must Adapt to Challenges Work as a Team! Must Adapt To Challenges I n t e g r i t y - S e r v i c e - E x c e l l e n c e 3 Must Adapt to Challenges Work as a Team! A Large Team! Must Adapt To Challenges I n t e g r i t y - S e r v i c e - E x c e l l e n c e 4 Must Adapt to Challenges With Various TechnologiesWork as a Team! A Large Team! Must Adapt To Challenges I n t e g r i t y - S e r v i c e - E x c e l l e n c e 5 Must Adapt to Challenges With Various Technologies Work as a Team! A Large Team! Must AdaptBring To Challenges It With Us! I n t e g r i t y - S e r v i c e - E x c e l l e n c e 6 Must Adapt to Challenges With Various Technologies Work as a Team! Even To Space! A Large Team! Must AdaptBring To Challenges It With Us! I n t e g r i t y - S e r v i c e - E x c e l l e n c e 7 Must Adapt to Challenges With Various Technologies Work as a Team! To Space! A Large Team! MustWith Adapt a FewBring To Sensors! Challenges It With Us! I n t e g r i t y - S e r v i c e - E x c e l l e n c e 8 With Their Help! Must Adapt to Challenges With Various Technologies Work as a Team! To Space! A Large Team! MustWith Adapt a FewBring To Sensors! Challenges It With Us! I n t e g r i t y - S e r v i c e - E x c e l l e n c e 9 What is the DoD Enterprise DevSecOps Initiative? Joint Program with OUSD(A&S), DoD CIO, U.S.
    [Show full text]
  • Using Fluentd As an Alternative to Splunk
    Using Fluentd as an alternative to Splunk As infrastructure within organizations grows in size and the number of hosts, the cost of Splunk may become prohibitive. I created this document to demonstrate, step-by-step, how to implement Fluentd, Elasticsearch and Kibana to be used as a replacement for Splunk. This is a simple configuration and does not include clustering. I may add clustering in later versions. The OS used for this configuration is CentOS 6.7. The instructions for newer versions of CentOS/RHEL, and for Ubuntu may vary. All commands should be run as root or be preceded by “sudo “. © 2015 William C. Mohler Table of Contents Pre-requisites ................................................................................................................................................ 3 Create a Logical Volume and Mount Point ............................................................................................... 3 Create Directory Structure for Log Storage .............................................................................................. 3 Install or Update to the Latest Version of Java ......................................................................................... 3 NTP ............................................................................................................................................................ 4 Tweak Network Parameters ..................................................................................................................... 4 Increase Limit on File Descriptors
    [Show full text]
  • Day 1 Closing Remarks and Adjourn
    Identity Management and Access Control in January 23rd-24th, 2020 Multi-clouds TETRATE Welcome, Matthew Scholl Introduction and Chief Computer Security Division NIST Administrative Issues 8:30 am TETRATE Opening Keynote: Trusting Native Cloud Varun Talwar, Co-founder and CEO Applications Tetrate 8:40 am TETRATE Identity Management and Access Control in Mutliclouds Jan 23-24, 2020 Trusting Cloud Native Applications Varun Talwar @varungyan, [email protected] Punching Bag @ Tetrate TetrateTetrate NISTNIST 2020 2020 Best practices for setting password Today’s multi-cloud access/auth problem... How to achieve Zero Trust Architecture in multi-cloud world? Multi Cloud World Te NIST trate Modern Connected Enterprise Access from anywhere, on any device and Users expect reliable and secure experience Employees App App App App Distributed, Polyglot, Global, Using SaaS, Using OSS Data Center Microsoft AWS Google Tetrate NIST 2020 Perimeter concept is officially dead Keynote Session Jan 23, 910 AM “Zero Trust Architecture” by Scott Rose "The perimeter is no longer just the physical location of the enterprise [data center], and what lies inside the perimeter is no longer a blessed and safe place to host personal computing devices and enterprise applications [microservices]." BeyondProd Document, from Google https://cloud.google.com/security/beyondprod/ Multi Cloud Service Centric World DYNAMIC DISTRIBUTED FINE GRAINED BeyondProd - from Google Traditional Security Cloud Native Security Firewalls, with internal communications considered Zero trust security with service-service communication trusted verified and no implicit trust for services in the environment Fixed IPs and hardware for certain applications Greater resource utilization, reuse, and sharing, including of IPs and hardware.
    [Show full text]
  • Analysis and Comparison of Log Shipment Solutions at AWS S3 for Windows 10
    Department of Information Engineering and Computer Science Master in Computer Science 2020-2021 Final thesis Analysis and comparison of Log Shipment solutions at AWS S3 for Windows 10. Francisco Manuel Colmenar Lamas i SUMMARY A fundamental aspect that every company must address to start building its security infrastructure is visibil- ity. Increasing a company’s visibility raises the quality and effectiveness of all other existing security solutions. The objective was to implement an endpoint log forwarding solution for the Windows 10 devices of the com- pany About You. To accomplish the objective, several concepts and knowledge in the scope of log management solutions were studied, as well as the use of AmazonWeb Services (AWS) dedicated to these activities. After analyzing the different solutions, Kinesis Windows Agent was chosen to implement the endpoint log shipment solution. Because it provides a serverless architecture, where the agent sends logs from the endpoints to Kinesis Firehose. In addition, it does not require any heavy-weight dependencies and its configuration is straightforward. Also, since Kinesis Firehose is an AWS managed service, there is no need to handle the scaling or fault tolerance issues common in a client-server architecture and it integrates seamlessly with S3. Regarding the implementation, the code for the installation and maintenance of the Kinesis Windows Agent was mainly developed in Powershell scripts triggered remotely using Ninjarmm. And the AWS infrastructure code required for this project was developed using Terraform. In addition, through Gitlab’s CI/CD pipeline, AWS resources are automatically updated if the code is modified. As a conclusion, the deployment of the Kinesis agent for Windows on all employee Windows devices was a success.
    [Show full text]
  • Designing and Implementing Logging and Monitoring with Amazon
    AWS Prescriptive Guidance Designing and implementing logging and monitoring with Amazon CloudWatch AWS Prescriptive Guidance Designing and implementing logging and monitoring with Amazon CloudWatch AWS Prescriptive Guidance: Designing and implementing logging and monitoring with Amazon CloudWatch Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AWS Prescriptive Guidance Designing and implementing logging and monitoring with Amazon CloudWatch Table of Contents Introduction ...................................................................................................................................... 1 Targeted business outcomes ................................................................................................................ 4 Accelerate operational readiness .................................................................................................. 4 Improve operational excellence .................................................................................................... 4 Enhance operational visibility .....................................................................................................
    [Show full text]
  • Dell EMC Powerstore Open Source License and Copyright Information
    Open Source License and Copyright Information Dell EMC PowerStore Open Source License and Copyright Information June 2021 Rev A04 Revisions Revisions Date Description May 2020 Initial release September 2020 Version updates for some licenses and addition of iwpmd component December 2020 Version updates for some licenses, and addition and deletion of other components January 2021 Version updates for some licenses June 2021 Version updates for some licenses, and addition and deletion of other components The information in this publication is provided “as is.” Dell Inc. makes no representations or warranties of any kind with respect to the information in this publication, and specifically disclaims implied warranties of merchantability or fitness for a particular purpose. Use, copying, and distribution of any software described in this publication requires an applicable software license. Copyright © 2020-2021 Dell Inc. or its subsidiaries. All Rights Reserved. Dell Technologies, Dell, EMC, Dell EMC and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners. [6/1/2021] [Open Source License and Copyright Information] [Rev A04] 2 Dell EMC PowerStore: Open Source License and Copyright Information Table of contents Table of contents Revisions............................................................................................................................................................................. 2 Table of contents ...............................................................................................................................................................
    [Show full text]
  • Unifying Events Logs Into the C
    About Me > Eduardo Silva ● Github & Twitter: @edsiper ● Personal Blog : http://edsiper.linuxchile.cl > Treasure Data, Inc. ● Open Source Engineer Fluentd / FluentBit > Projects ● Monkey Server / monkey-project.com ● Duda I/O / duda.io Logging Logging Matters Pros ● Applications status ● Debugging ● General information about anomalies: errors ● Troubleshooting / Support ● Local or Remote (network) Logging Matters From a business point of view ● Input Data → Analytics ● User interactions / behaviors ● Improvements Assumptions Logging Matters Assumptions ● “I have enough disk space” ● “I/O operations will not block” ● “It's fast to write a simple message” ● “Log formats are human readable” ● “My logging mechanism scale” Logging Matters Assumptions Basically, yeah.. it should work. Concerns Logging Matters Concerns ● Logs increase = data increase ● Message format get more complex ● Did the Kernel flush the buffers ? (sync(2)) ● Multi-thread application ?, Locking ? ● Multiple Applications = Multiple Logs Logging Matters Concerns If... Multiple Applications = Multiple logs Multiple Host x Multiple Applications = ??? OK...so: 1. Logging Matters 2. It's really beneficial 3. ??? but... It needs to be done right. Logging Common Sources / Inputs ● Applications Logs • Apache • Nginx • Syslog (-ng) ● Custom applications / Languages C, Ruby, Python, PHP, Perl, NodeJS, Java... How to parse/store multiple data inputs ? note: performance matters! Fluentd is an open source data collector It let's you unify the data collection for a better use and understanding
    [Show full text]
  • Welcome to Linux Foundation E-Learning Training 2021/09/17 Version 8.31 Copyright © 2010-2021 the Linux Foundation
    Welcome to Linux Foundation E-Learning Training 2021/09/17 Version 8.31 Copyright © 2010-2021 The Linux Foundation. All rights reserved. If you have any further questions after reading this document, the answer may be found in the FAQ on the website: http://bit.ly/LF-FAQ or https://training.linuxfoundation.org/about/faqs/general-faq/ Specific instructions for your course will be addressed in the Appendix. Contents 1 Hardware Requirements 1 2 Software Requirements 2 Appendices 4 A Course-Specific Hardware and/or Software Requirements 4 B More Details on Installing Linux 18 1 Hardware Requirements Students are expected to provide their own computers for Linux Foundation courses. The following instructions should make clear the specifics that apply to you. All courses have slightly different HW requirements. Specific HW requirements for your class can be found in the Appendix. The Linux Foundation logistical staff may be consulted as required for further clarification. 1.1 Using a Virtual Machine Instead Virtual Machines If you elect to use a Virtual Machine (instead of native Linux) bear in mind that the hard- ware requirements double, since you now need enough CPU/RAM for the host operating system as well as the guest OS. Using a VM for this course can make things faster/easier; if you make a fatal mistake, a simple reboot of the VM will restore things to normal. More on what distro and software needs to be installed on the VM can be found in the Software Requirements chapter below. 1 1.2 Pre-Built Virtual Machine Images 2 If you want to build your own VM image You can make sure your own Virtual Machine image is properly setup for the class using the ready-for.sh script which can be found as follows: http://bit.ly/LFprep or https://training.linuxfoundation.org/cm/prep/ 1.2 Pre-Built Virtual Machine Images We provide pre-built virtual machine images that work with VMware products (e.g.
    [Show full text]