Tag Archives: Linux

Goobuntu

传说中的google的操作系统?真的是ubuntu吗?不太相信。可似乎的确如此。。。
 
goobuntulogo2.jpg
 
虽然 Google 严正否认,不过关于这款挑战 Windows 操作系统,以新操作系统搭载的 Google PC 谣言仍甚嚣尘上。现在我们终于知道这个秘密操作系统的名称:Goobuntu。根据引文来源,Google 已经发展出以 Ubuntu Linux 为基础的操作系统以及 Gnome 桌上型计算机,而且已经到准备推出的阶段。
 
当然,Goobuntu 真的如官方所说的仅是 Google 公司内部使用而已,Google 之前早已承认他们有发展出专为内部服务器使用的作的业系统。然而,谁知道 Google 真没有野心侵略整个个人计算机的霸权。希望这个操作系统至少可执行  Google Earth 和 Picasa 两套软件。
 
根据另一个引述来源,Google 发言人 Sonya Borälv 提到「公司内部使用 Ubuntu,不过我们没有任何将这套软件向外延伸的计划。 」看来 Google 公司的传统除了不断创新以外,就是不断粉碎大家的梦想和希望。

chkrootkit

这个程序是设计用来检查许多广为人知的rootkit 的
安装
 
#apt-get install chkrootkit
 
运行
[root@jd chkrootkit-0.34]# chkrootkit
ROOTDIR is `/’
Checking `amd’… not found
Checking `basename’… not infected
Checking `biff’… not found
Checking `chfn’… not infected
Checking `chsh’… not infected
Checking `cron’… not infected
Checking `date’… not infected
Checking `du’… not infected
Checking `dirname’… not infected
Checking `echo’… not infected
Checking `egrep’… not infected
Checking `env’… not infected
Checking `find’… not infected
[…]

用日志系统保护Linux安全

Linux系统中的日志子系统对于系统安全来说非常重要,它记录了系统每天发生的各种各样的事情,包括那些用户曾经或者正在使用系统,可以通过日志来检查错误发生的原因,更重要的是在系统受到黑客攻击后,日志可  
以记录下攻击者留下的痕迹,通过查看这些痕迹,系统管理员可以发现黑客攻击的某些手段以及特点,从而能够进行处理工作,为抵御下一次攻击做好准备。
 
在Linux系统中,有三类主要的日志子系统:
 
● 连接时间日志: 由多个程序执行,把记录写入到/var/log/wtmp和/var/run/utmp,login等程序会更新wtmp和utmp文件,使系统管理员能够跟踪谁在何时登录到系统。
 
● 进程统计: 由系统内核执行,当一个进程终止时,为每个进程往进程统计文件(pacct或acct)中写一个记录。进程统计的目的是为系统中的基本服务提供命令使用统计。
 
● 错误日志: 由syslogd(8)守护程序执行,各种系统守护进程、用户程序和内核通过syslogd(3)守护程序向文件/var/log/messages报告值得注意的事件。另外有许多Unix程序创建日志。像HTTP和FTP这样提供网络服务的服务器也保持详细的日志。
 
Linux下日志的使用
 
1.基本日志命令的使用
 
utmp、wtmp日志文件是多数Linux日志子系统的关键,它保存了用户登录进入和退出的记录。有关当前登录用户的信息记录在文件utmp中; 登录进入和退出记录在文件wtmp中; 数据交换、关机以及重启的机器信息也都记录在wtmp文件中。所有的记录都包含时间戳。时间戳对于日志来说非常重要,因为很多攻击行为分析都是与时间有极大关系的。这些文件在具有大量用户的系统中增长十分迅速。例如wtmp文件可以无限增长,除非定期截取。许多系统以一天或者一周为单位把wtmp配置成循环使用。它通常由cron运行的脚本来修改,这些脚本重新命名并循环使用wtmp文件。
 
utmp文件被各种命令文件使用,包括who、w、users和finger。而wtmp文件被程序last和ac使用。 但它们都是二进制文件,不能被诸如tail命令剪贴或合并(使用cat命令)。用户需要使用who、w、users、last和ac来使用这两个文件包含的信息。具体用法如下:
 
who命令: who命令查询utmp文件并报告当前登录的每个用户。Who的缺省输出包括用户名、终端类型、登录日期及远程主机。使用该命令,系统管理员可以查看当前系统存在哪些不法用户,从而对其进行审计和处理。例如: 运行who命令显示如下:
 
[root@working]# who
 
root pts/0 May 9 21:11 (10.0.2.128)
 
root pts/1 May 9 21:16 (10.0.2.129)
 
lhwen pts/7 May 9 22:03 (10.0.2.27)
 
