您可以跳过这部分
我正在使用拇指驱动器中的批处理文件,以便
安装真正的 crypt 卷。我在以下命令的帮助下创建了该批处理文件这个链接。在该批处理文件中我有用户名和密码
我将其作为参数传递给 trueCrypt.exe,以便使其成为
安装。
无论如何,我的问题是:是否有可能看到参数从第三方进程传递给程序?换句话说,是否可以看到传递给该程序的参数:
using System;
using System.Reflection;
using System.Diagnostics;
class Program
{
static string password = "";
static void Main(string[] args)
{
if (args.Length > 0)
password = args[0];
// get location where this program resides
var locationOfThisExe = Assembly.GetExecutingAssembly().Location;
Console.Write("Press enter to start a new instance of this program.");
Console.Read();
var randomArgument = new Random().NextDouble().ToString();
Process.Start(locationOfThisExe, randomArgument);
// I am passing a random argument to a new process!
// is it possible to see these arguments from another process?
}
}
Edit
我正在创建编辑,因为我认为我错误地解释了自己,但此编辑应该是一个解决方案而不是问题
我认为这个问题还没有受到足够的重视。执行显示的命令https://stackoverflow.com/users/235660/alois-kraus shows:
(我将输出粘贴到记事本++上)
![enter image description here](https://i.stack.imgur.com/TAdH2.png)
在图像上它没有显示得很清楚,但我能够看到参数被传递到该过程。这对我来说很重要,因为我使用以下命令挂载我的真实加密卷:
"C:\Program Files\TrueCrypt\TrueCrypt.exe" /v "a:\volume.tc" /lz /a /p a
告诉 truecrypt 我想挂载位于a:\volume.tc
在驱动器号 z 上,密码是a
如果我执行该命令 true crypt 会将该卷安装在驱动器 z 上:
![enter image description here](https://i.stack.imgur.com/pDY9h.png)
问题是如果我然后执行命令wmic process
注意穿什么鞋:
![enter image description here](https://i.stack.imgur.com/vkGM1.png)
注意密码就在里面!
因此总而言之,将安全信息作为参数传递是不安全的。如果您关闭接收参数的进程可能是安全的,但我认为意识到这一点很重要......