<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://ben-jiles.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://ben-jiles.github.io/" rel="alternate" type="text/html" /><updated>2021-10-26T14:00:24+00:00</updated><id>https://ben-jiles.github.io/feed.xml</id><title type="html">Ben Jiles</title><subtitle>cybersec practitioner, cypherpunk enthusiast, pizza lover</subtitle><entry><title type="html">Query VirusTotal with Python</title><link href="https://ben-jiles.github.io/Query-VirusTotal-with-Python/" rel="alternate" type="text/html" title="Query VirusTotal with Python" /><published>2021-10-25T00:00:00+00:00</published><updated>2021-10-25T00:00:00+00:00</updated><id>https://ben-jiles.github.io/Query-VirusTotal-with-Python</id><content type="html" xml:base="https://ben-jiles.github.io/Query-VirusTotal-with-Python/">&lt;h2 id=&quot;problem&quot;&gt;Problem&lt;/h2&gt;
&lt;p&gt;You are tired of manually querying IOCs in VirusTotal in the browser and you want to automate it. Luckily for you (unfortunately, not me at the moment), your enterprise environment allows creation/execution of self-made scripts.&lt;/p&gt;

&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;/h2&gt;
&lt;p&gt;Visit my unfinished cli python script here: &lt;a href=&quot;https://github.com/ben-jiles/VT-Inquirer&quot;&gt;https://github.com/ben-jiles/VT-Inquirer&lt;/a&gt;&lt;br /&gt;
It can query basic malicious score info on IP addresses at the moment, but I am building it out to encompass everything.&lt;/p&gt;

&lt;p&gt;This is just a starting block.&lt;/p&gt;</content><author><name></name></author><summary type="html">Problem You are tired of manually querying IOCs in VirusTotal in the browser and you want to automate it. Luckily for you (unfortunately, not me at the moment), your enterprise environment allows creation/execution of self-made scripts.</summary></entry><entry><title type="html">Query VirusTotal with Excel</title><link href="https://ben-jiles.github.io/Query-VirusTotal-with-Excel/" rel="alternate" type="text/html" title="Query VirusTotal with Excel" /><published>2021-10-22T00:00:00+00:00</published><updated>2021-10-22T00:00:00+00:00</updated><id>https://ben-jiles.github.io/Query-VirusTotal-with-Excel</id><content type="html" xml:base="https://ben-jiles.github.io/Query-VirusTotal-with-Excel/">&lt;h2 id=&quot;problem&quot;&gt;Problem&lt;/h2&gt;

&lt;p&gt;You have monotonous tasks at work that require a lot clicking, copying, and pasting content with a browser. Surely there is a better way to do this. But if you’re at a large, security-mided organization, then most likely you will not have permissions to run your [insert favorite scripting language here] in the environment. So what now?&lt;/p&gt;

&lt;p&gt;The answer: Excel&lt;/p&gt;

&lt;h2 id=&quot;solution&quot;&gt;Solution!&lt;/h2&gt;

&lt;p&gt;Did you know Excel uses &lt;a href=&quot;https://docs.microsoft.com/en-us/powerquery-m/&quot;&gt;Power Query M &lt;/a&gt; language to batch and query data? You can use Power Query to call an API for automation.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;VirusTotal provides their v3 API. Just create a VT account and click on “API Key” under your profile picture. Copy this for future use.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;easy-way-to-create-function&quot;&gt;Easy way to create function&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Open Excel &amp;gt; Data tab &amp;gt; ‘Get &amp;amp; Transform Data’ section &amp;gt; Get Data &amp;gt; From Other Sources &amp;gt; From Web &amp;gt; Advanced&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now enter VT URL of an example IOC you want to query using the API format (e.g., https://www.virustotal.com/api/v3/ip_addresses/xxx.xxx.xxx.xxx. You can get the full documentation for the API at https://developers.virustotal.com/reference.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Enter HTTP request header (x-apikey) with your API Key value in the input box. Then hit OK.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will open a new worksheet with that IP address result. Open the result in the Power Query editor. This allows you to go through the JSON object tree. Once you find the specific field you want to reference, right click and choose ‘Drill Down’. Go to Data tab &amp;gt; Show Data &amp;amp; Connections. This opens a side panel with the query you just created listed. Right click query &amp;gt; Edit..&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This opens the Power Query editor window. Expand left-hand Queries side panel &amp;gt; right click query &amp;gt; Create Function.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This opens a new Power Query editor window. Now choose Advanced Editor. We will now create variables for the API Key and the IP address, like the following:&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Save this as a function connection.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;do-it-again&quot;&gt;Do it again&lt;/h3&gt;