如果指明了wtmp文件名,则who命令查询所有以前的记录。例如命令who /var/log/wtmp将报告自从wtmp文件创建或删改以来的每一次登录。
 
日志使用注意事项
 
系统管理人员应该提高警惕,随时注意各种可疑状况,并且按时和随机地检查各种系统日志文件,包括一般信息日志、网络连接日志、文件传输日志以及用户登录日志等。在检查这些日志时,要注意是否有不合常理的时间记载。例如:
 
■ 用户在非常规的时间登录;
 
■ 不正常的日志记录,比如日志的残缺不全或者是诸如wtmp这样的日志文件无故地缺少了中间的记录文件;
 
■ 用户登录系统的IP地址和以往的不一样;
 
■ 用户登录失败的日志记录,尤其是那些一再连续尝试进入失败的日志记录;
 
■ 非法使用或不正当使用超级用户权限su的指令;
 
■ 无故或者非法重新启动各项网络服务的记录。
 
另外, 尤其提醒管理人员注意的是: 日志并不是完全可靠的。高明的黑客在入侵系统后,经常会打扫现场。所以需要综合运用以上的系统命令,全面、综合地进行审查和检测,切忌断章取义,否则很难发现入侵或者做出错误的判断。
 
users命令: users用单独的一行打印出当前登录的用户,每个显示的用户名对应一个登录会话。如果一个用户有不止一个登录会话,那他的用户名将显示相同的次数。运行该命令将如下所示:
 
[root@working]# users
 
root root //只登录了一个Root权限的用户
 
last命令: last命令往回搜索wtmp来显示自从文件第一次创建以来登录过的用户。系统管理员可以周期性地对这些用户的登录情况进行审计和考核,从而发现其中存在的问题,确定不法用户,并进行处理。运行该命令,如下所示:
 
[root@working]# last
 
devin pts/1 10.0.2.221 Mon Jul 21 15:08-down (8+17:46)
 
devin pts/1 10.0.2.221 Mon Jul 21 14:42 – 14:53 (00:11)
 
changyi pts/2 10.0.2.141 Mon Jul 21 14:12 – 14:12 (00:00)
 
devin pts/1 10.0.2.221 Mon Jul 21 12:51 – 14:40 (01:49)
 
reboot system boot 2.4.18 Fri Jul 18 15:42 (11+17:13)
 
reboot system boot 2.4.18 Fri Jul 18 15:34 (00:04)
 
reboot system boot 2.4.18 Fri Jul 18 15:02 (00:36)
 
读者可以看到,使用上述命令显示的信息太多,区分度很小。所以,可以通过指明用户来显示其登录信息即可。例如: 使用last devin来显示devin的历史登录信息,则如下所示:
 
[root@working]# last devin
 
devin pts/1 10.0.2.221 Mon Jul 21 15:08 – down (8+17:46)
 
devin pts/1 10.0.2.221 Mon Jul 21 14:42 – 14:53 (00:11)
 
ac命令:ac命令根据当前的/var/log/wtmp文件中的登录进入和退出来报告用户连接的时间(小时),如果不使用标志,则报告总的时间。另外,可以加一些参数,例如,last -t 7表示显示上一周的报告。
 
lastlog命令 lastlog文件在每次有用户登录时被查询。可以使用lastlog命令检查某特定用户上次登录的时间,并格式化输出上次登录日志/var/log/lastlog的内容。它根据UID排序显示登录名、端口号(tty)和上次登录时间。如果一个用户从未登录过,lastlog显示“**Never logged**”。注意需要以root身份运行该命令。运行该命令如下所示:
 
[root@working]# lastlog
 
Username Port From Latest
 
root pts/1 10.0.2.129 二 5月 10 10:13:26 +0800 2005
 
opal pts/1 10.0.2.129 二 5月 10 10:13:26 +0800 2005
 
2.使用Syslog设备
 
Syslog已被许多日志函数采纳,被用在许多保护措施中,任何程序都可以通过syslog 记录事件。Syslog可以记录系统事件,可以写到一个文件或设备中,或给用户发送一个信息。它能记录本地事件或通过网络记录另一个主机上的事件。
 
Syslog设备核心包括一个守护进程(/etc/syslogd守护进程)和一个配置文件(/etc/syslog.conf配置文件)。通常情况下,多数syslog信息被写到/var/adm或/var/log目录下的信息文件中(messages.*)。一个典型的syslog记录包括生成程序的名字和一个文本信息。它还包括一个设备和一个优先级范围。
 
系统管理员通过使用syslog.conf文件,可以对生成的日志的位置及其相关信息进行灵活配置,满足应用的需要。例如,如果想把所有邮件消息记录到一个文件中,则做如下操作:
 
#Log all the mail messages in one place
 
mail.* /var/log/maillog
 
