Oct 29
I spent a couple of hours tonight reversing the vulnerable code responsible for the MS08-067 vulnerability. This bug is pretty interesting, because it is in the same area of code as the MS06-040 buffer overflow, but it was completely missed by all security researchers and Microsoft. It’s quite embarassing.
Here’s the code of the vulnerable function on Windows XP SP3 and Vista SP1:
#include <wchar.h>
// This is the decompiled function sub_5B86A51B in netapi32.dll on XP SP3
// and sub_6EA11D4D on Vista SP1
int ms08_067(wchar_t* path)
{
wchar_t* p;
wchar_t* q;
wchar_t* previous_slash = NULL;
wchar_t* current_slash = NULL;
wchar_t ch;
Read the rest of this entry »
Oct 06
1. 是否要写注释
写注释能让你更好的思考程序在干什么,但是糟糕的注释适得其反。
2. 如何高效的注释
应该通过书写具有意义的变量名,子程序名来避免过多的注释。注释不是重复描述代码,而是对代码的补充说明。
3. 不要注释糟糕的代码,应该重写之。
4. 文件头部的注释应该起到概述的作用,说明文件的内容和实现的主要功能。
5. 对于具体环境和值得注意的地方应该注释,这将为今后问题的解决带来极大的好处。
Sep 24
感觉还不错。真正实现了完全用linux 工作。
其实除了娱乐比较费劲外,ubuntu 真的是挺不错的。还在徘徊的同学大可一试。
windows 变化实在是快,跟不上了。呵呵 :)
Sep 02

应该算是今年大片了。感觉不如以前的好看,不知道是不是审美疲劳了。场面是够大,却少了以前的惊险和刺激,说的是中国的故事也就失去了新鲜感,推荐指数 3 星 :)
不过有趣的是吴京在这片里跑了龙套,一下就被李连杰杀死了。错开了奥运,也是电影上市的一个策略吧。
Sep 01
看资料是因为solaris 10 默认限制了root ssh 远程登录
/etc/ssh/sshd_config的两个参数
PermitRootLogin yes
PasswordAuthentication yes
不过还有另外一种方法,一般在/etc/default/login文件中
有 “CONSOLE=/dev/console”
一行,则表明root不能直接登陆,只需注释掉该行,即可以直接登陆。
Sep 01
当系统在引导菜单的 10 秒倒计时时进入它, 选项, 其编号 4。
1.进入单用户模式
# boot -s
# /sbin/mount -a
然后用passwd 修改密码就OK了
2.如果对console和ttyv都设置是安全限制
单用户进不去有没CD~
前提必须得有台BSD
把忘记密码的硬盘挂到了有root权限的系统上。
先检查文件系统
#fsck -y /dev/ad2s1
挂载到一个目录上
#mount /dev/ad2s1 /mnt
用chroot创建个环境
#chroot /mnt
然后进里面挂载丢失root密码的usr目录
#fsck -y /dev/ad2s1f
#mount /dev/ad2s1f /mnt
设置密码
#/usr/sbin/passwd root
搞定
Recent Comments