Friday, June 3, 2022

Installing OSSEC 3.7.0 on Debian 11 (Bullseye) How-To

Now that version 3.7.0 has been released I took another deep dive into how this is compiled from Source, as usual I brought this onto me because I like testing this for when I have to push it into other systems that are not directly supported by the available packages.

For OSSEC 3.7.0 a package was added to the previous requirement list which can be found below:

apt install wget build-essential libpcre2-dev zlib1g-dev inotify-tools libevent-dev libssl-dev libsystemd-dev

To download and decompress run:

wget -qO- https://github.com/ossec/ossec-hids/archive/3.7.0.tar.gz | tar -zxvf

And finally run the install.sh file, again for my case I use local as I pull the logs using NXLog.

Have fun!

Sunday, January 24, 2021

Installing OSSEC 3.6.0 on Debian 10 (Buster) How-To

Because this always catches me by surprise when I need to do it, and while I don't do it often it is always this that bothers me the most, so here is how to install OSSEC 3.6.0 as a local agent on a Debian 10 OS, has worked the same for x64 and ARM systems so far.

First get those packages in line, I usually run a minimalist version of Debian so these may not come with your current installation. 

apt install wget build-essential libpcre2-dev zlib1g-dev inotify-tools libevent-dev libssl-dev

With that out of the way pull the package for OSSEC 3.6.0:

wget https://github.com/ossec/ossec-hids/archive/3.6.0.tar.gz

Unpack the newly downloaded .tar.gz

tar -zxvf 3.6.0.tar.gz

Go into the folder, search for install.sh and run it then do local, again this should also work for other modes of OSSEC but I usually do local and pull logs through other methods.

Have fun!

Saturday, September 12, 2020

Creating an Access Point with a Raspberry Pi Model b (Original RPi) and a TP-Link TL-WN725N v3

I had to be very specific on the title because I am unsure if this will work with other models or versions but in theory it should, it all should, but that is the same thing I thought when I was doing this.

This was done with a fresh Raspberry OS install and no additional configurations, I have an ethernet connection and the adapter (TL-WN725N v3) which was being recognized and seemed to work fine, could get a connection established but something was funky and I could not figure it out.

After much trial and error (saving you time here) I found out the following documentation:

https://www.raspberrypi.org/forums/viewtopic.php?uid=81098&f=28&t=62371&start=0#p462982

