-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.json
1 lines (1 loc) · 33.1 KB
/
content.json
1
{"meta":{"title":"Pancheng'Blog","subtitle":null,"description":null,"author":"Pan Cheng","url":"http://yoursite.com"},"pages":[{"title":"tags","date":"2017-03-23T06:39:45.000Z","updated":"2017-03-23T06:46:37.560Z","comments":false,"path":"tags/index.html","permalink":"http://yoursite.com/tags/index.html","excerpt":"","text":""}],"posts":[{"title":"","slug":"沙箱在线分析","date":"2017-03-31T00:54:58.417Z","updated":"2017-03-31T01:34:05.584Z","comments":true,"path":"2017/03/31/沙箱在线分析/","link":"","permalink":"http://yoursite.com/2017/03/31/沙箱在线分析/","excerpt":"","text":"title: 沙箱在线分析date: 2017/3/24 9:18:17tags: 动态分析 静态分析有点难和费力,因此还是需要结合一些沙箱分析来提高分析效率,简要记录一下一些在线沙箱的网址 #国内的 # 腾讯的哈勃分析系统https://habo.qq.com/ 蛮好用的,但是部分敏感信息会打星号,此时还要结合一下手动分析。 火眼https://fireeye.ijinshan.com/ 金山的一个产品,感觉没有哈勃强大,更新也不够快,但是不打码。 国外的 Malwrhttps://malwr.com 在线分析的,功能蛮强大的,会有沙箱运行软件的截图。不用fq。 comodohttp://camas.comodo.com/ 可以查壳 threatexperthttp://www.threatexpert.com/submit.aspx cuckoo 需要自己搭建环境,搭建过程可以自行百度http://blog.csdn.net/ab455373162/article/details/52208954","categories":[],"tags":[]},{"title":"android学习5_部分高级控件局","slug":"android学习5_部分高级控件","date":"2017-03-30T01:57:14.000Z","updated":"2017-03-30T12:06:48.265Z","comments":true,"path":"2017/03/30/android学习5_部分高级控件/","link":"","permalink":"http://yoursite.com/2017/03/30/android学习5_部分高级控件/","excerpt":"","text":"图片控件ImageView 图片视图用于显示图片,与Textview一样同属于View类现将图片素材放入Drawable然后通过设置android:src=”@drawable/“ android:scaleTpye属性可以缩放图片 ="fitCenter" 表示完全缩放 ="fitXY" 表示完全适应imageview容器,不保持纵横比。 ="centerCrop" 表示完全适应imageview容器,保持纵横比。 ImageButton用于事件处理,按钮上显示的使图片 使用background调用图片资源时,会自动缩放。 并且可也在drawable资源中创建xml文件,选择sectors,设置按钮的状态时显示不同的资源 设置控件透明度android:alpha=”” 设置图片背景透明android:background ImageSwitchergallery","categories":[],"tags":[{"name":"android学习","slug":"android学习","permalink":"http://yoursite.com/tags/android学习/"}]},{"title":"android学习4_表格布局和相对布局","slug":"android学习4_Tablelayout","date":"2017-03-29T01:06:22.000Z","updated":"2017-03-30T01:57:05.936Z","comments":true,"path":"2017/03/29/android学习4_Tablelayout/","link":"","permalink":"http://yoursite.com/2017/03/29/android学习4_Tablelayout/","excerpt":"","text":"TableLayout类表格布局由TableLayout类控制,通过添加Tablerow来增加一行,每次增加一个空间相当于增加一列,空间的高度决定了每行的高度。 表格布局的常见属性android:collapseColumns //隐藏指定的列android:shrinkColumns //收缩指定的列以适应屏幕android:stretchColumns //扩展指定的列填充屏幕android:layout_column //指定列的序号android:layout_span //指定空间跨越的列数 Relativelayout类相对布局由RelativeLayout类控制,如果要使用相对布局的话需要为布局中的某一控件设置android:id=”@+id/xxx1”,然后根据这个控件进行布局,例如alignleft左对齐,leftto在其左边等等,根据需要进行布局 tipLayout_XX属性代表在整个父容器中的布局 XX则代表某个控件中的布局 例如 <button android:text="123" android:gravity="center" /> 文字123在按钮中居中 <button android:text="123" android:layout_gravity="center" /> 整个按钮在父容器中居中","categories":[],"tags":[{"name":"android学习","slug":"android学习","permalink":"http://yoursite.com/tags/android学习/"}]},{"title":"android学习3_线性布局","slug":"android学习3_Linearlayout","date":"2017-03-29T00:50:57.000Z","updated":"2017-03-29T01:05:27.563Z","comments":true,"path":"2017/03/29/android学习3_Linearlayout/","link":"","permalink":"http://yoursite.com/2017/03/29/android学习3_Linearlayout/","excerpt":"","text":"LinearLayout类线性布局由LinearLayout类来控制,只有两种排列方式,通过设置android:orientation属性来设置android:orientation=”horizontal”为水平方向android:orientation=”vertital”为垂直方向 HorizontalScrollView水平滚动条HorizontalScrollView是一个容器,可以包裹线性布局,同时还要将xmlns命名空间复制到中进行定义 ScrollView垂直滚动条ScrollView是一个容器,可以包裹线性布局,同时还要将xmlns命名空间复制到中进行定义","categories":[],"tags":[{"name":"android学习","slug":"android学习","permalink":"http://yoursite.com/tags/android学习/"}]},{"title":"android学习2_View组件","slug":"android学习2_View组件","date":"2017-03-29T00:31:16.000Z","updated":"2017-03-29T00:47:18.897Z","comments":true,"path":"2017/03/29/android学习2_View组件/","link":"","permalink":"http://yoursite.com/2017/03/29/android学习2_View组件/","excerpt":"","text":"首先创建一个新的Android projectFile>New>Android Application Project设置相关属性后完成创建 设置布局文件activity_main.xml采取线性布局<Linearlayout //线性布局设置为纵向布局“vertical” android:orientation="vertical" ....... /> </Linearlayout> Textview<TextView //设置如果有map、电话、email、网页等信息的话会自动链接 android:autoLink="all" //+到R函数的id android:id="@+id/myText" //设置水平居中 android:layout_gravity="center_horizontal" //宽度、长度为内容包裹 android:layout_width="wrap_content" android:layout_height="wrap_content" //字体大小为25sp android:textSize="25sp" /> EditText<EditText //宽度为屏幕铺满 android:layout_width="match_parent" android:layout_height="wrap_content" //提示信息 android:hint="请输入密码" //文本类型 android:inputType="textPassword" /> 设置Mainactivity.java类package pc.viewtext.study; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.text.Html; import android.view.Menu; import android.widget.TextView; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView text1=(TextView)findViewById(R.id.myText); text1.setText(Html.fromHtml("欢迎<font color='red'>加入</font><a href='http://www.baidu.com'>百度</a>")); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } MainActivity从属于Activity类,会自动执行oncreate()函数,其中setContentView(R.layout.activity_main),就是用来加载对应的布局文件的","categories":[],"tags":[{"name":"android学习","slug":"android学习","permalink":"http://yoursite.com/tags/android学习/"}]},{"title":"android学习1","slug":"android学习1","date":"2017-03-29T00:09:41.000Z","updated":"2017-03-29T00:31:03.514Z","comments":true,"path":"2017/03/29/android学习1/","link":"","permalink":"http://yoursite.com/2017/03/29/android学习1/","excerpt":"","text":"Android应用结构 (1)MainActivity.java:主程序,运行一个APP时,app首先启动的界面就是这个程序定义的类一个实例。 (2)HelloWorld.apk:可直接安装的包,平时我们下载的app安装程序包就是这一个文件。 (3)activity_main.xml:主布局文件的源代码文件,一般设置APP的页面显示时,可以用layout下的xml布局文件来定义。 gen目录gen目录中存放ADT自动生成的文件,该目录中最主要的就是R.java文件。Android开发工具会根据res目录中的xml文件、图片等资源,同步更新R.java文件。R.java在应用中起着字典的作用,它包含各种资源的引用,通过R.java系统可以很方便地找到对应资源。编绎器会根据R.java文件,检查资源是否被使用,没有使用的资源不会打包到安装文件中。 Manifest.xml清单文件清单文件主要包含的信息包括:应用程序名称、图标、版本号 应用程序的包名,该包名将会作为该应用的唯一标识; 应用程序所包含的组件,如Activity、Service等; 应用程序兼容的最低版本; 应用程序使用系统所需的权限声明; 其他程序访问该程序所需的权限声明。 Android程序基本执行过程 读取AndroidManifest.xml清单文件,设置一些基本信息,图标、名称,同时在application里面找到入口Activity 创建Activity类的对象,自动调用oncreate()方法,并显示对应的layout布局界面 根据layout属性显示相应的控件,同时执行oncreate()方法的动态调用。 Android的四大组件 Activity: 在Android应用中负责与用户进行交互的组件,我们称之为“活动”,一个Activity就是一个屏幕。 Service: 代表一个单独的Android组件,Service与Activity的区别在于:Service通常位于后台运行,它一般不需要与用户交互,一些Service组件没有图形用户界面。 BroadcastReceiver: 代表广播消息接收器,非常类似于事件编程中的监听器,所监听的事件源是Android应用中的其他组件。 ContentProvider: 提供一种跨应用的数据交换的标准。 Android的MVC模式MVC模式,即(Model-View-Controller):M指模型层、V指视图层、C是控制层。MVC把应用程序的模型层与视图层完全分开,最大的好处是:界面设计人员可以直接参与到界面开发,程序员则可以把精力放在业务逻辑上。","categories":[],"tags":[{"name":"android学习","slug":"android学习","permalink":"http://yoursite.com/tags/android学习/"}]},{"title":"个人小记","slug":"个人小记","date":"2017-03-25T23:48:13.000Z","updated":"2017-03-25T23:59:50.119Z","comments":true,"path":"2017/03/26/个人小记/","link":"","permalink":"http://yoursite.com/2017/03/26/个人小记/","excerpt":"","text":"今天是周日啦,那就稍作休整一下吧预告一下接下几天写点啥: 补上前面的linux获取root权限的内容 讲讲adb常用的命令,以及和虚拟机的连接 安卓系统一般内容的取证 分享点dalvik的内容 讲的都是非常浅的内容,如有不正,请大牛们指正。","categories":[],"tags":[{"name":"个人生活","slug":"个人生活","permalink":"http://yoursite.com/tags/个人生活/"}]},{"title":"crackme06简单粗暴","slug":"crackme06","date":"2017-03-25T01:31:47.000Z","updated":"2017-03-25T02:00:00.525Z","comments":true,"path":"2017/03/25/crackme06/","link":"","permalink":"http://yoursite.com/2017/03/25/crackme06/","excerpt":"","text":"今天爆破一个crackme的小程序吧首先用peid查一下壳 可以看到这是一个用Delphi写的小程序,没有加壳 然后用od加载进来运行一下 随便输入了一些内容,但是ok按钮是灰色的点不开啊啊啊,然后点了下about me的按钮 大概的意思就是想要破解这个程序需要然ok和cancella这两个按钮全部隐藏 通过一顿百度,到网上找到了这么一个工具reshacker,支持反汇编delphi,使用工具加载程序 翻了一下,找到了ok和cancella两个按钮的object,然后到百度上搜了一下delphi的命令 打开新编译的程序,成功破解了,具体走od的算法对于我这个渣渣来说好难啊,希望有大牛来指点一下:) 源程序和使用工具请到我的git上下载https://github.com/Bixintiao/blogtool.git","categories":[],"tags":[{"name":"逆向","slug":"逆向","permalink":"http://yoursite.com/tags/逆向/"}]},{"title":"John用法","slug":"John用法","date":"2017-03-24T07:37:20.000Z","updated":"2017-03-24T07:42:12.775Z","comments":true,"path":"2017/03/24/John用法/","link":"","permalink":"http://yoursite.com/2017/03/24/John用法/","excerpt":"","text":"#cd /tmp wget http://www.openwall.com/john/g/john-1.7.4.2.tar.gz tar -zxvf john-1.7.4.2.tar.gz cd john-1.7.4.2 cd src make linux-x86-any-a.out 或者使用yum install john2:unshadow /etc/passwd /etc/shadow >passwd.txt (注意只有root才能执行unshadow, 因为只有root才能读取/etc/shadow。)3:chmod 600 passwd.txt4: john passwd.txt此外,如果已经破解成功,则可以查看john.pot来查看。#john -show passwd.txt#john -show -users:yujs passwd.txt获得指定用户的密码。John the Ripper的四种破解模式 「字典档」破解模式(Wordlist Mode)这在John所支援的破解模式中是最简单的一种,你要做的唯一工作就是告诉John字典档在哪(字典档就是文字档,内容每行一个单字代表试验的密码),好 让它可以取出破解。在「字典档」破解模式里可以使用「字词变化」功能,来让这些规则自动的套用在每个读入的单字中,以增加破解的机率。 「简单」破解模式(Single Crack)「简单」破解模式是专门针对「使用帐号当作密码」的懒人所设计的;所谓「使用帐号当作密码」的意思是,如果一个使用者帐号是「john」,它的密码也取为 「john」。在「简单」破解模式里john会拿密码档内的「帐号」栏位等相关资讯来破解密码,并且使用多种「字词变化」的规则套用到的「帐号」内,以增 加破解的机率。如帐号「john」,它会尝试用「john」、「john0」、「njoh」、「j0hn」….等规则变化来尝试密码的可能性。 「增强」破解模式(Incremental Mode)这是John里面功能最强大的破解模式,它会自动尝试所有可能的字元组合,然后当作密码来破解。这个破解模式所需要的时间非常冗长,因为要尝试组合字元是 非常耗费时间的,所以John才会定义一些「字元频率表」(character frequencytables)来帮助破解。简言之这个破解方法就是「暴力法」,把所有可能的密码组合都测试一次,来得到正确的结果。 「外挂模组」破解模式(External Mode)这个破解模式是让使用者可以自己用C语言写一些「破解模组程式」,然后挂在John里面来使用。其实所谓的「破解模组程式」就是一些用C语言设计好的副函 示,然后它的功能就是产生出一些单字来让John尝试破解。而 在执行John程式时,它在载入这些「破解模组程式」时会自动编译这些C语言副函示然后来使用。 (真伟大,光这点就让笔者佩服五体投地) John the Ripper命令列参数说明 【命令列指令】 john [-命令列参数] [密码档档名] 【命令列参数】 参数:-single说明:使用「简单」(Single Crack)破解模式解密,主要是根据使用者的「帐号」产生变化来猜测解密,其变化规则记录在JOHN.INI档案的 [List.Rules:Single]区域内。 (稍后会再介绍) 范例:john -single passwd 参数:-wordfile:[字典档档名] -stdin 说明:使用「字典档」破解模式解密,由字典档内读取单字来破解;或是可以加上-stdin参数,代表由键盘输入单字来破解。 范例:john -wordfile:bigdict.dic passwd 参数:-rules说明:在「字典档」破解模式下,开启字词规则变化功能,如「字典档」读入单字cook,则开启字词变化下,程式可能会尝试cook、c00k、 cooker、cook0…等其它字词。详细变化规则记录在JOHN.INI档案的[List.Rules:Wordlist]区域内。(稍后会再介绍) 范例:john -wordfile:bigdict.dic -rules passw 参数:-incremental[:模式名称](参数也可以简写成-i[:模式名称])说明:使用「增强」破解模式解密,就是组合所有可能的字元当作密码来破解。在JOHN.INI档案内的[Incremental:*]区域里定义 好许多的模式名称,可以指定使用哪一个模式来破解。 (稍后会再介绍) 范例:john -i:all passwd 参数:-external:[模组名称]说明:使用「外挂模组」破解模式解密,使用者可以自己撰写额外的「破解模组程式」。 「破解模组程式」是记录在JOHN.INI档案内的[List.External:**]区域内。 范例:john -external:double passwd 参数:-stdout[:LENGTH]说明:这个选项跟破解没有任何关系,只是单纯显示John所产生出来的单字到萤幕上。 范例:john –i:all –stdout 参数:-restore[:回复档案名称]说明:继续上次中断的解密工作。 John在执行破解密码工作时,可以按下<CTRLC>键中断工作,而当前的解密进度情形会被存放在一个名为「restore」的档案内。而使用 「-restore」参数,可以从「restore」档案内读取上一次破解时候中断的位置,然后接下去继续破解。 范例:john –restore 参数:-session[:记录档档名]说明:这个选项是让你设定目前工作记录档(session file)的档名。所谓的工作记录档就是可以用「-restore」参数回复工作的档案。另外,在使用John做多工破解工作时,使用 「-session」参数可以为每个工作设定各别的记录档,而不会混在一起。 范例:john –wordfile:bigdict.dic –session:work1 passwd 参数:-status[:记录档档名]说明:显示工作记录档里面所记录的工作状态。 范例:john –status:restore 参数:-makechars:[档名]说明:制作「字元频率表」。这个选项会以目前已破解出的密码为基础,来产生「字元频率表」(注:John会把已破解出的密码记录在JOHN.POT档案 内,)。如果所指定档名的档案已经存在的话,会被覆写。此选项产生出来的档案,可以用在「增强」破解模式上。 范例:john –makechars:ownchars 参数:-show说明:显示目前已经破解出的密码。因为JOHN.POT档案内并不储存「帐号」资料,所以使用时你应该同时输入相对应的密码档。 范例:john –show passwd 参数:-test说明:测试目前机器执行John各类型密码破解时的速度。 范例:john –test 参数:-users:[-]LOGIN|UID [,..]说明:只破解某个「帐号」的密码,如只针对root或拥有root权利UID=0的使用者。 (若在LOGIN|UID名称前加上“-”符号则是相反,表示不要破解这个「帐号」的密码) 范例:john –i:all –users:root passwd 参数:-groups:[-]UID[,..]说明:只破解某个「群组」内用户的密码。 (若在UID名称前加上“-”符号则是相反,表示不要破解这个「群组」内用户的密码) 范例:john –i:all –groups:100 参数:-shells:[-]SHELL [,..]说明:和上面两个参数一样,这个选项是只针对所有可以使用shell的用户进行破解密码工作,对其它用户不予理会。(若在SHELL名称前加上“-”符号 则是相反,表示不要破解可以使用这个SHELL的用户的密码)。指定SHELL时,你可以省略绝对路径,如参数「-shells:csh」就会包含 「/bin/csh」或「/usr/bin/csh」等路径,但如果你指定的是「-shells:/bin/csh」则只会包含「/bin/csh」这个 SHELL名称。 范例:john –i:all –shells:csh passwd 参数:-salts:[-]COUNT说明:只破解「salts」大于「COUNT」的帐号的密码,可以使你得到较佳破解速度(所谓「salts」是指UNIX拿来作为「密码」编码基础的单 位)。举例来说,你可以先只破解某部分用户的密码「-salts:2」来获得较佳的速度,然后有时间时才破解剩余用户的密码「-salts:-2」。 范例:john –i:all –salts:2 passwd 参数:-format:NAME与-savemem:LEVEL说明:这两个参数是有关John内部运作的设定,跟破解本身没有直接关系,所以省略不介绍。 最常用的两个: john -w:all.txt passwd.txt john -show passwd.txt >/pass.txt 把解密结果保存到pass.txt里面。 字典可以到http://www.milw0rm.com/上在下载","categories":[],"tags":[{"name":"linux取证","slug":"linux取证","permalink":"http://yoursite.com/tags/linux取证/"}]},{"title":"跟表哥学的爆破linux shadow","slug":"跟表哥学的爆破linux shadow","date":"2017-03-24T01:18:20.000Z","updated":"2017-03-25T02:00:07.892Z","comments":true,"path":"2017/03/24/跟表哥学的爆破linux shadow/","link":"","permalink":"http://yoursite.com/2017/03/24/跟表哥学的爆破linux shadow/","excerpt":"","text":"这个操作的前提是拿到root权限,至于root权限可以参考单用户绕过,具体步骤改天出 0x01 /etc/passwd和/etc/shadow帐号管理最重要的两个档案就是‘ /etc/passwd 与 /etc/shadow ’了!这两个档案可以说是 Linux 里头最重要的档案之一了! 如果没有这两个档案的话,呵呵!您可是无法登入 Linux 的呦!所以,底下我们先针对这两个档案来进行说明。当然啰,更详细的资料您可以自行 man 5 passwd 及 man 5 shadow 的啦~ /etc/passwd这个档案的构造是这样的:每一行都代表一个帐号, 有几行就代表有几个帐号在你的系统中!不过需要特别留意的是, 里头很多帐号本来就是系统中必须要的,我们可以简称他为系统帐号, 例如 bin, daemon, adm, nobody 等等,这些帐号是系统正常运作时所需要的,请不要随意的杀掉他呢! 这个档案的内容有点像这样: root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin 我们先来看一下每个 Linux 系统都会有的第一行,就是 root 这个系统管理员那一行好了, 你可以明显的看出来,每一行使用‘:’分隔开,共有七个咚咚,分别是: 帐号名称:就是帐号名称啦!对应 UID 用的!例如 root 就是预设的系统管理员的帐号名称; 密码:早期的 Unix 系统的密码是放在这个档案中的, 但是因为这个档案的特性是所有的程序都能够读取,所以,这样一来很容易造成资料的被窃取, 因此后来就将这个栏位的密码资料给他改放到 /etc/shadow 中了,关于 /etc/shadow 这一部份等一下再说。而这里你会看到一个 x ,呵呵!别担心,这表示密码已经被移动到 shadow 这个加密过后的档案啰; UID:这个就是使用者识别码 (ID) 啰!通常 Linux 对于 UID 有几个限制需要说给您瞭解一下:id 范围 该 ID 使用者特性0。当 UID 是 0 时,代表这个帐号是‘系统管理员’!所以当你要作另一个系统管理员帐号时, 你可以将该帐号的 UID 改成 0 即可;这也就是说,一部系统上面的系统管理员不见得只有 root 喔! 不过,不很建议有多个帐号的 UID 是 0 啦~1~499保留给系统使用的 ID,其实 1~65534 之间的帐号并没有不同, 也就是除了 0 之外,其他的 UID 并没有不一样,预设 500 以下给系统作为保留帐号只是一个习惯。这 样的好处是,以有名的 DNS 伺服器的启动服务‘ named ’为例,这个程式的预设所有人 named 的帐号 UID 是 25 ,当有其他的帐号同样是 25 时,很可能会造成系统的一些小问题!为了杜绝这样的问题,建议保留 500 以前的 UID 给系统吧!不过,一般来说, 1~99 会保留给系统预设的帐号,另外 100~499 则保留给一些服务来使用。500~65535 给一般使用者用的。事实上,目前的 linux 核心 (2.6.x 版)已经可以支援到 4294967295 (2^32-1) 这么大的 UID 号码喔!上面这样说明可以瞭解了吗?是的, UID 为 0 的时候,就是 root 呦!所以请特别留意一下你的 /etc/passwd 档案! GID:这个与 /etc/group 有关!其实 /etc/group 的观念与 /etc/passwd 差不多,只是他是用来规范 group 的而已! 使用者资讯说明栏:这个栏位基本上并没有什么重要用途, 只是用来解释这个帐号的意义而已!不过,如果您提供使用 finger 的功能时, 这个栏位可以提供很多的讯息呢!底下的 chfn 可以解释一下啰! 家目录:这是使用者的家目录,以上面为例, root 的家目录在 /root ,所以当 root 登入之后,就会立刻跑到 /root 里头啦!呵呵! 如果你有个帐号的使用空间特别的大,你想要将该帐号的家目录移动到其他的硬碟去, 没有错!可以在这里进行修改呦!预设的使用者家目录在 /home/yourIDname Shell:所谓的 shell 是用来沟通人类下达的指令与硬体之间真正动作的界面!我们通常使用 /bin/bash 这个 shell 来进行指令的下达!嘿嘿!发现了吧?我们在 bash 章节里面提到很多次,登入 Linux 时为何预设是 bash 呢?就是这里设定的啦~ 这里比较需要注意的是,有一个 shell 可以用来替代成让帐号无法登入的指令!那就是 /sbin/nologin 这个东西!这也可以用来制作纯 pop 邮件帐号者的资料呢! /etc/shadow上面约略提到,由于每个程序都需要取得 uid 与 gid 来判断权限的问题,所以, /etc/passwd 的权限必须要设定成为 -rw-r–r– 这样的权限,在这样的情况下, 使用者的密码不就任何人都可以看到吗?即使这个档案内的密码栏是加密的, 坏心肠的朋友也可能利用暴力破解法去 try and error 找出您的密码资料……因为这样的关系,所以后来发展出将密码移动到 /etc/shadow 这个档案分隔开来的技术, 而且还加入很多的密码限制参数在 /etc/shadow 里头呢!我们先来瞭解一下这个档案的构造吧! 我的 /etc/shadow 档案有点像这样: root:$1$i9Ejldjfjio389u9sjl$jljsoi45QE/:12959:0:99999:7::: bin:*:12959:0:99999:7::: daemon:*:12959:0:99999:7::: adm:*:12959:0:99999:7::: 基本上, shadow 同样以‘:’作为分隔符号,如果数一数,会发现共有九个栏位啊, 这九个栏位的用途是这样的: 帐号名称:由于密码也需要与帐号对应啊~因此, 这个档案的第一栏就是帐号,必须要与 /etc/passwd 相同才行! 密码:这个才是真正的密码,而且是 经过编码过的密码啦! 你只会看到有一些特殊符号的字母就是了!需要特别留意的是, 虽然这些加密过的密码很难被解出来,但是‘很难’不等于‘不会’,所以, 这个档案的预设属性是‘-rw——-’或者是‘-r——–’,亦即只有 root 才可以读写就是了!你得随时注意,不要不小心更动了这个档案的属性呢!另外, 如果是在密码栏的第一个字元为‘ ’或者是‘ ! ’,表示这个帐号并不会被用来登入的意思。 所以万一哪一天你的某个使用者不乖时,可以先在这个档案中,将他的密码栏位的最前面多加一个 !嘿嘿!他就无法使用该帐号啰!直到他变乖了,再给他启用啊! 最近更动密码的日期:这个栏位记录了‘更动密码的那一天’的日期, 不过,很奇怪呀!在我的例子中怎么会是 12959 呢?呵呵,这个是因为计算 Linux 日期的时间是以 1970 年 1 月 1 日作为 1 ,而 1971 年 1 月 1 日则为 366 啦! 所以这个日期是累加的呢!得注意一下这个资料呦!那么最近的 2005 年 1 月 1 日就是 12784 啦,瞭解了吗? 密码不可被更动的天数: 第四个栏位记录了这个帐号的密码需要经过几天才可以被变更!如果是 0 的话, 表示密码随时可以更动的意思。这的限制是为了怕密码被某些人一改再改而设计的!如果设定为 20 天的话,那么当你设定了密码之后, 20 天之内都无法改变这个密码呦! 密码需要重新变更的天数: 由于害怕密码被某些‘有心人士’窃取而危害到整个系统的安全,所以有了这个栏位的设计。 你必须要在这个时间之内重新设定你的密码,否则这个帐号将会暂时失效。 而如果像上面的 99999 的话,那就表示,呵呵,密码不需要重新输入啦! 不过,如果是为了安全性,最好可以设定一段时间之后,严格要求使用者变更密码呢! 密码需要变更期限前的警告期限:当帐号的密码失效期限快要到的时候, 就是上面那个‘必须变更密码’的那个时间时, 系统会依据这个栏位的设定,发出‘警告’言论给这个帐号,提醒他‘再过 n 天你的密码就要失效了,请尽快重新设定你的密码呦!’,如上面的例子,则是密码到期之前的 7 天之内,系统会警告该用户。 密码过期的恕限时间:如果用户过了警告期限没有重新输入密码, 使得密码失效了,也就是说,你在‘必须变更密码的期限前,并没有变更你的密码!’ 那么该组密码就称为‘失效的密码’啰~怎么办?没关系,还有这个栏位的天数设计啊~ 意思就是说,当密码失效后,你还可以用这个密码在 n 天内进行登入的意思。 而如果在这个天数后还是没有变更密码,呵呵!那么您的帐号就失效了!无法登入! 帐号失效日期:这个日期跟第三个栏位一样,都是使用 1970 年以来的总日数设定。这个栏位表示: 这个帐号在此栏位规定的日期之后,将无法再使用。 这个栏位会被使用通常应该是在‘收费服务’的系统中, 你可以规定一个日期让该帐号不能再使用啦! 保留:最后一个栏位是保留的,看以后有没有新功能加入。 举个例子来说好了,假如我的 dmtsai 这个使用者的密码栏如下所示: dmtsai:$1$8zdAKdfC$XDa8eSus2I7nQL7UjRsIy/:13025:5:60:7:2:13125: 这表示什么呢?要注意的是, 13025 是 2005/08/30 ,所以, dmtsai 这个使用者他的密码相关意义是: 最近一次更动密码的日期是 2005/08/30 (13025);能够修改密码的时间是 5 天以后,也就是 2005/09/04 以前 dmtsai 不能修改自己的密码; 如果使用者还是尝试要更动自己的密码,系统就会出现这样的讯息: You must wait longer to change your password passwd: Authentication token manipulation error 使用者必须要在 2005/09/04 到 2005/10/29 之间的 60 天限制内去修改自己的密码,若 2005/10/29 之后还是没有变更密码时,该帐号就会宣告失效;如果使用者一直没有更改密码,那么在 2005/10/29 之前的 7 天内,系统会警告 dmtsai 应该修改密码的相关资讯;例如当 dmtsai 登入时,系统会主动提示如下的资讯: Warning: your password will expire in 5 days 如果该帐号一直到 2005/10/29 都没有更改密码,由于还有两天的恕限时间,因此, dmtsai 还是可以在 2005/10/31 以前继续登入;如果使用者在 2005/10/29 以前变更过密码,那么那个 13025 的日期就会跟著改变,因此, 所有的限制日期也会跟著相对变动喔!^_^无论使用者如何动作,到了 13125 ,大约是 2005/12/8 左右,该帐号就失效了~ 转自http://blog.chinaunix.net/uid-20672559-id-3442754.html 0x02提取密码文件创建测试账号adduser textuser 获取密码文件unshadow /etc/passwd /etc/shadow > password password就是等待破解的密码文件 0x03破解工具使用John the Ripper password cracker(http://www.openwall.com/john/)我这里下载了这个版本 0x04开始破解john既可以在windows下破解,也可以在linux下破解 直接全部爆破 john password 制定用户爆破 john --user:textuser(制定用户名) password 查看已经爆破的密码 john --show password john --show --user:textuser password 密码有点复杂,还是停掉吧,把密码改成123456试试 passwd textuser 123456 123456 注意要把password重新生成一下,生成passwordnew 可以看到已经破解了密码了 如果需要破解复杂的密码可能需要字典了 john -w:all.txt(字典) passwordnew 工具可以到我的github下载https://github.com/Bixintiao/blogtool.git 详细的john用法我到网上去dump一篇来,有时间再发吧:)","categories":[],"tags":[{"name":"linux取证","slug":"linux取证","permalink":"http://yoursite.com/tags/linux取证/"}]},{"title":"博客说明","slug":"博客说明","date":"2017-03-24T01:18:17.000Z","updated":"2017-03-25T01:59:20.861Z","comments":true,"path":"2017/03/24/博客说明/","link":"","permalink":"http://yoursite.com/2017/03/24/博客说明/","excerpt":"","text":"搞了半天终于搭好了hexo+github(https://github.com/Bixintiao)的个人博客。个人记性不好,以后在这里http://eviadmin.top将学习的内容记录一下,方便查找。(上传工具到github老是失败,所以有些工具大家自行百度吧) #个人说明# 毕业小菜业精于勤,荒于嬉。身边的大牛好多,感觉自己好low啊。 简要说明一下记录的内容- windows取证 - linux取证 - android取证 - ios取证 - 文件修复 - 密码破解 - misc - web - 隐写 - 逆向 - 密码 - 想到再加:) 欢迎各位大佬带带小弟","categories":[],"tags":[{"name":"个人生活","slug":"个人生活","permalink":"http://yoursite.com/tags/个人生活/"}]}]}