Thứ Hai, 6 tháng 7, 2015

How to Install uTorrent Client on Ubuntu/Debian

Install uTorrent Server 3.3

Step 1: Download latest uTorrent Server from here

Note: (You need to download uTorrent Server for 13.04, also works for Ubuntu 14.04)

Step 2: Extract uTorrent Files

    Launch terminal and change directory to Downloads folder

    cd Downloads/

    Extract uTorrent files to the /opt directory

    sudo tar xvzf utserver.tar.gz -C /opt/

Step 3: Set Permission

    Set permission on uTorrent-server folder

    sudo chmod -R 777 /opt/utorrent-server-alpha-v3_3/

Step 4: Set Symbolic link

    Run the command to link uTorrent server to the /user/bin directory.

    sudo ln -s /opt/utorrent-server-alpha-v3_3/utserver /usr/bin/utserver

Step 5: Start uTorrent

utserver -settingspath /opt/utorrent-server-alpha-v3_3/

Note: If you get an error about libssl.so package missing, run the command below to install it, then try starting it again.

sudo apt-get install libssl0.9.8:i386

Step 6: Log into uTorrent

    Open Firefox and browse to the URL

    localhost:8080/gui

    The username is admin and leave the password field empty


Read More

Thứ Năm, 2 tháng 7, 2015

[FIXED] Sửa lỗi gõ tiếng Việt ibus-unikey trên Skype Kali Linux

[FIXED] Sửa lỗi gõ tiếng Việt ibus-unikey trên Skype Kali Linux

Đầu tiên chúng ta cần cài gói ibus-qt4 vì Skype sử dụng Qt để phát triển giao diện.
sudo apt-get install ibus-qt4

Tiếp theo chúng cần chỉnh sửa một số cấu hình cho ibus để ibus có thể load được ibus-qt4 lên. Tệp tin chúng ta cần chỉnh sửa là /etc/X11/xinit/xinput.d/ibus (ở các phiên bản cũ là /etc/X11/xinit/xinput.d/default), thay “=xim” bằng “=ibus”DEPENDS=”ibus, ibus-gtk | ibus-qt4 | ibus-clutter” bằng DEPENDS=”ibus, ibus-gtk, ibus-qt4, ibus-clutter”. Nếu không chắc chắn bạn có thể copy và thay thế toàn bộ với nội dung dưới đây.

Lưu ý: bạn nên sao lưu lại một bản đề phòng trước khi thực hiện thay đổi.
# start IBus
# vim: set sts=4 expandtab:

# start IBus daemon
#/usr/bin/ibus-daemon --daemonize --xim
XIM=ibus
XIM_PROGRAM=/usr/bin/ibus-daemon
XIM_ARGS="--xim"

# set variables for the plain XIM
XMODIFIERS=@im=ibus

GTK_IM_MODULE=ibus
# use immodule only when available for both GTK 2.0 and 3.0
IM_CONFIG_MARKER2=0
for IM_CONFIG_MARKER in /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so \
                        /usr/lib/gtk-2.0/*/immodules/im-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        IM_CONFIG_MARKER2=1
        break
    fi
done

IM_CONFIG_MARKER3=0
for IM_CONFIG_MARKER in /usr/lib/*/gtk-3.0/*/immodules/im-ibus.so \
                        /usr/lib/gtk-3.0/*/immodules/im-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        IM_CONFIG_MARKER3=1
        break
    fi
done
if [ $IM_CONFIG_MARKER2 = 1 ] && [ $IM_CONFIG_MARKER3 = 1 ] ; then
    GTK_IM_MODULE=ibus
fi

QT_IM_MODULE=ibus
# use immodule when available for Qt4 (Qt3 has been long dead)
for IM_CONFIG_MARKER in /usr/lib/*/qt4/plugins/inputmethods/libqtim-ibus.so\
                        /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        QT_IM_MODULE=ibus
        break
    fi
done

CLUTTER_IM_MODULE=ibus
# use immodule when available for clutter
for IM_CONFIG_MARKER in /usr/lib/*/clutter-imcontext/immodules/im-ibus.so \
                        /usr/lib/clutter-imcontext/immodules/im-ibus.so; do
    if [ -e $IM_CONFIG_MARKER ]; then
        CLUTTER_IM_MODULE=ibus
        break
    fi
done

DEPENDS="ibus, ibus-gtk, ibus-qt4, ibus-clutter"
Sau đó Đăng xuất Kali Linux và Đăng nhập trở lại là bạn có thể gõ Tiếng Việt trên Skype.
Read More

Fix lỗi Software-center trên Kali-Linux

