dankamongmen / omphalos

A tool for network enumeration and domination.
https://nick-black.com/dankwiki/index.php/Omphalos
GNU General Public License v3.0
49 stars 6 forks source link

omphalos on remote host can drive positive work feedback loop #49

Open dankamongmen opened 4 years ago

dankamongmen commented 4 years ago

I left an omphalos-notcurses process live on qemfd.net for most of the day. At this point, it is still responsive and functional (yay!), but it is also eating a full CPU. strace reveals that it's simply polling for and receiving packets, and then redrawing the screen, but it loks like we're doing a redraw every packet(!). That's of course going to effectively force omphalos to constantly work, since every time it updates the screen, it generates an ssh packet which causes it to update the screen.

Update less frequently, holmes.

dankamongmen commented 4 years ago

Here's what it looks like:

[pid 1261206] poll([{fd=51, events=POLLIN|POLLERR|POLLRDNORM}], 1, 250 <unfinished ...>
[pid 1261202] futex(0x55b80ec36bc0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
[pid 1261207] ioctl(5, TIOCGWINSZ <unfinished ...>
[pid 1261203] <... poll resumed>)       = 0 (Timeout)
[pid 1261207] <... ioctl resumed>, {ws_row=74, ws_col=80, ws_xpixel=0, ws_ypixel=0}) = 0
[pid 1261203] futex(0x55b80ec36bc0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
[pid 1261207] futex(0x55b80ec36bc0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 1261203] <... futex resumed>)      = -1 EAGAIN (Resource temporarily unavailable)
[pid 1261207] <... futex resumed>)      = 1
[pid 1261202] <... futex resumed>)      = 0
[pid 1261207] poll([{fd=56, events=POLLIN|POLLERR|POLLRDNORM}], 1, 250 <unfinished ...>
[pid 1261202] futex(0x55b80ec36bc0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
[pid 1261203] ioctl(5, TIOCGWINSZ, {ws_row=74, ws_col=80, ws_xpixel=0, ws_ypixel=0}) = 0
[pid 1261203] futex(0x55b80ec36bc0, FUTEX_WAKE_PRIVATE, 1) = 1
[pid 1261202] <... futex resumed>)      = 0
[pid 1261203] poll([{fd=36, events=POLLIN|POLLERR|POLLRDNORM}], 1, 250 <unfinished ...>
[pid 1261202] ioctl(5, TIOCGWINSZ, {ws_row=74, ws_col=80, ws_xpixel=0, ws_ypixel=0}) = 0
[pid 1261202] futex(0x55b80ec36bc0, FUTEX_WAKE_PRIVATE, 1) = 0