Skip to content

Commit 212fd3f

Browse files
patrickrbcpatrickrbc
authored andcommitted
up
1 parent 7581b95 commit 212fd3f

23 files changed

+1528
-162
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ source "https://rubygems.org"
1111
gem "jekyll", "~> 3.9.1"
1212

1313
# This is the default theme for new Jekyll sites. You may change this to anything you like.
14-
gem "minima", "~> 2.0"
14+
gem "minima"
1515

1616
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
1717
# uncomment the line below. To upgrade, run `bundle update github-pages`.
@@ -31,3 +31,4 @@ gem "wdm", "~> 0.1.0" if Gem.win_platform?
3131

3232
gem 'jekyll_github_sample'
3333
gem 'jekyll-sitemap'
34+
gem 'kramdown-parser-gfm'

Gemfile.lock

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ GEM
4848
jekyll (>= 3.0, < 5.0)
4949
kramdown (2.3.1)
5050
rexml
51+
kramdown-parser-gfm (1.1.0)
52+
kramdown (~> 2.0)
5153
liquid (4.0.3)
5254
listen (3.5.1)
5355
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -85,7 +87,8 @@ DEPENDENCIES
8587
jekyll-feed (~> 0.6)
8688
jekyll-sitemap
8789
jekyll_github_sample
88-
minima (~> 2.0)
90+
kramdown-parser-gfm
91+
minima
8992
tzinfo-data
9093

9194
BUNDLED WITH

_config.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414
# You can create any custom variable you would like, and they will be accessible
1515
# in the templates via {{ site.myvariable }}.
1616
title: patrickrbc
17-
#email: "@patrickrbc"
18-
author: ""
19-
description: >- # this means to ignore newlines until "baseurl:"
20-
Olá! My name is Patrick and I am a software and security engineer based in Recife, Brazil. Welcome to my blog!
21-
baseurl: "" # the subpath of your site, e.g. /blog
22-
url: "" # the base hostname & protocol for your site, e.g. http://example.com
23-
twitter_username: patrickrbc
24-
github_username: patrickrbc
17+
18+
author: ''
19+
description: ''
20+
baseurl: '' # the subpath of your site, e.g. /blog
21+
url: 'https://patrickrbc.com' # the base hostname & protocol for your site, e.g. http://example.com
22+
23+
social:
24+
github: patrickrbc
25+
linkedin: patrickrbc
26+
telegram: patrickrbc
27+
twitter: patrickrbc
28+
mastodon: patrickrbc
2529

2630
# Build settings
2731
markdown: kramdown
@@ -37,7 +41,6 @@ permalink: /:categories/:year/:month/:day/:title
3741
plugins:
3842
- jekyll-feed
3943
- jekyll-sitemap
40-
4144
# Exclude from processing.
4245
# The following items will not be processed, by default. Create a custom list
4346
# to override the default setting.

_includes/footer.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<footer class="site-footer h-card">
2+
<data class="u-url" href="{{ "/" | relative_url }}"></data>
3+
4+
<div class="wrapper">
5+
6+
<div class="footer-col footer-col-1 post-meta">
7+
GPG: 53CA 9711 9A55 0C86
8+
</div>
9+
10+
<!--<h2 class="footer-heading">{{ site.title | escape }}</h2>-->
11+
12+
<div class="footer-col-wrapper">
13+
<div class="footer-col footer-col-1">
14+
<ul class="contact-list">
15+
<li class="p-name">
16+
{%- if site.author -%}
17+
{{ site.author | escape }}
18+
{%- else -%}
19+
{{ site.title | escape }}
20+
{%- endif -%}
21+
</li>
22+
{%- if site.email -%}
23+
<li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li>
24+
{%- endif -%}
25+
</ul>
26+
</div>
27+
28+
<div class="footer-col footer-col-2">
29+
{%- include social.html -%}
30+
</div>
31+
32+
<div class="footer-col footer-col-3">
33+
<p>{{- site.description | escape -}}</p>
34+
</div>
35+
</div>
36+
37+
</div>
38+
39+
</footer>