&lt;p&gt;You can create a function with any field in the VirusTotal query JSON result. Then import these .odc PQ connection files to any workbook you want and then use the From Table/Range option in Data tab &amp;gt; Add Column tab &amp;gt; then Invoke Custom Function. This will apply your function to the values in the table. If you have a premium VT API Key, this will work right away and give you all the results you need. However, if you have a basic, freemium key, VirusTotal limits your API requests to 4/min – meaning you will need to invoke the function after 15 seconds. I will address this in another post once I get it to work properly on my end.&lt;/p&gt;</content><author><name></name></author><summary type="html">Problem</summary></entry><entry><title type="html">Magecart – Exploitation, Detection, and Mitigation</title><link href="https://ben-jiles.github.io/Magecart/" rel="alternate" type="text/html" title="Magecart – Exploitation, Detection, and Mitigation" /><published>2020-05-29T00:00:00+00:00</published><updated>2020-05-29T00:00:00+00:00</updated><id>https://ben-jiles.github.io/Magecart</id><content type="html" xml:base="https://ben-jiles.github.io/Magecart/">&lt;p&gt;This report explores how to exploit, detect, and mitigate a Magecart attack on Magento 1.9.1.0 CE/ 1.14.1.0 EE.&lt;br /&gt;
&lt;a href=&quot;https://github.com/ben-jiles/ben-jiles.github.io/blob/master/files/Magecart_Report.pdf&quot;&gt;Download the report pdf.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-01.png&quot; alt=&quot;mcr01&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-02.png&quot; alt=&quot;mcr02&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-03.png&quot; alt=&quot;mcr03&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-04.png&quot; alt=&quot;mcr04&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-05.png&quot; alt=&quot;mcr05&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-06.png&quot; alt=&quot;mcr06&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-07.png&quot; alt=&quot;mcr07&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-08.png&quot; alt=&quot;mcr08&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-09.png&quot; alt=&quot;mcr09&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-10.png&quot; alt=&quot;mcr10&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-11.png&quot; alt=&quot;mcr11&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-12.png&quot; alt=&quot;mcr12&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-13.png&quot; alt=&quot;mcr13&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://github.com/ben-jiles/ben-jiles.github.io/raw/master/images/magecart/Magecart_Report-14.png&quot; alt=&quot;mcr14&quot; /&gt;&lt;/p&gt;</content><author><name></name></author><summary type="html">This report explores how to exploit, detect, and mitigate a Magecart attack on Magento 1.9.1.0 CE/ 1.14.1.0 EE. Download the report pdf.</summary></entry><entry><title type="html">Hello World!</title><link href="https://ben-jiles.github.io/Hello-World/" rel="alternate" type="text/html" title="Hello World!" /><published>1992-02-26T00:00:00+00:00</published><updated>1992-02-26T00:00:00+00:00</updated><id>https://ben-jiles.github.io/Hello-World</id><content type="html" xml:base="https://ben-jiles.github.io/Hello-World/">&lt;p&gt;I’ll be using this github page to host my cyber security based blog posts. До встречи, товарищы!&lt;/p&gt;</content><author><name></name></author><summary type="html">I’ll be using this github page to host my cyber security based blog posts. До встречи, товарищы!</summary></entry></feed>