Forget "Remember Password" browser feature

by cliper Tuesday, February 08, 2011 3:02 AM

 

This morning, I've read many posts about passwords that are stored in our browsers. Commonly, people tend to use these stuff because first, it's easy to use, and second its defaulted to any browsers.

I use these features too. I did not have time to search for flaws and things like anyone can remotely access your saved passwords but who knows? it might be saved as plaintxt or not, it's still not formal to save passwords in the browser.

Just this morning, I spoke to one of my close friend this morning and I ask for few tips about password management and he recommended and used PasswordSafe (http://passwordsafe.sourceforge.net/).

 

It's actually easy to use and it's open-sourced. GUI is free and you can find a precompiled version of it in sourceforge.

Let me share some screenshots on things to start with...

Note: To create a new database, you will be prompted at first start of the app. Make sure you click the button "New Dabatase"

and then choose where you want to save it.

 

 

When opening your PSafe data, start PSafe and select the dropdown box, if it's not listed there then click the select button.

Also, it's safe to use the virtual keyboard. But then if you got keyloggers already swarming your system then it's recommended to do something for it.

 

 

 

You can also choose to view the file as Read-only.

Often, you will see a popup box "File In Use" and you have to choose Read-Only or Read-Write. Just make sure that you don't have any PSafe running in the background. You can also check this in the right-bottom side of your screen near the system time.

 

 

 

To add entries, you can find it in Edit > Add Entry...

 

 

Hope these few screens will help you get started. Now, I don't need to worry for keeping my password safe and secure other than trusting the browser's "Remeber password" feature which is also suffer from attacks (and the browser itself) every day.

As I review the app, all you need is there, auto-generate passwords and most of the thing you need is there. So go check the software out. If you want to find more details on this project, you may refer to this: http://www.schneier.com/passsafe.html

Cheers,

 

...

 

Tags:

General | Security | Tips/Tricks

Invalid command 'Header' in htaccess

by cliper Tuesday, February 01, 2011 12:05 PM

You might encounter an error in your /etc/apache2/error.log stating:

 

[Tue Feb 01 00:57:02 2011] [alert] [client 192.168.1.102] /home/cliper/lampen/.htaccess: 
Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

This is because mod_rewrite is not loaded. In my case, I suspected that mod_headers was not enabled.

So in terminal I did

 

a2enmod headers

 

and restart apache2

 

/etc/init.d/apache2 restart

 

For hosted sites, you might contact your system administrator or in your cpanel.

 

System: Debian

Apache ver: 2.2.9 (Debian)

 

...

 

Tags:

Apache 2 | Linux | Tips/Tricks | Web Hosting

Playing with your hosts file /etc/hosts

by cliper Thursday, January 27, 2011 10:36 AM

Last week, I've been playing a lot of my local PC and my development computer. Sometimes we need to replicate everything from server to local. You know what I mean?

Anyways, this is very useful when you have a client abroad and that they gave you an assignment with very limited control. In this post, I'll make an example of a website which has a third-party component which is bought by your client and license is locked-in by domain name.

Now you think that "how the heck I'm supposed to use those components locally?". Answer is "your host file". You ask again, "What is it to do with my host file?". Well, its easy. I don't have time to explain more about the OS host file but know this:

The host file is a system file that will be called by your system whenever you're trying to requests a domain on the internet before a DNS request is requested to your router and router to routers... and in to the root zones. Well, you don't have to know all those stuff. For this post, I'd like to make an example on why this file is important.

First, you have to know some things. For windows, it usually resides in C:\WINDOWS\system32\drivers\etc\hosts. By typing "drivers" in your Start > Run, you will be redirected to C:\WINDOWS\system32\drivers.

For linux, its in /etc/hosts. This file will not appear in windows if you don't have network adapter installed.

So how does it look like? well, it should have an entry something like this:

127.0.0.1       localhost
127.0.0.1 	mpa.one.microsoft.com

for windows and are very identical to linux and most unix systems.

Now, if we're going to add an entry there say mydomain.com with an ip address of our own, all requests to "mydomain.com" will be mapped to that of our own ip address. Whenever any programs like your browser, IM clients, torrents and others will make requests to the internet, it will consult your host file first.

So back to our third-party component. Let's assume we have downloaded all the files for website.com from  your client, all you have to do is make an entry of website.com and put your local ip address with it. So it should look something like this.

127.0.0.1       localhost
127.0.0.1 	mpa.one.microsoft.com
127.0.0.1   website.com

Now, let's try your third-party components if it works. This solution is not applicable to components that are locked by ip address. So don't comment about it. :P

The host file draws many solutions to our problems and are very handy for making hacks like this one. Also, some viruses and trojans are making use of this.

For the sake of others, I'd extend this post to something different. We know that we had the internet crowded with spams nowadays. Commonly happens in the internet wherein we sent e-mails everyday, we receive newsletters everyday, we register to a new website everyday... to name a few. Now we can fall as a victim to this. Now remember this: "make sure you're visiting a website with the proper url in your browser". Remember to read e-mail with caution. Don't read mails you don't know. Make sure you don't get ip address like 12.13.243.24 in your browsers address but you see paypal website. Check your host file regularly. Make sure there's no strange entries like 172.12.33.4    ip1.otherhackergroup.com

That's it for now and please do leave a message if you have something to ask. Thanks!

 

...

 

Tags: ,

Linux

Images don't show up in Magento Product Information Page

by cliper Thursday, January 27, 2011 10:22 AM

Late yesterday, we're working on something we don't expect in magento. Looking into the problem is very frustrating because we really don't have any clue what just happened until we found out that its just a persmission problem.

This might occur to you when you want to move a magento site to other existing instance (site) of magento. If you've been to magento, you know this already. In our case, we manually copied the media folder under the root directory of magento to the target instance of magento. Now, the previous media dir has "cache" folder already since it has been running for a long time now.

This cache folder is created on-the-fly when we tried to visit product information so that when you get back, it will reuse the same pictures together with your active session in the server-side.

Now, what just happened when we transferred the pictures in the target instance using "cp -r" in linux is that it resets the permissions of the folder. So eventually, the web-server and php can't right in it.

So our quick solution is we chowned the folder to its same user of the target folder. in the example it is "user" and a group "www-data". We also chowned the folder to 777 since its not that visible to public and for us to really make sure it is writable for any users.

> chown -R user:www-data cache/
> chmod -R 777 cache/

Anytime you can adjust the permissions like change to 775 or 755. And for this problem, it works and it solved our 24 horurs problem.

 

...

Tags:

Linux | Magento | PHP | Tips/Tricks

Copying Multiple Files using SCP

by cliper Thursday, January 20, 2011 10:43 AM

 

For the rest of my Linux experience, I've been doing a lot of backups. One tool that I can rely on is "scp" (Secure Copy).

Well, I'd recommend this tool when copying files from server or vise-versa.

Here's the how to use it:

 

scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]

           [-l limit] [-o ssh_option] [-P port] [-S program]

           [[user@]host1:]file1 ... [[user@]host2:]file2

 

In this snippet, we only need the "user@host1:]file1

There are also popular tools like rsync, wget, or version controls like git, etc... when downloading files, synching projects etc. and I will post about it later.

Anyways, here's my code snippets for scp:

"For this snippets, suppose we have a server named "google-server.com" and we had files named twitter.txt and facebook.txt under /home/cliper/"

Copy (download) multiple files: twitter.txt, facebook.txt from google-server.com

// note, we use brackets together with a back-slash to separate multiple files.
scp user@google-server.com:/home/cliper/\{twitter.txt,facebook.txt\}

 

 

Copy (download) twitter.txt from google-server.com

scp user@google-server.com:/home/cliper/twitter.txt

Uploading files to the server is much like the command above. In the following examples, we have server1.com as our target server and we have a folder /home/cliper/ there. Assumed that we had a Linux box locally when sending the files to server1.com. Now take a look at the difference. So if we have /home/mylocal_linux_pc/file.txt you will do something like..

Upload files to server1.com

 

scp /home/mylocal_linux_pc/file.txt user@server1.com:/home/cliper/

 

 

Tags: ,

Code Snippets | Linux

About the author

Author's PhotoI enjoy web developing and would like to share my thoughts of it.

Send mailE-mail me

Most comments

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar