Heres an idea, create a alternate persona you use for all those bajillion accounts. Website got hacked? pfft, big deal, you got my bullshit account, grats.
Seriously, take a second and think up a new identity:
-Name
-Address
-Occupation
-Salary
-Password
-Wife? Kids? pet? mistress? mistress!
This is your new account, grats, use it with peace of mind.
Sunday, June 12, 2011
Saturday, June 11, 2011
Changing GNU Screen's Escape Sequence
It seems kind of dumb to me for several different programs to have the same escape sequence. Ever tried to use minicom in a screen session? Or try to go to beginning of line in bash? Not fun.
You have to modify your .screenrc file to have the following line:
escape escapekey metakey
I changed mine to C-` (backtick). So my escape line looks like this:
I got the information from here:
http://ubuntuforums.org/archive/index.php/t-498675.html
You have to modify your .screenrc file to have the following line:
escape escapekey metakey
I changed mine to C-` (backtick). So my escape line looks like this:
escape ^``I got the information from here:
http://ubuntuforums.org/archive/index.php/t-498675.html
MS08-067 Affected Machines
Microsoft's account of affected version of windows. Handy to have.
http://www.microsoft.com/technet/security/bulletin/ms08-067.mspx
http://www.microsoft.com/technet/security/bulletin/ms08-067.mspx
Don't Be A Prick
There is an attitude that is very prevalent in the infosec community. That is arrogance. People who have been told too many times that they are "uber smart leet hackers" and this praise creates an aura that repulses anyone who can see past the facade. Here is a simple idea to ponder on; Arrogance = insecurty + fear.
These people's greatest fears are to be regarded as normal. They are terrified at the thought of their people not respecting them. They fear the judgments of others. And that, my friends is why an arrogant person is the weakest form. A meek individual may be scared of what others think, but at least they wont throw someone in front of a bus to show their muscles.
So let me end on a few simple notes. There was a time you knew nothing, that time has never went away. Your pride simply outgrew your knowledge. If you are looking for a dose of modesty, then here is a spoonful:
One day, everything you know, everything you have, and everything you love will be gone. On that day, there will only be one thing that remains; your memory. You better make DAMN sure that memory of you is a good one. That is your heaven. That is your hell. That is your soul.
Imagine if there was no more tomorrow for you; everyone else goes on, but you don't. Your possessions get divided up and taken by others. Your loved ones will move on and concern themselves with someone else. But there is one thing that remains in the minds of everyone. Your influence, your ideals, your philosophies carry on in those who cared. Those who were touched by your mind. Touched in a positive way, not an arrogant, self-serving, or egotistical way. Not a way that makes people feel like an idiot or a moron that doesn't deserve his own voice.
Next time you are faced with a situation in which you can raise someone up or bring them down, remember the truth of your life - that it ends.
These people's greatest fears are to be regarded as normal. They are terrified at the thought of their people not respecting them. They fear the judgments of others. And that, my friends is why an arrogant person is the weakest form. A meek individual may be scared of what others think, but at least they wont throw someone in front of a bus to show their muscles.
So let me end on a few simple notes. There was a time you knew nothing, that time has never went away. Your pride simply outgrew your knowledge. If you are looking for a dose of modesty, then here is a spoonful:
One day, everything you know, everything you have, and everything you love will be gone. On that day, there will only be one thing that remains; your memory. You better make DAMN sure that memory of you is a good one. That is your heaven. That is your hell. That is your soul.
Imagine if there was no more tomorrow for you; everyone else goes on, but you don't. Your possessions get divided up and taken by others. Your loved ones will move on and concern themselves with someone else. But there is one thing that remains in the minds of everyone. Your influence, your ideals, your philosophies carry on in those who cared. Those who were touched by your mind. Touched in a positive way, not an arrogant, self-serving, or egotistical way. Not a way that makes people feel like an idiot or a moron that doesn't deserve his own voice.
Next time you are faced with a situation in which you can raise someone up or bring them down, remember the truth of your life - that it ends.
Wednesday, June 8, 2011
uniq not working? yes it is
Remember this simple fact and you wont feel like an idiot (like i did about 10minutes ago). Lets say you have a text file with the following:
cats
cats
if you run that file through sort -u you will get the exact same output. Sound crazy? yeah thats what i thought, until you see the invisible. Whitespace. the second "cats" has a space after it. The space at the end makes that line completely different from the previous "cats".
Use the following line to eliminate the whitespace:
Now, run it through sort -u and be a happy camper.
kthnxbai
cats
cats
if you run that file through sort -u you will get the exact same output. Sound crazy? yeah thats what i thought, until you see the invisible. Whitespace. the second "cats" has a space after it. The space at the end makes that line completely different from the previous "cats".
Use the following line to eliminate the whitespace:
sed 's/ //g' filenameNow, run it through sort -u and be a happy camper.
kthnxbai
Monday, May 23, 2011
Removing leading whitespace from file
Sometimes clients like to annoy me and send IPs in a "fancy" format with tabs and space and crap..ugh. I'm a one entry per line kind of guy. So I paste the entries into vim and I want to get rid of leading whitespace. This is the command in vim:
EXPLAIN THIS BULLSHIT:
vim has sed-like regex recognition. This command tells vim to search (%s) for lines begining (^) with whitespace (\s), and include the rest of the whitespaces directly after the first one (*). Next, delete them (//). Now do this globally (g). By default, it will only match the first instance of the regex, g means "do this globally".
:%s/^\s*//g EXPLAIN THIS BULLSHIT:
vim has sed-like regex recognition. This command tells vim to search (%s) for lines begining (^) with whitespace (\s), and include the rest of the whitespaces directly after the first one (*). Next, delete them (//). Now do this globally (g). By default, it will only match the first instance of the regex, g means "do this globally".
Thursday, May 19, 2011
Add Timestamps to bash history
Found the solution here:
http://linux.byexamples.com/archives/467/list-command-line-history-with-timestamp/
TL;DR
add:
to your .bash_profile
http://linux.byexamples.com/archives/467/list-command-line-history-with-timestamp/
TL;DR
add:
export HISTTIMEFORMAT="%F %T "to your .bash_profile
Monday, May 9, 2011
Ghetto-ized IP address range generator
Once i got my head out of my ass, I figured out an uber easy way to generate and sort a long list of IP addresses:
The only thing you would need to edit would be the original echo line to match the range you are trying to generate.
echo -e "\n"192.168.{1..255}.{1..255} #generates the actual IPs using Bash brace expansion
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n #sorts the IPs into the proper order (optional)
>> hosts # output to file!
end result:
echo -e "\n"192.168.{1..255}.{1..255} | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n >> hosts
The only thing you would need to edit would be the original echo line to match the range you are trying to generate.
Thursday, May 5, 2011
SSH and GatewayPorts configuration
I love SSH, like alot, but I was having a problem with lately. Specifically the problem was with the security of remote forwarded ports (-R). I was told that by default SSH only allows remote ports to be bound to the local interface for security reasons. I understand that, completely. The problem is that wanted to be able to use my VPS's SSH connections like a bouncer. I wanted to be able to type:
and have the connection go through vpsserver into the server behind it. In effect, making vpsserver a type of central hub for reverse ssh connections. You can think of it almost like a ghetto botnet.
I found out that all i had to do was change GatewayPorts to "yes" in /etc/ssh/sshd_config and it would work if I issued the following command on the BACK server.
All was well with the world for a while. Then my paranoia was sinking in. I didnt want someone to portscan my vps and see that i have 20 different ports open from reverse ssh connections. What was I to do? Well it turns out that GatewayPorts has 3 different settings; yes, no, and clientspecified.
no(default) = force remote port forwardings to only be accessible to localhost
yes = Force remote port forwardings to public interface (technically no, but in essence thats what it does)
clientspecified = the client decides which to choose
So i changed GatewayPorts to clientspecified and experimented. If you typed the remote forward command we typed in earlier:
we would get a port remotely bound to the vpsserver's localhost address. This would force you to first log into the VPS and then log into the 2222 on localhost.
BUT, if you want the port to be bound publicly on vpsserver, it only takes 1 more character. pay attention closely:
notice that ":" in from of the 2222? that essentially tells ssh to bind it to the public interface*.
Now i have two very similar commands to do two importantly different things. I am a happy camper.
*technically it tells SSH to bind it to all interfaces, which consequently includes the external facing one :)
ssh account@vpssserver.net -p2222and have the connection go through vpsserver into the server behind it. In effect, making vpsserver a type of central hub for reverse ssh connections. You can think of it almost like a ghetto botnet.
I found out that all i had to do was change GatewayPorts to "yes" in /etc/ssh/sshd_config and it would work if I issued the following command on the BACK server.
ssh account@vpsserver.net -R 2222:localhost:22All was well with the world for a while. Then my paranoia was sinking in. I didnt want someone to portscan my vps and see that i have 20 different ports open from reverse ssh connections. What was I to do? Well it turns out that GatewayPorts has 3 different settings; yes, no, and clientspecified.
no(default) = force remote port forwardings to only be accessible to localhost
yes = Force remote port forwardings to public interface (technically no, but in essence thats what it does)
clientspecified = the client decides which to choose
So i changed GatewayPorts to clientspecified and experimented. If you typed the remote forward command we typed in earlier:
ssh account@vpsserver.net -R 2222:localhost:22we would get a port remotely bound to the vpsserver's localhost address. This would force you to first log into the VPS and then log into the 2222 on localhost.
BUT, if you want the port to be bound publicly on vpsserver, it only takes 1 more character. pay attention closely:
ssh account@vpsserver.net -R :2222:localhost:22notice that ":" in from of the 2222? that essentially tells ssh to bind it to the public interface*.
Now i have two very similar commands to do two importantly different things. I am a happy camper.
*technically it tells SSH to bind it to all interfaces, which consequently includes the external facing one :)
vi & vim acting retarded
Ever just fire up a fresh VM or log into a box and try to edit a file with vi and the backspace/arrow keys are acting retarded? It happened it me, I noticed it was because there was no .vimrc file.
Simply copying the default one over to my dir fixed my problem:
Now vi & vim aren't so retarded...
Simply copying the default one over to my dir fixed my problem:
cp /etc/vim/vimrc ~/.vimrc
Now vi & vim aren't so retarded...
Subscribe to:
Posts (Atom)