zoukankan      html  css  js  c++  java
  • Runas命令巧用

    Runas,从字面上看就知道,以谁的身份去run一个程序,那么他就是在当前登陆的Windows帐号下,以本地或者是域中的其他帐号的身份去运行一个程序。简明语法如下:

    Runas /user:username application

    解释:上面的只需要改动2个地方:

    Username:改成你要用哪个帐号来运行程序

    Application:改成你要运行的程序名字,必要时,需要指定全路径

    示例,以panda这个用户来运行iexplore.exe,由于iexplore.exe不在环境变量中,因此我们需要指明全路径:

    C:WindowsSystem32>net user panda 1 /add       添加这个用户,并设置密码是1

    命令成功完成。

    C:WindowsSystem32>runas /user:panda "C:Program Files (x86)Internet Explorer

    iexplore.exe"

    输入 panda 的密码:                        这里输入panda的密码

    试图将 C:Program Files (x86)Internet Exploreriexplore.exe 作为用户 "WIN-CB2A7

    JHK8HHpanda" 启动...

     

    这样以panda为用户身份的iexplore.exe启动了,这样做有什么好处?那就是这个panda的权限很低,是users权限,及时用他上网中毒了,病毒也不会对系统造成任何影响。其实我们还可以把panda加入到Guests组,除去他的Users组权限,那么这个用户的权限就会更加的低,安全性更加坚不可摧了。

    C:WindowsSystem32>net localgroup Guests panda /add

    命令成功完成。

    C:WindowsSystem32>net localgroup Users panda /del

    命令成功完成。

    C:WindowsSystem32>runas /user:panda "C:Program Files (x86)Internet Explorer

    iexplore.exe"

    输入 panda 的密码:

    试图将 C:Program Files (x86)Internet Exploreriexplore.exe 作为用户 "WIN-CB2A7

    JHK8HHpanda" 启动...

    技术交流群:70539804

  • 相关阅读:
    [蓝桥杯] 第39级台阶
    [蓝桥杯] 马虎的算式
    POJ 1142 Smith Numbers(史密斯数)
    HDU 1181 变形课
    HDU 1728 逃离迷宫
    HDU 2188 悼念512汶川大地震遇难同胞――选拔志愿者 巴什博奕
    HDU 2177 取(2堆)石子游戏 (威佐夫博弈)
    HDU 1847 Good Luck in CET-4 Everybody! 博弈
    HDU 1525 Euclid's Game
    HDU 1517 A Multiplication Game 博弈
  • 原文地址:https://www.cnblogs.com/boltkiller/p/5732467.html
Copyright © 2011-2022 走看看