Fix lỗi Software-center trên Kali-Linux
Đối với Kali-linux version mới nhất sau khi cài đặt Software-Center các bạn sẽ gặp phải lỗi Software-center không chạy hoặc chạy vài giây thì tắt.
Nếu như chạy Software-center từ terminal thì gặp thông báo lỗi sau:

Mã:
Traceback (most recent call last):
  File "/usr/bin/software-center", line 131, in <module>
    from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 49, in <module>
    from softwarecenter.db.application import Application
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    from softwarecenter.backend.channel import is_channel_available
  File "/usr/share/software-center/softwarecenter/backend/channel.py", line 25, in <module>
    from softwarecenter.distro import get_distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 179, in <module>
    distro_instance=_get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 162, in _get_distro
    module =  __import__(distro_id, globals(), locals(), [], -1)
ImportError: No module named Kali

Hướng dẫn Fix

Mở tập tin __init__.py sử dụng vim hoặc gedit:


Mã:
gedit /usr/share/software-center/softwarecenter/distro/__init__.py

Tại dòng 159 sửa:

Mã:
distro_id = lsb_info["ID"]

Thành

Mã:
distro_id = "Debian"
 Save file và mở terminal chạy lệnh:
update-software-center

Giờ bạn đã có thể sử dụng Software-center bình thường trên Kali-Linux
Read More

Thứ Tư, 1 tháng 7, 2015

Những việc cần làm sau khi cài đặt kali linux-Things to do after installing Kali Linux

Những việc cần làm sau khi cài đặt kali linux-Things to do after installing Kali Linux

Kali linux là hệ điều hành chứa những bộ công cụ cực kì hữu dụng cho việc penetration testing, nhiều bạn mới làm quen với backtrack/kali cảm thấy bỡ ngỡ và mong muốn làm sao để nó có thể trở thành một hệ điều hành chính có thể thay thế windows để tiện cho việc học tập giải trí và nghiên cứu hacking, dưới đây mình tổng hợp một số phần mềm cần thiết và cách cài sau khi cài đặt kali, hi vọng sẽ giúp ích cho các bạn.






Mình liệt kê 20 điều mà mình thấy cần thiết giúp các bạn có thể sử dụng kali như một OS bình thường với đầy đủ các tiện ích học tập, giải trí.



  1. Chỉnh sửa sources.list
  2. Install Software center
  3. Install Mozilla firefox
  4. Install Adobe Flash Player
  5. Install Virtual Box
  6. Install Skype
  7. Install Teamviewer
  8. Install ibus-unikey(bộ gõ Tiếng Việt)
  9. Add and remove standard user(non-root)
  10. Setup and configure vpn in kali linux
  11. Install AptonCD - Create a backup of all the packages you have installed using apt-get
  12. Fix Database not connected or cache not built, using slow search" error in Metasploit
  13. Install java JDK 7
  14. Install Jdownloader
  15. How to hide show/hide all desktop icons on kali linux
  16. How to auto hide bottom panel
  17. Install pinta images editor(Trình chỉnh sửa ảnh nhỏ gọn như pain trong windows)
  18. Install and run Google Chrome as root user
  19. Installer for Microsoft TrueType core fonts(Add Aria, Times New Roman, Verdana,...etc font)
  20. Install sopcast player (Phần mềm không thể thiếu dành cho các bạn yêu bóng đá)
  21. Install & Run Nessus Vulnerability Scanner

1. Chỉnh sửa sources.list
Sau khi cài đặt kali, một điều làm mọi người phiền lòng là tốc độ mà nó update dữ liệu từ máy chủ quá chậm, để khắc phục điều này, các bạn mở sources.list bằng lệnh
Mã:
leafpad /etc/apt/sources.list
Tiếp theo các bạn thay thế nội dung trong đó bằng đoạn text sau:
Mã:
## Kali Regular repositories
deb http://repo.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://repo.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Nếu bạn không thấy sự cải thiện thì có thể dùng đoạn text sau để thay thế, nó sẽ sửa server update sang Anh, bình thường server update là của tung của rất hay bị mất kết nối :(
Mã:
## Kali Regular repositories
deb http://ftp.hands.com/kali kali main non-free contrib
deb http://ftp.hands.com/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://ftp.hands.com/kali kali main non-free contrib
deb-src http://ftp.hands.com/kali-security kali/updates main contrib non-free

Để thay thế nhiều server khác nhau, vui lòng đọc bài viết này
http://www.blackmoreops.com/2013/11/14/c...nt-mirror/

Sau khi update và upgrade xong, các bạn thay thế nội dung trong file soures.list lại bằng sources mặc định sau:
Mã:
## Kali Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Lí do là vì sources mặc định này sẽ cập nhật các bản/công cụ từ nhà sản xuất sớm hơn so với các server khác, ví dụ chẳng hạn như server mặc định này có bản vá lỗi của metaploit flamework trong khi các server khác thì chưa có.

