Skip to content

Commit ed57811

Browse files
Tim BrownTim Brown
authored andcommitted
v0.8.9
1 parent 4303533 commit ed57811

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2012-11-30 Enum4linux v0.8.9
2+
3+
* -d option decodes some of the acb_info field including
4+
if account is disabled, password expired, acct locked.
5+
16
2011-06-16 Enum4linux v0.8.8
27

38
* Bug fix: -w option should now work better. Allows

enum4linux.pl

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
use Data::Dumper;
4848
use Scalar::Util qw(tainted);
4949

50-
my $VERSION="0.8.8";
50+
my $VERSION="0.8.9";
5151
my $verbose = 0;
5252
my $debug = 0;
5353
my $global_fail_limit = 1000; # no command line option yet
@@ -928,7 +928,53 @@ sub get_user_details_from_rid {
928928
print "[V] Attempting to get detailed user info with command: $command\n" if $verbose;
929929
my $user_info = `$command`;
930930
($user_info) = $user_info =~ /([^\n]*User Name.*logon_hrs[^\n]*)/s;
931-
print "$user_info\n\n" if defined($user_info);
931+
print "$user_info\n" if defined($user_info);
932+
my ($acb_info) = $user_info =~ /acb_info\s+:\s+0x([0-9a-fA-F]+)/;
933+
if ($acb_info) {
934+
my $acb_int = hex($acb_info);
935+
my $pad = "\t";
936+
if ($acb_int & 0x00000001) {
937+
printf $pad . "%-25.25s: %s\n", "Account Disabled", "True";
938+
} else {
939+
printf $pad . "%-25.25s: %s\n", "Account Disabled", "False";
940+
}
941+
if ($acb_int & 0x00000200) {
942+
printf $pad . "%-25.25s: %s\n", "Password does not expire", "True";
943+
} else {
944+
printf $pad . "%-25.25s: %s\n", "Password does not expire", "False";
945+
}
946+
if ($acb_int & 0x00000400) {
947+
printf $pad . "%-25.25s: %s\n", "Account locked out", "True";
948+
} else {
949+
printf $pad . "%-25.25s: %s\n", "Account locked out", "False";
950+
}
951+
if ($acb_int & 0x00020000) {
952+
printf $pad . "%-25.25s: %s\n", "Password expired", "True";
953+
} else {
954+
printf $pad . "%-25.25s: %s\n", "Password expired", "False";
955+
}
956+
if ($acb_int & 0x00000040) {
957+
printf $pad . "%-25.25s: %s\n", "Interdomain trust account", "True";
958+
} else {
959+
printf $pad . "%-25.25s: %s\n", "Interdomain trust account", "False";
960+
}
961+
if ($acb_int & 0x00000080) {
962+
printf $pad . "%-25.25s: %s\n", "Workstation trust account", "True";
963+
} else {
964+
printf $pad . "%-25.25s: %s\n", "Workstation trust account", "False";
965+
}
966+
if ($acb_int & 0x00000100) {
967+
printf $pad . "%-25.25s: %s\n", "Server trust account", "True";
968+
} else {
969+
printf $pad . "%-25.25s: %s\n", "Server trust account", "False";
970+
}
971+
if ($acb_int & 0x00002000) {
972+
printf $pad . "%-25.25s: %s\n", "Trusted for delegation", "True";
973+
} else {
974+
printf $pad . "%-25.25s: %s\n", "Trusted for delegation", "False";
975+
}
976+
}
977+
print "\n";
932978
}
933979

934980
sub invalid_rid {

0 commit comments

Comments
 (0)