[python]Finding your internet gateway id in aws

On previous post, I have this function: This function looks for the internet gateway id associated with your vpc id. Json response from describe_internet_gateways The below response is from the describe_internet_gateways method in boto3, here’s the code snippet: The below is a dictionary of two main keys – InternetGateways and ResponseMetadata. Now I am only … Continue reading [python]Finding your internet gateway id in aws

Link: http://cyruslab.net/2019/05/06/pythonfinding-your-internet-gateway-id-in-aws/

[python]Creating subnets based on VPC you have chosen

Background I am trying to test a few functions of my script for things that can be done after VPC was created. Things such as make subnet either public or private, attach IGW to route table. I have build up some general purpose functions so that I do not need to repeat the same thing … Continue reading [python]Creating subnets based on VPC you have chosen

Link: http://cyruslab.net/2019/05/06/pythoncreating-subnets-based-on-vpc-you-have-chosen/

Joy – A Package For Capturing And Analyzing Network Flow Data And Intraflow Data, For Network Research, Forensics, And Security Monitoring

Joy is a BSD-licensed libpcap-based software package for extracting data features from live network traffic or packet capture (pcap) files, using a flow-oriented model similar to that of IPFIX or Netflow, and then representing these data features in JSON. It also contains analysis tools that can be applied to these data files. Joy can be used to explore data at scale, especially security and threat-relevant data.JSON is used in order to make the output easily consumable by data analysis tools. While the JSON output files are somewhat verbose, they are reasonably small, and they respond well to compression.Joy can be configured to obtain intraflow data, that is, data and information about events that occur within a network flow, including:the sequence of lengths and arrival times of IP packets, up to some configurable number of packets.the empirical probability distribution of the bytes within the data portion of a flow, and the entropy derived from that value,the sequence of lengths and arrival times of TLS records,other non-encrypted TLS data, such as the list of offered ciphersuites, the selected ciphersuite, the length of the clientKeyExchange field, and the server certificate strings,DNS names, addresses, and TTLs,HTTP header elements and the first eight bytes of the HTTP body, andthe name of the process associated with the flow, for flows originate or terminate on the host on which pcap is running.Joy is intended for use in security research, forensics, and for the monitoring of (small scale) networks to detect vulnerabilities, threats and other unauthorized or unwanted behavior. Researchers, administrators, penetration testers, and security operations teams can put this information to good use, for the protection of the networks being monitored, and in the case of vulnerabilities, for the benefit of the broader community through improved defensive posture. As with any network monitoring tool, Joy could potentially be misused; do not use it on any network of which you are not the owner or the administrator.Flow, in positive psychology, is a state in which a person performing an activity is fully immersed in a feeling of energized focus, deep involvement, and joy. This second meaning inspired the choice of name for this software package.Joy is alpha/beta software; we hope that you use it and benefit from it, but do understand that it is not suitable for production use.TLS FingerprintingWe have recently released the largest and most informative open source TLS fingerprint database. Among other features, our approach builds on previous work by being fully automated and annotating TLS fingerprints with significantly more information. We have built a set of python tools to enable the application of this database, as well as the generation of new databases with the help of Joy. For more information, please see the TLS fingerprinting documentation.Relation to Cisco ETAJoy has helped support the research that paved the way for Cisco’s Encrypted Traffic Analytics (ETA), but it is not directly integrated into any of the Cisco products or services that implement ETA. The classifiers in Joy were trained on a small dataset several years ago, and do not represent the classification methods or performance of ETA. The intent of this feature is to allow network researchers to quickly train and deploy their own classifiers on a subset of the data features that Joy produces. For more information on training your own classifier, see saltUI/README or reach out to joy-users@cisco.com.CreditsThis package was written by David McGrew, Blake Anderson, Philip Perricone and Bill Hudson {mcgrew,blaander,phperric,bhudson}@cisco.com of Cisco Systems Advanced Security Research Group (ASRG) and Security and Trust Organization (STO).Release 4.3.0Add IPv6 support to Joy and libjoyIPFix collection and export only support IPv4NFv9 only supports IPv4Anonymization only supports IPv4 addressesSubnet labeling only supports IPv4 addressesRelease 4.2.0Re-write joy.c to use libjoy libraryUpdated joy.c to utilize multi-threads for flow processingUpdated unit tests and python tests to reflect new code changesRemoved guts of the updater process to prepare for re-writeFixed bug in processing multiple files on the command lineOther minor bug fixesRelease 4.0.3Added support for make install for CentosRelease 4.0.2Add support for fingerprintingRelease 4.0.1We are pleased to announce the 4.0.1 release of the package, which has these features:Add additional API’s for parent application processing of Flow Records and data featuresFixed TCP retransmission and out of order detectionBetter identification of IDP packetFixed some memory usage issuesFixed minor bugsRemoved dead codeRelease 4.0.0We are pleased to announce the 4.0.0 release of the package, which has these features:Add support for building with autotools. ./configure;make clean;makeRelease 3.0.0We are pleased to announce the 3.0.0 release of the package, which has these features:Modified JOY infrastructure code to be thread safe. Allowed support multiple work threads for packet processing.Each worker thread uses own output file.Removed global variables for Config.Modified code infrastructure to use Config Structure.Modified the Makefile system to build the JOY infrastructure as a static and shared library.Implemented an API for utilizing the JOY Library (joy_api.[hc]).Implemented a Vector Packet Processing integration scheme to utilize VPP native infrastructure when building that integration.Created 2 API test programs, joy_api_test.c and joy_api_test2.c.Modified existing test programs to link against static JOY library instead of re-compiling the infrastructure code.Modified versioning to use Common Security Module (CSM) conventions.Modified build_pkg to accept package version on the command line.Cleaned up coverity errors and warnings.Various bug fixes.Release 2.0We are pleased to announce the 2.0 release of the package, which has these features:The JSON schema has been updated to be better organized, more readable, and more searchable (by putting searchable keywords as the JSON names),The new sleuth tool replaces query/joyq, and brings new functionality such as —fingerprint,Much improved documentation, which covers the joy and sleuth tools, examples, and the JSON schema (see using-joy)Quick StartJoy has been successfully run and tested on Linux (Debian, Ubuntu, CentOS, and Raspbian), Mac OS X and Windows. The system has been built with gcc and GNU make, but it should work with other development environments as well.Go to the Wiki for a guide on building: Build InstructionsDownload Joy