2. Install Software center
Mã:
apt-get update
apt-get upgrade
apt-get install software-center

3. Install Mozilla firefox
Mã:
apt-get remove iceweasel
echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
apt-get update
apt-get install firefox-mozilla-build

4. Install Adobe Flash Player
4.1 Download Adobe Flash Player at http://get.adobe.com/flashplayer/
4.2 Type the command lines follow:
Mã:
cd /root/Downloads/
continue...
tar xzvf [file name of Adobe Flash Player], example:
Mã:
tar xzvf install_flash_player_11_linux.i386.tar.gz
Mã:
cp libflashplayer.so /usr/lib/mozilla/plugins/

5. Install Virtual Box
5.1 Download Virtual Box at https://www.virtualbox.org/wiki/Linux_Downloads
5.2 Type the command lines follow:
Mã:
apt-get update && apt-get install -y linux-headers-$(uname -r)
cd /root/Downloads/

dpkg -i [file name Virtual Box], example:
Mã:
dpkg -i virtualbox-4.3_4.3.12-93733~Debian~wheezy_i386.deb

6. Install Skype
6.1 Download skype at http://www.skype.com/en/download-skype/s...-computer/
6.2 Type the command lines follow:
Mã:
cd /root/Downloads/
dpkg -i [file name of Skype], example:
Mã:
dpkg -i skype-debian_4.2.0.13-1_i386.deb

7. Install Teamviewer
7.1 Download Teamviewer at http://download.teamviewer.com/download
7.2 Type the command lines follow:
Mã:
cd /root/Downloads/
dpkg -i [file name of Teamviewer], example:
Mã:
dpkg -i teamviewer_linux.deb

8. Install ibus-unikey(bộ gõ Tiếng Việt)
Mã:
apt-get install ibus im-switch
apt-get install ibus-unikey
#im-switch -s ibus
# logout and re-login
Mã:
ibus-setup # add input methods you want

9. Add and remove standard user(non-root)
Add:
Mã:
useradd -m user1 //replace user1 with your desired user name
(Note: -m means create home directory which is usually /home/username)

Now set password for this user:
Mã:
passwd user1

Add user to sudo group (to allow user to install software, allow printing, use privileged mode etc.) :
Mã:
usermod -a -G sudo user1
(Note: -a means append or add and –G mean to specified group/groups)

Change default shell of previously created user to bash :
Mã:
chsh -s /bin/bash user1
(Note: chsh mean change login shell, -s is the name of the specified shell you want for the user, in this case /bin/bash)

Nice, all worked out as expected.
Let’s logout and login back as our new Standard Non-root user (user1)

Login as new user:
Become root!:
Mã:
sudo su –

Delete user in Kali Linux:
Log in as root user again. Open your terminal and type:
Mã:
userdel –r user1
(Note: -r means delete all files and home directory for user1)
You can replace user1 with your desired user name.

I have an error “user1 is currently used by process 5866”.
Don't worry, fix it by terminal type:
Mã:
kill -9 5866

Now let’s try to delete the user again.
Mã:
userdel –r user1
We have a message. “userdel: user1 mail spool (/var/mail/user1) not found”

Just to confirm everything for user1 was deleted list files in home directory
Mã:
ls /home
Nothing.. that’s good news, all files and folders were deleted for user1.

Want to double-check?
Mã:
su user1

Perfect user1 was deleted successfully.

10. Setup and configure vpn in kali linux
Mã:
apt-get install network-manager-openvpn
apt-get install network-manager-openvpn-gnome
apt-get install network-manager-pptp
apt-get install network-manager-pptp-gnome
apt-get install network-manager-strongswan
apt-get install network-manager-vpnc
apt-get install network-manager-vpnc-gnome
/etc/init.d/network-manager restart

11. Install AptonCD - Create a backup of all the packages you have installed using apt-get
Mã:
apt-get install aptoncd

12. Fix Database not connected or cache not built, using slow search" error in Metasploit

Mã:
service postgresql start
OR
Mã:
#/etc/init.d/postgresql start
Mã:
service metasploit start
OR
Mã:
#/etc/init.d/metasploit start
Mã:
apt-get update
apt-get upgrade

One more thing... If you want postgreSQL and Metasploit services to auto start whenever you boot into Backtrack or Kali, you can issue the following commands on the root terminal:
Mã:
update-rc.d postgresql enable
update-rc.d metasploit enable

13. Install java JDK 7

13.1 Download the latest Java SE SDK version at http://www.oracle.com/
Các bạn lưu file download vào thư mục /root

13.2 UnTar the Archive and move to /opt
Mã:
tar -xzvf /root/jdk-7u45-linux-x64.tar.gz
mv jdk1.7.0_45 /opt
cd /opt/jdk1.7.0_45

