Path: blob/master/tutorials-and-examples/feature-tutorials/VTLookupV3.ipynb
3253 views
VT Graphs in Jupyter Notebook
In this notebook we will explore how to obtain attributes and relationship for different entities using VirusTotal API v3. Finally we can render all the relationships we have obtained using VTGraph.
Import libraries
Create Lookup instance
Example showing all details for this ID
We can use get_object to retrieve all details or just look it up directly at https://www.virustotal.com/gui/home/search
Obtaining result for multiple entities
The function lookup_iocs is able to obtain attributes for all the rows in a DataFrame. If no observable_column and observable_type parameters are specified, the function will obtain the attributes of all the entities that are in the column target, and will obtain their types from the target_type column.
This function is especially useful when a user has obtained a set of relationships, and would like to obtain their attributes.
Note: it can take some time to fetch results, depending on the number of nodes and relationships.
Also, if we would like to obtain the relationships for a set of entities, we have the function lookup_iocs_relationships. Here also, if no observable_column and observable_type parameters are specified, the function will obtain the relationships of all the entities that are in the column target, and will obtain their types from the target_type column.
Note: it can take some time to fetch results
Simple plot of the relationships
We can display a simple plot of the relataionships locally but it doesn't tell us much about what the nodes are and they types of relationships between them.
Integration with VTGraph
Once we have some DataFrames with the relationships, we are able to generate and visualize a VT Graph in our notebook. The function create_vt_graph accepts as input a list of Relationship DataFrames.
Note: it can take some time to generate the graph, depending on the number of nodes and relationships.
Unlike our local graph, this displays rich information about the nodes and relationship and allows us to expand our investigation with further searches or ad hoc nodes.
Note: - the inline graph displays node attributes but doesn't allow you edit or to add to the graph with further searches.
Click on the link in the frame to go to the VirusTotal site to view.