From the above link there is a way to get the appropiate version of the driver (8188eu) which eluded me for a while (don't judge me, I tried my best here and thought the one that came with the Pi worked fine).

Here is a link that takes you directly to the drivers, in order to know which one is the right one for you do uname -r in the CLI to figure out your version: http://downloads.fars-robotics.net/wifi-drivers/8188eu-drivers/

Got that done? Good, now go and get yourself rasp-ap, a Web GUI to configure the RPi as an AP or AP-STA without having to do it all by your own, note that this is working through HTTP so you may want to get this working out with HTTPS through the command provided in the same website almost at the bottom: https://raspap.com/

If everything is good all should be green and up, don't forget to reboot for good measure.

For personal good measure I dropped port 80 (for HTTP) in the iptables because it would seem like HTTP continues to work regardless if you have the certificate or not, also the port doesn't change anything aside from the port in which you would be connecting to be it HTTP or HTTPS, doesn't mean it will switch over and drop the HTTP connection.

Hope this helps!

Additional Note:

When the Kernel version is updated on your RPi remember to update the version of your driver from the fars-robotics.net website, if you upgrade and eventually restart this will stop working.

Friday, September 4, 2020

Compiling NXLog CE 2.10.2150 and the dreaded -lcrypto error

Just two days was the time I had to mess around with to figure out what the problem was, sometimes this is not intuitive but it goes to tell you to be careful in what you are doing and what packages you are using to compile.

For whatever reason this worked in CentOS 7, which intrigued and bothered me at the same time because I had done this in Debian.

Now you may be wondering, why would you need to compile it in Debian? Because I have two Raspberry Pi which I use to capture and move logs around, so right now I am intrigued since I know this can be done.

My main issue was an error that mentioned -lcrypto not found, but I have the ssl dev package installed, what gives?

No, turns out I had the wrong package installed and there is no reference to this anywhere, I even compiled OpenSSL from the source code to test this out.

So to cut this short, this should be the list of packages you need to compile this from source in Debian or Ubuntu at the 2.10.2150 version.

If you got any problems with that let me know, also remember that you may need to add contrib and non-free to your repositories.

Debian Compilation of NXLog

apt install build-essential libapr1-dev libpcre3-dev libssl1.0-dev libexpat1-dev

Tuesday, March 19, 2019

Recovering damaged videos with untrunc

This is more for personal reference but I know someone somewhere will need this and I want to have it here as a light house because this was a pain to figure out.

There is an application called untrunc which can help recover a damaged video file as long as you have another file that was produced by the same device, in my case I am recording playthroughs and this is happening because the hard drive is giving out on me for random reasons, I can't ask much from a hard drive that has been in use for more than 8 years.

untrunc can be found here: https://github.com/ponchio/untrunc in its original form and an improved version here: https://github.com/anthwlock/untrunc

The one from anthwlock is the one that worked for me, the one from ponchio would not compile no matter what I did, for reference this was done both in Debian 9 and 10.

Once I followed the steps from anthwlock I had it installed, I added it to /usr/bin and I ran first the following command:

untrunc -v (good video) (bad video) because as it was the thing would not go through, I did not understand why though so -v told me that there was an issue with consistency, because the first video was larger than the second, how did I go around this? By using -a and -s so it looks something like this:

untrunc -a -s (good video) (bad video)

You may get a ton of prompts telling you if it's OK to continue, go ahead and from there you should be able to recover the damn thing, go at it, edit it and have fun!

Saturday, February 16, 2019

Crusader Kings II - Holy Fury: Powernexing Ireland (Week 3)


Week 3 of the Powernexing Ireland Campaign for Crusader Kings II, Holy Fury (3.0.1.1)

Battle Report of the Week:

For the third week of the Iron Man Powernexing Campaign we have gone through two Kings, rebellions, vassals coming to power and taking territory outside of our currently controlled domain, the crowns continue to be under the hold of a single Tanist but struggle is evident as voting is contested between different members of the family, our control over the Isles is almost complete as we have almost finished pushing Denmark out of the Isles and we are slowly bringing Pictland into our control.

One important note that I would like to point out for this section of the playthrough is the creation of titles, while this may not be evident here is a little more into this matter as I never went deep into this when I was doing this in the playthrough.

Why divide titles between vassals or why create new titles?

Division of power in Crusader Kings 2 is very important, due to limitations of the Tribal/Feudal Lord system in real history there was only a limited people that one single person could handle, this is the same in game mechanics in which you are limited to the amount of titles you can have as well as territory and vassals, having too many vassals under you means less gold and in the long run means more problems, to go down the line let me exemplify:

We currently control 40 counties, out of those 40 counties we can only rule 8 due to our rank, stewardship and other traits/bonuses, this means that the remaining 32 counties have to be governed by other people be it one each or a couple each, the optimal division of power, in my opinion, is done through very small divisions of land, if out of those 40 counties we can make 10 duchies that means that approximately each 4 counties would need a duchy, we can hold two at most without getting a negative opinion penalty, the remaining 8 duchies are to be assigned to 8 vassals who in turn will have 3 vassals below them, with this division of power it is harder for rebelling vassals to bring against us a large amount of allies into the fray, if they do these allies will be divided in very small sections that in turn produce different amount of money and troops, to us this is an advantage to control internal rebellions but when external threats come we mainly have to relay on our retinues, armies and available vassal armies.

What is coming next:

For the next week here is a sneak peek, we did manage to accomplish two important goals, one, the Empire of Alba was formed before 850 and two, we are now Feudal and have not been grinded to death by our neighbors or our vassals which is quite impressive for me.


What is Powernexing?
Powernexing comes from Diplonexing, I’m not sure if I heard it first from Arumba or Quill18, which in turn means to quickly and without consequence annex territory from your neighbors without getting yourself in the middle of the crosshair, basically this means that we will get territory through border disputes, fabricated claims, intrigues, marriages or any other method that will get us more territory under our belt, but there is more to it than simply saying it, applying it is a whole different story but let me put this into context as we are slightly cheating here by choosing the right scenario.

Setting up the battleground:
As an old tradition I always start as a Count in either Ireland or England, it is not so much that I start as a Feudal or Tribal Count but rather this position allows me to experiment on different techniques and ideas that I have, in one playthrough I decided to start moving south instead of consolidating inside the islands so I eventually ended up with territory in northern France and northern Spain, in another instance I invaded Norway and Sweden then was crushed by the pagans in Finland, a fun playthrough, and as another old tradition we have done a playthrough in Russia and managed to get an Empire so large it was becoming very complicated to govern everything without more than two human players.

Agenda and Objectives for the Playthrough:
I always keep ideas in mind about how and what I want to do for a playthrough, for this particular one I came up with the following agenda:

Agenda:
1) Test new mechanics from the DLCs past Horse Lords, this means using and abusing old mechanics too to accomplish our objectives
2) Iron Man mode only, if I fail I fail, no reloading, no rage quitting, no cheating, nothing, it is what it is and the world keeps moving on with or without my intervention
3) This is a single player campaign and no other players will intervene, for other playthroughs this could be different though