14.3 Install and register binaries

Mã:
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_45/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_45/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_45/bin/java
update-alternatives --set javac /opt/jdk1.7.0_45/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so

13.4 Test
First of all, close your browser and re-open, access to http://www.java.com/en/download/installed.jsp
Mã:
java -version

Lưu ý bản java SE JDK mới nhất là bản 8, lệnh thì tương tự nhưng các bạn phải sửa một số đường dẫn đến các file sao cho phù hợp, các bạn tùy cơ ứng biến nhé :)

14. Install Jdownloader
14.1 Download jdownloader as http://jdownloader.org/
14.2 Install:
Mã:
chmod +x jd_unix_0_9.sh && ./jd_unix_0_9.sh

15.1 How to hide show/hide all desktop icons on kali linux
Open your terminal and type:
Mã:
gsettings set org.gnome.desktop.background show-desktop-icons false

15.2 How to auto hide bottom panel

Access to applications/System tools/deconf Editor/org/gnome/gnome-panel/layout/toplevels/bottom-panel, check auto hide

16. Install pinta images editor(Trình chỉnh sửa ảnh nhỏ gọn như pain trong windows)
Mã:
apt-get install pinta

Trên linux thì có trình chỉnh sửa ảnh GIMP, được ví như photoshop thứ 2, cài đặt bằng lệnh
Mã:
apt-get install gimp

17. Install and run Google Chrome as root user
17.1 Download Google Chrome at http://www.google.com.vn/intl/vi/chrome/browser/
17.2 Install by the command lines:
Mã:
cd /root/Downloads/
dpkg -i [file name of Chrome], example:
Mã:
dpkg -i google-chrome-stable_current_i386.deb
17.3 Run Chrome as root user
Mã:
leafpad /opt/google/chrome/google-chrome
Find a line:
Mã:
exec -a "$0" "$HERE/chrome"  "$@"
Replace it to
Mã:
exec -a "$0" "$HERE/chrome"  "$@" --user-data-dir ”/root/.config/google-chrome”

Enjoy! Now open google chrome from Application>>Internet>>Google Chrome

18. Installer for Microsoft TrueType core fonts(Add Aria, Times New Roman, Verdana,...etc font)
Mã:
apt-get install ttf-mscorefonts-installer

19. Install sopcast player (Phần mềm không thể thiếu dành cho các bạn yêu bóng đá)
Đầu tiên các bạn tải sp-auth tại đây
Tiếp theo cài đặt nó bằng lệnh
Mã:
cd /root/Downloads/
dpkg -i sp-auth_3.2.6~ppa1~precise3_i386.deb
apt-get -f install
Tiếp theo các bạn tải về sopcast 0.8.5 tại đây
Cài đặt nó bằng lệnh
Mã:
dpkg -i sopcast-player_0.8.5~ppa~precise1_i386.deb
apt-get -f install

Ok, vậy là công việc cài đặt đã hoàn tất, giờ bạn chỉ việc khởi động nó ở Applications => Sound & Videos =>Sopcast Player là đã có thể thưởng thức bóng đá và các chương trình tv, thể thao khác,v..v...
Lưu ý là link sopcast các bạn phải tự add bằng tay chứ nó không tự động chạy như trong windows đâu.

20. Install & Run Nessus Vulnerability Scanner

20.1 Download Nessus is here http://www.tenable.com/products/nessus/s...ing-system, bản mới nhất là 5.2.7
20.2 Cài đặt nó:
Mã:
cd /root/Downloads/
dpkg -i "deb packet name", example:
Mã:
dpkg -i Nessus-5.2.7-debian6_i386.deb
Vậy là việc cài đặt nessus vào máy đã thành công.
20.3 Khởi chạy:
Mã:
/etc/init.d/nessusd start
-Tiếp theo các bạn mở trình duyệt web và truy cập đến địa chỉ https://host name:8834, nếu trong quá trình cài đặt kali bạn không thay đổi thì nó là https://kali:8834
-Nhấn tiếp tục nếu xuất hiện cảnh báoAngel
-Chọn Tiếp Get started
-Nhập vào mật khẩu và tài khoản đăng nhập nessus, chọn next
-Ở bước này, nessus sẽ yêu cầu bạn nhập activation code, bạn truy cập vào đây, chọn bản nessus home, điền email để nhận code
-Sau khi điền code, Tiếp tục chọn Next==>Download Plugins, chờ một lát(cũng khá lâu Big Grin ) để nó download và initializing các plugins cần thiết.
-Tiếp theo, màn hình đăng nhập của nessus xuất hiện, bạn nhập tài khoản và mật khẩu để đăng nhập
ok, susscess!
Read More