Level of privileges
-
How do I know which files on the system have different level of privileges. For example, if the 'at.exe' runs from the command prompt to open cmd.exe then the new cmd.exe has been given system privilages Is there any way to dump the level of privileges to a text file. I managed to get the application descriptions to a listview, now just trying to get their security levels.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;namespace FileDescription
{
public partial class Form1 : Form
{public Form1() { InitializeComponent(); } private void button1\_Click(object sender, EventArgs e) { GetFileDescription(); } private void GetFileDescription() { string\[\] fileInfo = Directory.GetFiles(Environment.SystemDirectory); foreach (string str in fileInfo) { if (str.ToString().Contains(".exe")) { ListViewItem lvi = new ListViewItem(); FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(str); lvi = lv.Items.Add(str); lvi.SubItems.Add(myFileVersionInfo.FileDescription); } } } private void Form1\_Load(object sender, EventArgs e) { lv.Columns.Add("File",200,HorizontalAlignment.Left); lv.Columns.Add("Description",400,HorizontalAlignment.Left); } private void openToolStripMenuItem\_Click(object sender, EventArgs e) { Process.Start(lv.SelectedItems\[0\].ToString()); } }
}
Thats what I turned out with.
-
How do I know which files on the system have different level of privileges. For example, if the 'at.exe' runs from the command prompt to open cmd.exe then the new cmd.exe has been given system privilages Is there any way to dump the level of privileges to a text file. I managed to get the application descriptions to a listview, now just trying to get their security levels.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;namespace FileDescription
{
public partial class Form1 : Form
{public Form1() { InitializeComponent(); } private void button1\_Click(object sender, EventArgs e) { GetFileDescription(); } private void GetFileDescription() { string\[\] fileInfo = Directory.GetFiles(Environment.SystemDirectory); foreach (string str in fileInfo) { if (str.ToString().Contains(".exe")) { ListViewItem lvi = new ListViewItem(); FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(str); lvi = lv.Items.Add(str); lvi.SubItems.Add(myFileVersionInfo.FileDescription); } } } private void Form1\_Load(object sender, EventArgs e) { lv.Columns.Add("File",200,HorizontalAlignment.Left); lv.Columns.Add("Description",400,HorizontalAlignment.Left); } private void openToolStripMenuItem\_Click(object sender, EventArgs e) { Process.Start(lv.SelectedItems\[0\].ToString()); } }
}
Thats what I turned out with.
Files don't have privileges, users have privileges. A standard user and an admin could both start instances of the same program file, but the admin instance will have all the admin privileges, and the other will have only standard user privileges.
The difficult we do right away... ...the impossible takes slightly longer.