Friday, July 30, 2010

Apt-get Cheat Sheet

Just something that always comes in handy for me and my short term memory. Apt-get is a package manager tool used to install, remove, update and manage packages (software) on debian/ubuntu based linux machines. I stubbled accross this on another blog and i find it to be short and straight to the point. Hope you may find this useful as well.

Taken from http://archangelamael.blogspot.com/2009/06/using-apt-get-quick-reference.html

There are 3 basic installers in BT4 apt-get the basic command line package
management system. aptitude is a curses based front end for apt-get.
And synaptic which is a gui version. Other than that there really are no major
differences.
Now lets look at some of the commands that are available for us.
First
Code:

# man apt-get

The manual page read it.
Code:

# apt-cache pkgnames

Gives us the names of all the installed packages we have on the system.
The list is not really to organized so add a | pipe and sort to the end and then it will alphabetized.
Code:

# apt-cache search programname

add the name of a program that you want to search for. The command will show software packages with the expression you entered. One problem with apt is that it really needs the exact name of a package for better results.
Code:

# apt-get install packagename

Pretty simple since all the work is now done for you.
There is a caveat to this method of package installation. You can't pass any
configuration options to the program. To remove a package just the opposite
should be done.
Code:

# apt-get remove packagname

This will remove the package but may not remove all configuration files. In order for that do instead
Code:

# apt-get remove --purge packagename

Next updating software.
First:
Code:

# apt-get update

This updates the list of currently installed software, this is the same list that we saw earlier. Next actually updating said list.
Code:

# apt-get upgrade

Now the thing about this command is that it will upgrade to the most recent
version of all packages on the system. This may or may not always be the best way of doing business. Some packages may not work as well as the older ones. Use with care. use a -s before upgrade to simulate, or see which software will be updated. A better way is to use dist-upgrade
Code:

# apt-get dist-upgrade

This will upgrade all packages with conflict resolution and discarding less important packages for more important ones. There are many other commands but the above should help get you started working with apt. Hope it helps.
Credits: This tutorial was created with help from the Debian APT How-To which can be found here: Debian -- Debian Documentation Project
And the man page

Resources/Good Reading:
http://archangelamael.blogspot.com
http://archangelamael.blogspot.com/2009/06/using-apt-get-quick-reference.html

Source: http://aerokid240.blogspot.com/search/label/apt-get
Thanks!

Anti Meterpreter

Command:
EXAMPLES
--------

Scans memory in every 5 minutes, kills the meterpreter process automatically, verbose mode is enabled: antimeter.exe -t 5 -a -v

Scans memory in every minute and only detects the meterpreter process: antimeter.exe -n

Scans memory in every minute, explorer and winlogon processes are excluded from scanning: antimeter.exe -e explorer.exe,winlogon.exe


Source:
http://www.mertsarica.com/ 
http://packetstormsecurity.org/filedesc/antimeter.zip.html

_____
:>)

NMAP COOKBOOK

NMAP COOKBOOK – The fat-free guide to network scanning” is the latest book on the world’s best network scanning tool, NMAP. It is the most popular tool with pathora of options which works on wide range of platforms including Windows & Linux.

NMAP is the most popular tool out there with so many options to fine tune the network scanning based on one’s needs. Often new comer and even experienced professionals find it difficult to use full features of NMAP when it comes to field work. In this direction, ‘NMAP Cookbook’ does a great job in conveying rich features of this great tool with its simplified and concise illustration.



In a nutshell, following topics have been covered,
Installation on Windows, Mac OS X, Unix/Linux platforms
Basic and advanced scanning techniques
Network inventory and security auditing
Firewall evasion techniques
Zenmap – A graphical front-end for Nmap
NSE – The Nmap Scripting Engine
Ndiff – A Nmap scan comparison utility


In addition to explaining basic scanning techniques, it goes on describing other related stuffs such as firewall evasion methods, scripting engine of NMAP, using graphical version of NMAP tool etc. These things together make it great reference book for any security professional.