_includes/social.html

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<ul class="social-media-list">
2+
{%- if site.social.mastodon -%}
3+
<li>
4+
<a
5+
rel="me"
6+
href="https://infosec.exchange/@{{ site.social.mastodon |
7+
cgi_escape | escape }}"
8+
target="_blank"
9+
title="{{ site.social.telegram | escape }}"
10+
>
11+
infosec.exchange/@patrickrbc
12+
</a>
13+
</li>
14+
{%- endif -%} {%- if site.social.telegram -%}
15+
<li>
16+
<a
17+
rel="me"
18+
href="https://t.me/{{ site.social.telegram | cgi_escape | escape }}"
19+
target="_blank"
20+
title="{{ site.social.telegram | escape }}"
21+
><svg class="svg-icon">
22+
<use
23+
xlink:href="{{ '/assets/minima-social-icons.svg#telegram' | relative_url }}"
24+
></use>
25+
</svg>
26+
<span class="username">{{ site.social.telegram| escape }}</span>
27+
</a>
28+
</li>
29+
{%- endif -%} {%- if site.social.github -%}
30+
<li>
31+
<a
32+
href="https://github.com/{{ site.social.github| cgi_escape | escape }}"
33+
target="_blank"
34+
><svg class="svg-icon">
35+
<use
36+
xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"
37+
></use>
38+
</svg>
39+
<span class="username">{{ site.social.github| escape }}</span></a
40+
>
41+
</li>
42+
{%- endif -%} {%- if site.social.instagram -%}
43+
<li>
44+
<a
45+
href="https://instagram.com/{{ site.social.instagram| cgi_escape | escape }}"
46+
target="_blank"
47+
><svg class="svg-icon">
48+
<use
49+
xlink:href="{{ '/assets/minima-social-icons.svg#instagram' | relative_url }}"
50+
></use>
51+
</svg>
52+
<span class="username">{{ site.social.instagram| escape }}</span></a
53+
>
54+
</li>
55+
{%- endif -%} {%- if site.social.linkedin -%}
56+
<li>
57+
<a
58+
href="https://www.linkedin.com/in/{{ site.social.linkedin| cgi_escape | escape }}"
59+
target="_blank"
60+
><svg class="svg-icon">
61+
<use
62+
xlink:href="{{ '/assets/minima-social-icons.svg#linkedin' | relative_url }}"
63+
></use>
64+
</svg>
65+
<span class="username">{{ site.social.linkedin| escape }}</span></a
66+
>
67+
</li>
68+
{%- endif -%} {%- if site.social.twitter -%}
69+
<li>
70+
<a
71+
href="https://www.twitter.com/{{ site.social.twitter| cgi_escape | escape }}"
72+
target="_blank"
73+
><svg class="svg-icon">
74+
<use
75+
xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"
76+
></use>
77+
</svg>
78+
<span class="username">{{ site.social.twitter| escape }}</span></a
79+
>
80+
</li>
81+
{%- endif -%} {%- if site.social.rss -%}
82+
<li>
83+
<a href="{{ 'feed.xml' | relative_url }}" target="_blank"
84+
><svg class="svg-icon">
85+
<use
86+
xlink:href="{{ '/assets/minima-social-icons.svg#rss' | relative_url }}"
87+
></use>
88+
</svg>
89+
<span>{{ site.social.rss | escape }}</span></a
90+
>
91+
</li>
92+
{%- endif -%}
93+
</ul>

_layouts/default.html

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,36 @@
1515

1616
{%- include footer.html -%}
1717

