diff --git a/cmd/sb.c b/cmd/sb.c
index 79f3fb0aacd..8e7604a13c4 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -6,6 +6,10 @@
 
 #include <command.h>
 #include <dm.h>
+#include <malloc.h>
+#include <mapmem.h>
+#include <net.h>
+#include <string.h>
 #include <spl.h>
 #include <asm/cpu.h>
 #include <asm/global_data.h>
@@ -47,12 +51,52 @@ static int do_sb_state(struct cmd_tbl *cmdtp, int flag, int argc,
 	return 0;
 }
 
+static int do_sb_netrx(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
+{
+	ulong addr;
+	unsigned int len;
+	uchar *buf;
+	uchar stack_buf[256];
+	bool heap = false;
+	void *src;
+
+	if (argc != 3)
+		return CMD_RET_USAGE;
+
+	addr = hextoul(argv[1], NULL);
+	len = dectoul(argv[2], NULL);
+
+	if (len > sizeof(stack_buf)) {
+		buf = malloc(len);
+		if (!buf)
+			return CMD_RET_FAILURE;
+		heap = true;
+	} else {
+		buf = stack_buf;
+	}
+	src = map_sysmem(addr, len);
+	if (!src) {
+		free(buf);
+		return CMD_RET_FAILURE;
+	}
+	memcpy(buf, src, len);
+	unmap_sysmem(src);
+	net_process_received_packet(buf, len);
+	if (heap)
+		free(buf);
+
+	return 0;
+}
+
 U_BOOT_LONGHELP(sb,
 	"handoff     - Show handoff data received from SPL\n"
 	"sb map         - Show mapped memory\n"
-	"sb state       - Show sandbox state");
+	"sb state       - Show sandbox state\n"
+	"sb netrx <addr> <len> - inject a raw RX packet into net stack");
 
 U_BOOT_CMD_WITH_SUBCMDS(sb, "Sandbox status commands", sb_help_text,
 	U_BOOT_SUBCMD_MKENT(handoff, 1, 1, do_sb_handoff),
 	U_BOOT_SUBCMD_MKENT(map, 1, 1, do_sb_map),
-	U_BOOT_SUBCMD_MKENT(state, 1, 1, do_sb_state));
+	U_BOOT_SUBCMD_MKENT(state, 1, 1, do_sb_state),
+	U_BOOT_SUBCMD_MKENT(netrx, 3, 1, do_sb_netrx));