The book is written based on latest version of the tool, NMAP 5.0. All the scanning options are shown along with visual illustrations which helps in quick grasping of practical examples.

     "Overall, it stands out from other NMAP based books due to its simplistic and concise explanation which         makes it very fast and easy to master the intrinsic technicalities of NMAP.

Source: http://nagareshwar.securityxploded.com/2010/04/19/book-of-the-month-nmap-cookbook/
Thanks!

________
:>)

Solving E: Sub-process /usr/bin/dpkg returned an error code(1)

Some Ubuntu users may had experienced this problem. And it’s can’t be fixed by simply typing sudo dpkg –configure -a . I got a way to resolve it, but users must be remember that I am not responsible for any trouble caused by this solution. I tried, and it works on my PC.

How to resolve it?


First Delete (sudo rm)
/var/lib/dpkg/info/"unwanted-package-name".postrm
/var/lib/dpkg/info/"unwanted-package-name".list


And over here, the unwanted-package-name is the package that causing the main problem, when the problem is appeared, you will know where the package that causing the problem.

After that, type this following codes respectively on the terminal.

sudo apt-get clean all

sudo apt-get update //run it twice

sudo apt-get upgrade

Note that for safety reason, please backup those files that I defined above.

Source: http://allforlinux.com/2010/07/solving-e-sub-process-usrbindpkg-returned-an-error-code1/
Thanks!

Saturday, July 17, 2010

Một suy ngẫm

                                   Vũ Thi

Người rách việc là người hay nghĩ, mà cũng phải thôi, kẻ khó thường hay ngẫm ngợi, so sánh! Sự đời mỗi ngày mở ra như một trang vở mới, có kẻ nhìn vào đó tối sẫm như bức vách, có người như buổi sáng tinh mơ, nhưng chung quy tất cả chúng ta đều suy ngẫm. Một ngày mới thì chưa tới, chưa qua, song chúng ta đều bắt đầu đặt vào đó biết bao nhiêu hoài niệm, trái phải và tất cả chúng ta đều phải bước tới một ngày. Chỉ có vậy, một ngày là 24 giờ chẳng kém, nó cứ lững thững đi qua đời kẻ khó và chạy biến qua mọi cuộc vui.
Người ta so sánh thời gian của nhau để tìm ra khác biệt vui buồn, sướng khổ nên thời gian nhiều khi cứ như kẻ vô loài ác độc, nó như cái thước, như quan tòa cho mọi suy ngẫm trên đời! Người ta mầy mò, dòm dõi nó cứ như là của lạ mà thực sự thì có gì là lạ lắm đâu, thật giản dị, buổi sáng có ánh mặt trời, về chiều có bóng đêm đó là hai cực của một ngày trôi nổi, song con người ta vẫn cứ là suy ngẫm mà tất cả có ai bỏ một giờ nào trong ngày đâu, họ tận dụng thời gian như ăn quả dừa: nước uống, cùi ăn, vỏ làm gáo, có lẽ cõi đời thật tuyệt diệu nên loài người thường hay kêu ca về nó! Có thể chúng ta là thành tinh của loài khỉ nên hay thường tò mò tinh quái như vậy, chúng ta cứ sống mà giày vò, dằn vặt nhau cho đủ hai bốn giờ trong ngày, chẳng sót phút nào mà ngơi, mà nghỉ, mà suy, mà ngẫm.


Thời gian cứ căng thẳng như sợi dây đàn, mà tiếng kêu là loài người tri kỷ. Họ sống trong thời gian và kêu ca về nó, có lẽ loài người khổ hơn cây cỏ vì thiên nhiên có than vãn gì đâu, người ta chiêm ngưỡng nó, song không học được điều gì ở nó, có lẽ chỉ có Lão Tử là người duy nhất thoát khỏi muộn phiền, tự hòa mình vào thiên nhiên không thiệt hơn, đừng phải trái. Mà ngẫm cho cùng, chúng ta có làm được điều gì hơn đâu!

Theo http://chungta.com/Desktop.aspx/ChungTa-SuyNgam/Nhan-Thuc/Mot_suy_ngam/
Xin cám ơn tác giả.