Link: http://www.kitploit.com/2019/05/joy-package-for-capturing-and-analyzing.html

[python]Get VPC ID

I am looking for a solution to get the vpcid so that i can start another script to add routes and subnets for the chosen vpc. See this post, which makes the below code possible. Results The json structure after the filter was applied The above json output is a list of two dictionaries. First … Continue reading [python]Get VPC ID

Link: http://cyruslab.net/2019/05/05/pythonget-vpc-id/

[python]Create VPC part 2

Background This post is an improvement to this. The goal is to: Create VPC. Create internet gateway. Attach internet gateway to vpc. Name the internet gateway and vpc. About parameters in create_tags This method accepts Resources of type list or tuple. Tags of type dictionary. The code works but is ugly and cannot scale, for … Continue reading [python]Create VPC part 2

Link: http://cyruslab.net/2019/05/05/pythoncreate-vpc-part-2/

[python]Naming the VPC

Background This is a follow up on previous post. The create_vpc does not have a parameter to name the VPC, instead another method create_tags is required for naming the VPC. From the documentation the create_tags takes in two arguments: Resources argument which is a list, in this context VPC id is the resource. Tags argument … Continue reading [python]Naming the VPC

Link: http://cyruslab.net/2019/05/05/pythonnaming-the-vpc/

[python]Create AWS VPC with boto3

Background This is a follow up on this post https://cyruslab.net/2018/10/19/pythontrying-out-aws-sdk/ back then I was only trying out… However I am beginning to take this seriously… as a hobby… Pre-requisites Setup awscli. The awscli is used to setup a default connection, by putting your access key id and secret key id, your preferred region and your … Continue reading [python]Create AWS VPC with boto3

Link: http://cyruslab.net/2019/05/05/pythoncreate-aws-vpc-with-boto3/