其他设备也有自己的日志。UUCP和news设备能产生许多外部消息。它把这些消息存到自己的日志(/var/log/spooler)中并把级别限为"err"或更高。例如:
 
# Save news errors of level crit and higher in a special file.
 
uucp,news.crit /var/log/spooler
 
当一个紧急消息到来时,可能想让所有的用户都得到。也可能想让自己的日志接收并保存。
 
#Everybody gets emergency messages, plus log them on anther machine
 
*.emerg *
 
*.emerg @linuxaid.com.cn
 
用户可以在一行中指明所有的设备。下面的例子把info或更高级别的消息送到/var/log/messages,除了mail以外。级别"none"禁止一个设备:
 
#Log anything(except mail)of level info or higher
 
#Don’t log private authentication messages!
 
*.info:mail.none;autHPriv.none /var/log/messages
 
在有些情况下,可以把日志送到打印机,这样网络入侵者怎么修改日志都不能清除入侵的痕迹。因此,syslog设备是一个攻击者的显著目标,破坏了它将会使用户很难发现入侵以及入侵的痕迹,因此要特别注意保护其守护进程以及配置文件。
 
3.程序日志的使用
 
许多程序通过维护日志来反映系统的安全状态。su命令允许用户获得另一个用户的权限,所以它的安全很重要,它的文件为sulog,同样的还有sudolog。另外,诸如Apache等Http的服务器都有两个日志: access_log(客户端访问日志)以及error_log(服务出错日志)。 FTP服务的日志记录在xferlog文件当中,Linux下邮件传送服务(sendmail)的日志一般存放在maillog文件当中。
 
程序日志的创建和使用在很大程度上依赖于用户的良好编程习惯。对于一个优秀的程序员来说,任何与系统安全或者网络安全相关的程序的编写,都应该包含日志功能,这样不但便于程序的调试和纠错,而且更重要的是能够给程序的使用方提供日志的分析功能,从而使系统管理员能够较好地掌握程序乃至系统的运行状况和用户的行为,及时采取行动,排除和阻断意外以及恶意的入侵行为。
 
 

ubuntu居然是google的?

看到这么一条新闻,吃惊阿
 
Google is preparing its own distribution of Linux for the desktop, in a possible bid to take on Microsoft in its core business – desktop software.
 
A version of the increasingly popular Ubuntu desktop Linux distribution, based on Debian and the Gnome desktop, it is known internally as ‘Goobuntu’.
 
Google has confirmed it is working on a desktop linux project called Goobuntu, but declined to supply further details, including what the project is for.
 
It’s possible that it’s just one of the toys Googleplex engineers play with on Fridays, when they get time off from buffing the search engine code or filtering out entries about Tiananmen Square.
 
It could be for wider deployments on the company’s own desktops, as an alternative to Microsoft, but still for internal use only.
 
But it’s possible Google plans to distribute it to the general public, as a free alternative to Windows.
 
Google has already demonstrated an interest in building a presence on the desktop. At CES Las Vegas this month, it announced the Google Pack, a collection of desktop software bundled together for easy downloading.
 
The pack includes many apps which compete directly with the Windows bundle, such as Google Talk, Google Desktop, Mozilla Firefox, the Trillian instant messenger client, RealPlayer, and Picasa photo management.
 
Going the whole hog and distributing a complete desktop software suite would merely be another step down the same path.
 
However, entering the desktop software world would be a huge step. Making Goobuntu as easy to use as XP will require a lot more development. It’s unlikely to be ready for showtime any time soon, and it’s possible Google itself hasn’t finalised where the project should go.
 
Whatever Google’s intentions, the input of Google engineers and developers, writing new features and fixing bugs, will be a huge boost to the Ubuntu project.
 
Ubuntu, funded by the South African internet multimillionaire and occasional cosmonaut Mark Shuttleworth, is already emerging as a leader in the desktop Linux world.
 
It has built considerable momentum in the Linux community, and is starting to appear more widely. Shuttleworth is seeking to persuade white-box PC manufacturers to start shipping machines with Ubuntu preinstalled.
 
It is top of the Distrowatch download chart, is installed on up to six million computers, and doubling every eight months, according to estimates from Shuttleworth’s company, Canonical.
 
It has spawned a number of different offshoots, including Xubuntu, Kubuntu and Edubuntu (for schools).
 
The word Ubuntu means "humanity to others" in several African languages, including Zulu and Xhosa. It’s one of the founding principles of post-apartheid South Africa. The origin of the word ‘Goobuntu’ is not clear, though it does not appear in online Zulu dictionaries.
 
The Goobuntu.com domain has been registered in the past couple of days, though presumably not by Google. It now redirects to a Cuban portal. Perhaps Google will have to think of a new name for the system before they launch it to the wider public. ®