Tuesday, July 13, 2010

8 comprehensive safety tools and free web

Building off the latest version of Sandcat wanted to make a small collection of the most popular and powerful for the analysis of free web security.

On occasion I've read comparisons of these tools with others that only make their analysis based on signatures, such as Nikto or the free version of N-Stalker This comparison is wrong, since the approach is completely different. Both are focused on detecting vulnerabilities but the pattern-based applications generally have larger databases and updated comprehensive tools and therefore are complementary.

The characteristics are very similar in all of them make navigation and later released after the test. Except the last two scrawlr and Acunetix, which only detect SQL Injection and XSS respectively, all others look for common vulnerabilities.

Sandcat Free Edition
URL: http://www.syhunt.com/?n=Sandcat.Sandcat
Download: http://www.syhunt.com/?n=Sandcat.Download
Operating System: Windows



CE NetSpaker
URL: http://www.mavitunasecurity.com/communityedition/
Download: http://www.mavitunasecurity.com/communityedition/download/
Operating System: Windows



Websecurify
URL: http://www.websecurify.com/
Download: http://code.google.com/p/websecurify/downloads/list
Operating Systems: Windows, Mac OS, Linux



w3af
URL: http://w3af.sourceforge.net/
Download: http://sourceforge.net/projects/w3af/files/
Operating Systems: Windows, FreeBSD, Linux

skipfish
URL: http://code.google.com/p/skipfish/
Download: http://code.google.com/p/skipfish/downloads/list
Operating System: Linux






wapiti
URL: http://www.ict-romulus.eu/web/wapiti/home
Download: http://www.ict-romulus.eu/web/wapiti/download
Operating System: Linux



scrawlr
URL: URL
Download: Download



Acunetix free edition
URL: http://www.acunetix.com/cross-site-scripting/scanner.htm
Download: http://www.acunetix.com/vulnerability-scanner/download.htm
Operating System: Windows



Source: http://www.securitybydefault.com/
And Source

Thanks!

Clear DNS cache on Linux, Windows or Mac

Sometimes we have to clear the DNS cache, especially if you change a server domain and want to prove that everything works fine, so I recommend in these cases is to set the ip as DNS server or DNS server "authoritative" in that domain. This will work on the new server and will see that everything works correctly.

To clear the DNS cache will do from the terminal / shell / console and by operating system we use would type:

1 GNU/Linux: sudo /etc/init.d/nscd restart
2 Windows: ipconfig /flushdns
3 Mac OS X: lookupd -flushcache
4 Leopard and later : dscacheutil -flushcache

Thanks 
Have a fun! :>)

Source
Translate

accumulation...!

Monday, July 5, 2010

This Never Happened Before

                               Paul McCartney 

I'm very sure        
This never happened to me before
I met you and now i'm sure
This never happened before

Now i see
This is the way it's supposed to be
I met you and now i see
This is the way it should be

This is the way it should be for lovers
They shouldn't go it alone
It's not so good when you're on your own

So come to me
Now we can be what we wanna be
I love you and now i see
This is the way it should be

This is the way it should be

This is the way it should be for lovers
They shouldn't go it alone
It's not so good when you're on your own

I'm very sure
This never happened to me before
I met you and now i'm sure
This never happened before (this never happened before)
This never happened before (this never happened)
This never happened before (this never happened before)


Thanks  Paul McCartney!

And now, begin learning about linux.
for what?
yes, accumulation...!

Saturday, July 3, 2010

Undo My Love: Trả lại lời thề!

                                           Huỳnh Ngọc Chiến

Tặng NQC, PD và TH để nhớ một buổi trưa với “Ngẫu hứng Sài Gòn”


Bất kỳ ai sử dụng máy tính đều quen thuộc với lệnh undo, dùng để xóa thao tác vừa thực hiện, trả lại tình trạng trước đó, như khi chưa thực hiện thao tác. Từ undo có nhiều nghĩa, ở đây tôi – căn cứ theo tự điển The American Heritage Talking Dictionary – xin giới hạn trong phạm vi undo được dùng theo nghĩa “đảo ngược” (reverse); “xóa bỏ” (erase); “hủy bỏ” (annul) một tác dụng hay hoạt động nào đó. (Ví dụ : impossible to undo the suffering caused by the war : khó lòng xóa bỏ được vết thương chiến tranh). Khi bạn vẽ một đường kẻ trên trang giấy, rồi bạn xóa đi, nghĩa là bạn undo thao tác vẽ thì trang giấy, dù trở lại trạng thái trước đó, cũng vẫn mang một vết xóa mơ hồ. Đối với máy tính thì lại khác, bạn có thể thực hiện một số thao tác, sau đó thực hiện một loạt các lệnh undo thì chắc chắn máy tính lần lượt sẽ được trả lại trạng thái ban đầu, như khi bạn chưa thực hiện các thao tác đó. Lệnh undo rất đắc dụng để ta sửa lại các thao tác sai lầm. Giá như trong cuộc đời có lệnh undo thì con người đã hạnh phúc biết bao nhiêu. Để ta sửa đổi biết bao nhiều lầm lỗi và cữu vãn những đổ vỡ trong đời. Phần lớn bi kịch của cuộc sống vẫn được xây dựng trên những chữ “Giá mà…”, “Nếu như…”, “Phải chi …” . Cuộc sống là một cuộc thi mà mỗi thí sinh chỉ có một tờ giấy duy nhất để làm bài, không cho ai làm nháp. Nếu trong tự điển cuộc sống mà có được lệnh Undo thì cụ Nguyễn Du lấy đâu ra chỗ để viết “Đoạn trường tân thanh”?. Cụ Nguyễn Trãi lấy đâu ra chỗ để ngậm ngùi “Anh hùng di hận kỷ thiên niên ”?

Trong tình yêu nam nữ, nếu như có lệnh undo thì xưa nay đã không có biết bao nhiêu giọt nước mắt đã nhỏ xuống, ngậm ngùi và cay đắng. Trong tiếng Anh có một câu mà ý nghĩa rất khó dịch chính xác sang tiếng Việt, đó là “Undo my love”. Undo cuộc tình tôi! Đại khái theo nghĩa đen, ta có thể tạm hiểu “Undo my love” là xóa bỏ tình yêu của tôi đối với một đối tượng nào đó, hay đừng yêu tôi nữa, hoặc xóa bỏ những ngộ nhận để làm lại từ đầu, hoặc “rủ bỏ tình yêu” vân vân…

Nhưng hiểu theo thuật ngữ máy tính -tôi xin nhấn mạnh điểm này- thì “Undo my love” có nghĩa là hãy trả tình yêu của tôi trở lại trạng thái ban đầu như khi tôi chưa yêu bạn, như khi bạn chưa yêu tôi, như lúc chúng ta chưa hề quen nhau. Hãy làm sao cho chúng ta không còn một vết xướt nào trong tâm hồn của nhau, không còn một kỷ niệm nào cho nhau nữa, dầu rất mơ hồ. Nhưng thử hỏi làm sao xóa được những dòng chữ tỏ tình trên tờ giấy còn thơm mùi mực? Làm sao xóa được những nụ hôn trên đôi môi vụng dại? Làm sao trả lại những cái cầm tay run rẩy khi lần đầu nói tiếng yêu thương?

Tôi đã vô cùng lúng túng khi muốn tìm ý nghĩa của câu này trong một câu tiếng Việt tương đương. Chỉ đến khi nghe đọc một bài ca dao xứ Quảng Nam, tôi chợt cảm nhận ra ý nghĩa của “undo my love” , và ngẩn cả người, vì không hiểu sao ca dao Việt Nam lại tuyệt vời đến vậy!

Trong quá trình viết văn, mỗi khi phân vân với ý nghĩa của một câu chữ, thậm chí chỉ một chữ, tôi ít khi tra cứu trong tự điển, mà thường tìm ngay trong kho tàng ca dao tục ngữ. Với tôi, đó mới thực sự là một cuốn tự điển vô giá, vì các tác giả vô danh của nó đã sống trọn vẹn với tiếng Việt bằng cả tâm hồn, bằng cả sự vui buồn, chứ không phải bằng thứ kiến thức ngữ học hàn lâm- một thứ kiến thức phù phiếm, xa lạ hiện đang tàn phá tan hoang phần hồn tiếng Việt. Ca dao không phải để đọc theo kiểu nghiên cứu, mà để ngâm lên với cả tâm tình. Tôi tin rằng những người dân quê cảm nhận được phần hồn ca dao sâu gấp vạn ngàn lần những nhà nghiên cứu hay các giáo sư đại học, vì họ đã sống trọn vẹn với hồn thơ.

Bài ca dao giúp tôi liên tưởng đến câu “Undo my love” đó gồm 8 câu như vầy :

Ba với ba là sáu
Sáu với bảy mười ba
Bạn nói với ta không thiệt, không thà
Như cây đủng đỉnh trên già dưới non
Khi xưa bạn nói với ta chưa vợ chưa con
Bây giờ ai đứng đầu non đó bạn tề?
Bạn nói với ta bạn chưa có hiền thê
Bây chừ hiền thê mô đứng đó, bạn trả lời thề lại cho ta.

Cây đủng đỉnh là loại cây gì thì tôi chưa hề được biết, nhưng ta có thể hình dung người con gái đọc câu thơ đó bằng cả sự nhẫn nhục, ngậm ngùi của người con gái chân quê hiền lành xứ Quảng. Biết bao nhiêu ngậm ngùi trong câu nói “trả lời thề lại cho ta”. Làm sao mà trả lại được lời thề? Làm sao mà trả lại được bao nhiêu kỷ niệm đã thành tượng giữa thời gian? Làm sao có thể khiến tình yêu như lưỡi gươm chém vào hư không và không để lại dấu vết? Trả lời thề lại cho ta! Ngậm ngùi nhưng không hờn oán, trách móc nhưng không cay nghiệt, thiết tha nhưng không bi lụy, đau đớn mà vẫn đằm thắm yêu thương.

Tôi tình cờ đọc trên mạng một đoạn văn của J.Tarin Towers, trong bài Things to undo (Những điều cần xóa bỏ, http://www.fray.com/drugs/love/tarin.html). J.Tarin Towers là tác giả của những cuốn sách chuyên về máy tính. Cô từng làm việc cho các hãng Netscape Communications, Microsoft, Informix Software, và Infoseek, nhưng đồng thời lại là tác giả của nhiều bài thơ và bài tiểu luận rất thú vị. Có lẽ vì là dân máy tính nên chữ undo trong câu văn của cô lại có một ý nghĩa đặc biệt : “We can undo words with kisses, but we cannot undo kisses with words” (Chúng ta có thể xóa bỏ bao lời nói bằng những nụ hôn, nhưng không thể xóa bỏ các nụ hôn bằng những lời nói được).

Chúng ta có thể xóa bỏ những lời nói sai lầm hay những lời nói xúc phạm bằng những nụ hôn để tạ lỗi, nhưng làm sao có thể dùng những lời tạ lỗi để xóa bỏ được những nụ hôn? Làm sao có thể trả lại lời thề?

Khi đọc đoạn văn trên và bài ca dao đó, thì tôi thấy câu văn dịch cho “undo my love” đã hiện ngay ra đấy : “Trả lời thề lại cho ta”. Vâng, hãy “trả lại lời thề”, hãy “undo my love” !

Xin cám ơn bài ca dao tuyệt vời xứ Quảng và cám ơn J.Tarin Towers!

Theo http://damau.org/archives/12808
Xin cám ơn tác giả Huỳnh Ngọc Chiến

Thursday, July 1, 2010

Listen to me

Listen to me, my friend

Knowing both victory and defeat, running around and shedding tears, that's the way you become a real man.

It's alright to cry...!!
OVERCOME THIS!!

And Let's try
:>)