Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the Hadoop windows command #1781

Closed
1 of 2 tasks
ilija-lazoroski opened this issue Mar 14, 2022 · 2 comments · Fixed by #1938
Closed
1 of 2 tasks

Rework the Hadoop windows command #1781

ilija-lazoroski opened this issue Mar 14, 2022 · 2 comments · Fixed by #1938
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: Medium Refactor

Comments

@ilija-lazoroski
Copy link
Contributor

ilija-lazoroski commented Mar 14, 2022

Describe the bug

Hadoop in its nature is repulling the monkey binaries which causes issues when trying to run the exploiter.
In order for the windows machine to be exploited we need to remove the binary and rerun it again.

To Reproduce

Steps to reproduce the behavior:

  1. Configure the Monkey to exploit windows Hadoop
  2. Run the monkey on the hadoop windows machine
  3. See that is shows exploited but no monkey runs

Expected behavior

The hadoop windows command should check if there is a binary and that is not empty,
remove it and download the new one. See this commit

Screenshots

If applicable, add screenshots to help explain your problem.

Machine version (please complete the following information):

  • OS: Windows

Tasks

  • Run a test on Windows/Hadoop. Verify that all agent binaries are removed after running. If not, fix it. (0.25d) @ilija-lazoroski
  • Run a test on Linux/Hadoop. Verify that all agent binaries are removed after running. If not, fix it. (0d) @ilija-lazoroski
@ilija-lazoroski ilija-lazoroski added Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Impact: Medium Complexity: Medium Refactor labels Mar 14, 2022
@mssalvatore
Copy link
Collaborator

This should be mostly resolved by #1782

@mssalvatore mssalvatore added this to Backlog in Monkey Dev Board Apr 20, 2022
@mssalvatore mssalvatore moved this from Backlog to To Do in Monkey Dev Board Apr 21, 2022
@ilija-lazoroski ilija-lazoroski moved this from To Do to In progress in Monkey Dev Board May 4, 2022
@ilija-lazoroski
Copy link
Contributor Author

Hadoop uses speculative exection which separate a job into two tasks which runs in parallel which means that our exploit command which downloads and executes the monkey will be run twice (not always the case), and may leave the executable on the machine. In linux that was fixed in the hadoop exploit command, as when we requested another file we were left with zero sized one. In windows there is not similar mechanism to the linux command. The solution to this issue was to mark the agent file for deletion on boot and try to delete it. This is going to fix any issue that we may have with future exploits.

Monkey Dev Board automation moved this from In progress to Done May 12, 2022
mssalvatore added a commit that referenced this issue Mar 16, 2023
Hadoop's speculative execution feature has lead to a number of
difficulties. See #655, #1781, and #2578. Of concern is that the issue
where Hadoop sends a SIGKILL to the first process (#2578) could cause
significant issues when implementing agent OTP authentication (#3077).

Setting max-app-attempts to 1 resolves these issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: Medium Refactor
Projects
Development

Successfully merging a pull request may close this issue.

2 participants