18-
<script async
19-
src="https://www.googletagmanager.com/gtag/js?id=UA-137241651-1"></script>
18+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q4C55092PY"></script>
2019
<script>
2120
window.dataLayer = window.dataLayer || [];
2221
function gtag(){dataLayer.push(arguments);}
2322
gtag('js', new Date());
24-
gtag('config', 'UA-137241651-1');
23+
24+
gtag('config', 'G-Q4C55092PY');
2525
</script>
26+
2627
<script>
27-
document.querySelector('.night-mode').onclick = function (e) {
28-
document.querySelector('body').classList.toggle('dark')
28+
window.onload = function () {
29+
setTheme(localStorage.getItem('theme'))
30+
}
31+
32+
document.querySelector('.night-mode').onclick = function () {
33+
let current = localStorage.getItem('theme')
34+
setTheme(toggleName(current))
35+
}
36+
37+
function toggleName (theme) {
38+
return theme === 'dark' ? 'light': 'dark'
39+
}
40+
41+
function setTheme (theme) {
42+
theme = theme || 'light'
43+
44+
localStorage.setItem('theme', theme)
45+
46+
document.querySelector('body').classList.add(theme)
47+
document.querySelector('body').classList.remove(toggleName(theme))
2948
}
3049
</script>
3150
</body>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
layout: post
3+
title: 'Subdomain enumeration with wildcard records '
4+
date: 2021-07-31 13:49:00 -0300
5+
comments: true
6+
categories: footprinting, subdomain, dns
7+
---
8+
9+
**TL;DR**
10+
11+
Enumerating subdomains with wildcard records is tricky but not impossible, here
12+
are some tips. Also, don't trust wildcards as a security mechanism for hiding
13+
sensitive apps.
14+
15+
# The problem
16+
17+
If you did some subdomain brute-force enumeration in the wild you already
18+
bumped into a record that resolves for any type of prefix. This is called a
19+
wildcard record and it can be configured by inserting a record entry with a
20+
label "**\***". This record will also resolve for other sublevels unless it is
21+
inhibited by another record entry.
22+
23+
Many companies use wildcard records as part of their architecture. A well-known
24+
example is Slack which uses it for their workspaces. For example, today I asked
25+
my favorite DNS server to resolve the following records and got the same IP
26+
address:
27+
28+
```
29+
shopify.enterprise.slack.com 18.231.0.250
30+
enterprise.slack.com 18.231.0.250
31+
big-name-non-existent.slack.com 18.231.0.250
32+
```
33+
34+
In this case you might conclude that there is a wildcard record
35+
**\*.slack.com** and maybe we should ignore this domain in your subdomain
36+
enumeration. However, you could end up missing something like
37+
**status.slack.com** which does not resolve to this address. Instead it has a
38+
CNAME pointing to another infrastructure that could be interesting to you.
39+
40+
It is curious how often subdomain enumeration tools mess up or do not handle
41+
this kind of behaviour. Many times the wildcard records are just dropped
42+
without any further check. The problem is that you might lose some interesting
43+
apps by discarding them .
44+
45+
With that in mind, adding a wildcard record can be a tempting strategy to hide
46+
your own services like a needle in the haystack. I can't blame anyone for doing
47+
that, but just keep in mind that this is not going to save you for long.
48+
49+
# Finding interesting stuff
50+
51+
Thinking about how to make a better reconnaissance one could try to overcome
52+
this problem by treating enumeration in wildcard records differently. The
53+
response returned by the wildcard could be stored (sorted if it is multiple
54+
entries) and every subsequent DNS response would be compared with this one.
55+
Everytime we find a new response it would be saved in a map structure.
56+
57+
This would make sure we have at least one subdomain that points to that new
58+
location that we found. However, *the world ain't all sunshine and rainbows*
59+
and we could obviously have a different application sitting on a machine that
60+
will only show up when we set a specific Host header in the HTTP request.
61+
62+
Therefore, this is just something you could use to have more places to look for
63+
security vulnerabilities. There are many other more edgy cases (for example
64+
when including CNAME) that can happen when trying to find assets using DNS. I
65+
hope I can dig into that more in future posts.
66+
67+
Do you have any tips for finding apps on records with wildcard?
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: post
3+
title: The social media trap
4+
date: 2022-12-26 21:32:00 -0300
5+
comments: true
6+
categories:
7+
---
8+
9+
There's no way one can avoid social media completely. We are social creatures.
10+
Even if you close all your accounts and remove all the apps, you would still be
11+
influenced by other people's behaviors and opinions, and those probably got a
12+
high load of influence from social media and so on.
13+
14+
You can indeed make money producing content online. It is also true that social
15+
media platforms can boost your reach. However, the majority of the population is
16+
just consuming and creating poor content that will never lead to a financial
17+
reward.
18+
19+
I would consider myself in the above situation. I'm not in a fair trade with
20+
social media. Not that I ever felt I could be. But the fear of missing out makes
21+
me play the game without even thinking about it.
22+
23+
Most of the value generated from our actions is turned into revenue for the big
24+
techs. In exchange for that, you will be gifted with a subtle dependency on the
25+
feedback you could receive if you saw something good enough.
26+
27+
If you can't escape from it, maybe it's a good idea to spend some time
28+
implementing filters to avoid the consumption of unhealthy content. You need to
29+
feed yourself, just not with junky food.

0 commit comments

Comments
 (0)