Objectives:
1) Start as a Count and go all the way up to Emperor, this does not mean the title of Emperor must come from being the Emperor of Britania, it can be from any other Empire or forming our own
2) The original culture of the founding character shall remain the same, any characters who do not have this culture will have it pushed into them
3) The same applies for the culture inside Ireland, it shall always remain the same as well as religiously it shall remain Catholic, adjacent territories to Ireland shall eventually become of the same culture
4) Only family shall control the counties, duchies and kingdoms under the main ruler, as the expansion continues everything shall temporarily remain under the hands of others but at a minimum, every mechanic shall be used to bring everything under the rule of the same dynasty
5) Prisoners will be ransomed when possible otherwise released, traitors will be executed when no titles are under their belt otherwise it will be removed from them, this also applies to family
6) The dynasty needs to be at least one hundred members big by the turn of the next century from the start date, in this case 869, through any means possible
7) Council members should only be family when possible and applicable, otherwise other members may be part of the council
8) The ruling member of the family will always have the largest amount of territory possible for the rank it possesses, always, which also means that Centralization shall be performed as soon as possible in order to get more territories under the same ruler, other family members shall have equal amounts of territory to avoid major confrontations between them
9) Peace shall always be enforced inside the realm and as soon as it is possible the vassals shall have all power removed including the council

Here are the links to the videos:
Ireland Pt. 10https://youtu.be/olL2IVljkLw
Ireland Pt. 11 https://youtu.be/9BvmKiGxXQE
Ireland Pt. 12 https://youtu.be/yNcUXPVcE-g
Ireland Pt. 13 https://youtu.be/QDjE0DtG6o4
Ireland Pt. 14https://youtu.be/uXass7maqZ4


Friday, February 8, 2019

Crusader Kings II - Holy Fury: Powernexing Ireland (Week 2)


Week 2 of the Powernexing Ireland Campaign for Crusader Kings II, Holy Fury (3.0.1.1)

Battle Report of the Week:

For the second week of the Iron Man Powernexing Campaign we have made considerable progress in expanding our holdings and have doubled the amount of territory under our belt, the entirety of the island of Ireland is now under our control and we have taken over the crown of Wales as well and managed to keep it under one ruler in what could have potentially been a succession crisis.

Currently from our position we are bound to become the sole rulers of Britannia in a matter of decades if not potentially years, below is a sneak peak at what is to come the following week regarding the current path of expansion.


This is how we ended this week, the north of the Isles will be ours by inheritance through our bloodline, some other members of our family are also in France, Germany and the southern side of the Isles, at this rate we will have family helping us from the continent in case we needed so.


The screenshot above is a sneak peak of what has transpired during one of the sessions of next week, while expansion was considerable so was our threat and now, we have an eye upon us, have we failed to keep our cool and will we get the wrath of our neighbors on top of us, maybe another planned invasion? Find out next week on this thrilling playthrough of Powernexing Ireland/The Isles!

What is Powernexing?
Powernexing comes from Diplonexing, I’m not sure if I heard it first from Arumba or Quill18, which in turn means to quickly and without consequence annex territory from your neighbors without getting yourself in the middle of the crosshair, basically this means that we will get territory through border disputes, fabricated claims, intrigues, marriages or any other method that will get us more territory under our belt, but there is more to it than simply saying it, applying it is a whole different story but let me put this into context as we are slightly cheating here by choosing the right scenario.

Setting up the battleground:
As an old tradition I always start as a Count in either Ireland or England, it is not so much that I start as a Feudal or Tribal Count but rather this position allows me to experiment on different techniques and ideas that I have, in one playthrough I decided to start moving south instead of consolidating inside the islands so I eventually ended up with territory in northern France and northern Spain, in another instance I invaded Norway and Sweden then was crushed by the pagans in Finland, a fun playthrough, and as another old tradition we have done a playthrough in Russia and managed to get an Empire so large it was becoming very complicated to govern everything without more than two human players.

Agenda and Objectives for the Playthrough:
I always keep ideas in mind about how and what I want to do for a playthrough, for this particular one I came up with the following agenda:

Agenda:
1)      Test new mechanics from the DLCs past Horse Lords, this means using and abusing old mechanics too to accomplish our objectives
2)      Iron Man mode only, if I fail I fail, no reloading, no rage quitting, no cheating, nothing, it is what it is and the world keeps moving on with or without my intervention
3)      This is a single player campaign and no other players will intervene, for other playthroughs this could be different though

Objectives:
1)      Start as a Count and go all the way up to Emperor, this does not mean the title of Emperor must come from being the Emperor of Britania, it can be from any other Empire or forming our own
2)      The original culture of the founding character shall remain the same, any characters who do not have this culture will have it pushed into them
3)      The same applies for the culture inside Ireland, it shall always remain the same as well as religiously it shall remain Catholic, adjacent territories to Ireland shall eventually become of the same culture
4)      Only family shall control the counties, duchies and kingdoms under the main ruler, as the expansion continues everything shall temporarily remain under the hands of others but at a minimum, every mechanic shall be used to bring everything under the rule of the same dynasty
5)      Prisoners will be ransomed when possible otherwise released, traitors will be executed when no titles are under their belt otherwise it will be removed from them, this also applies to family
6)      The dynasty needs to be at least one hundred members big by the turn of the next century from the start date, in this case 869, through any means possible
7)      Council members should only be family when possible and applicable, otherwise other members may be part of the council
8)      The ruling member of the family will always have the largest amount of territory possible for the rank it possesses, always, which also means that Centralization shall be performed as soon as possible in order to get more territories under the same ruler, other family members shall have equal amounts of territory to avoid major confrontations between them
9)      Peace shall always be enforced inside the realm and as soon as it is possible the vassals shall have all power removed including the council

Here are the links to the videos:
Ireland Pt. 5 – https://youtu.be/4-3Pf-p4S6M
Ireland Pt. 6 – https://youtu.be/poS7ar-xWag
Ireland Pt. 7 – https://youtu.be/32gEjBlZQ78
Ireland Pt. 8 – https://youtu.be/eJqX1Y4XfqM
Ireland Pt. 9 – https://youtu.be/9sYDpupQBm8

Installing OSSEC 3.7.0 on Debian 11 (Bullseye) How-To

Now that version 3.7.0 has been released I took another deep dive into how this is compiled from Source, as usual I brought this onto me bec...