Beyond
This is the beyond page that an additional post enumeration and assessment are conducted as the root
user after compromising the target system.
Cron
root@busqueda:/var/tmp# crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
*/8 * * * * /root/scripts/cron.sh
*/3 * * * * /usr/bin/rm /tmp/* /dev/shm/* /home/svc/*.sh
*/8 * * * * /root/scripts/cron.sh
*/3 * * * * /usr/bin/rm /tmp/* /dev/shm/* /home/svc/*.sh
/root/scripts/cron.sh
root@busqueda:/var/tmp# cat /root/scripts/cron.sh
#!/bin/bash
docker_ip=$(/usr/bin/docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysql_db)
/usr/bin/mysql -h $docker_ip gitea < /root/scripts/gitea_bak.sql
/root/scripts/gitea_bak.sql
root@busqueda:/var/tmp# cat /root/scripts/gitea_bak.sql
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
--
-- Host: 172.19.0.3 Database: gitea
-- ------------------------------------------------------
-- Server version 8.0.31
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `action`
--
DROP TABLE IF EXISTS `action`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `action` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_id` bigint DEFAULT NULL,
`op_type` int DEFAULT NULL,
`act_user_id` bigint DEFAULT NULL,
`repo_id` bigint DEFAULT NULL,
`comment_id` bigint DEFAULT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`ref_name` varchar(255) DEFAULT NULL,
`is_private` tinyint(1) NOT NULL DEFAULT '0',
`content` text,
`created_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_action_comment_id` (`comment_id`),
KEY `IDX_action_au_r_c_u_d` (`act_user_id`,`repo_id`,`created_unix`,`user_id`,`is_deleted`),
KEY `IDX_action_r_u_d` (`repo_id`,`user_id`,`is_deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `action`
--
LOCK TABLES `action` WRITE;
/*!40000 ALTER TABLE `action` DISABLE KEYS */;
INSERT INTO `action` VALUES (7,1,1,1,3,0,0,'',1,'',1671982230),(8,1,5,1,3,0,0,'refs/heads/main',1,'',1671982230),(9,1,5,1,3,0,0,'refs/heads/main',1,'{\"Commits\":[{\"Sha1\":\"b9a29dc5cc0ebf106947f4078eb6863f87dc5360\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"}],\"HeadCommit\":{\"Sha1\":\"b9a29dc5cc0ebf106947f4078eb6863f87dc5360\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"},\"CompareURL\":\"\",\"Len\":1}',1671982230),(10,2,1,2,4,0,0,'',1,'',1671982230),(11,1,5,1,4,0,0,'refs/heads/main',1,'',1671982230),(12,2,5,1,4,0,0,'refs/heads/main',1,'',1671982230),(13,1,5,1,4,0,0,'refs/heads/main',1,'{\"Commits\":[{\"Sha1\":\"5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"}],\"HeadCommit\":{\"Sha1\":\"5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"},\"CompareURL\":\"\",\"Len\":1}',1671982230),(14,2,5,1,4,0,0,'refs/heads/main',1,'{\"Commits\":[{\"Sha1\":\"5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"}],\"HeadCommit\":{\"Sha1\":\"5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4\",\"Message\":\"Initial commit\\n\",\"AuthorEmail\":\"administrator@gitea.searcher.htb\",\"AuthorName\":\"administrator\",\"CommitterEmail\":\"administrator@gitea.searcher.htb\",\"CommitterName\":\"administrator\",\"Timestamp\":\"2022-12-25T12:14:21Z\"},\"CompareURL\":\"\",\"Len\":1}',1671982230);
/*!40000 ALTER TABLE `action` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `language_stat`
--
DROP TABLE IF EXISTS `language_stat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `language_stat` (
`id` bigint NOT NULL AUTO_INCREMENT,
`repo_id` bigint NOT NULL,
`commit_id` varchar(255) DEFAULT NULL,
`is_primary` tinyint(1) DEFAULT NULL,
`language` varchar(50) NOT NULL,
`size` bigint NOT NULL DEFAULT '0',
`created_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_language_stat_s` (`repo_id`,`language`),
KEY `IDX_language_stat_repo_id` (`repo_id`),
KEY `IDX_language_stat_language` (`language`),
KEY `IDX_language_stat_created_unix` (`created_unix`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `language_stat`
--
LOCK TABLES `language_stat` WRITE;
/*!40000 ALTER TABLE `language_stat` DISABLE KEYS */;
INSERT INTO `language_stat` VALUES (5,3,'b9a29dc5cc0ebf106947f4078eb6863f87dc5360',0,'Python',2489,1680532162),(6,3,'b9a29dc5cc0ebf106947f4078eb6863f87dc5360',1,'Shell',4203,1680532162),(7,4,'5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4',0,'Python',1124,1680532389),(8,4,'5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4',1,'HTML',7573,1680532389);
/*!40000 ALTER TABLE `language_stat` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `notice`
--
DROP TABLE IF EXISTS `notice`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notice` (
`id` bigint NOT NULL AUTO_INCREMENT,
`type` int DEFAULT NULL,
`description` text,
`created_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_notice_created_unix` (`created_unix`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `notice`
--
LOCK TABLES `notice` WRITE;
/*!40000 ALTER TABLE `notice` DISABLE KEYS */;
/*!40000 ALTER TABLE `notice` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `repo_indexer_status`
--
DROP TABLE IF EXISTS `repo_indexer_status`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `repo_indexer_status` (
`id` bigint NOT NULL AUTO_INCREMENT,
`repo_id` bigint DEFAULT NULL,
`commit_sha` varchar(40) DEFAULT NULL,
`indexer_type` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `IDX_repo_indexer_status_s` (`repo_id`,`indexer_type`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `repo_indexer_status`
--
LOCK TABLES `repo_indexer_status` WRITE;
/*!40000 ALTER TABLE `repo_indexer_status` DISABLE KEYS */;
INSERT INTO `repo_indexer_status` VALUES (3,3,'b9a29dc5cc0ebf106947f4078eb6863f87dc5360',1),(4,4,'5ede9ed9f2ee636b5eb559fdedfd006d2eae86f4',1);
/*!40000 ALTER TABLE `repo_indexer_status` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `repo_unit`
--
DROP TABLE IF EXISTS `repo_unit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `repo_unit` (
`id` bigint NOT NULL AUTO_INCREMENT,
`repo_id` bigint DEFAULT NULL,
`type` int DEFAULT NULL,
`config` text,
`created_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_repo_unit_s` (`repo_id`,`type`),
KEY `IDX_repo_unit_created_unix` (`created_unix`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `repo_unit`
--
LOCK TABLES `repo_unit` WRITE;
/*!40000 ALTER TABLE `repo_unit` DISABLE KEYS */;
INSERT INTO `repo_unit` VALUES (15,3,1,NULL,1680531979),(16,3,2,'{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true,\"EnableDependencies\":true}',1680531979),(17,3,3,'{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true,\"AllowManualMerge\":false,\"AutodetectManualMerge\":false,\"AllowRebaseUpdate\":true,\"DefaultDeleteBranchAfterMerge\":false,\"DefaultMergeStyle\":\"merge\"}',1680531979),(18,3,4,NULL,1680531979),(19,3,5,NULL,1680531979),(20,3,8,NULL,1680531979),(21,3,9,NULL,1680531979),(22,4,1,NULL,1680532283),(23,4,2,'{\"EnableTimetracker\":true,\"AllowOnlyContributorsToTrackTime\":true,\"EnableDependencies\":true}',1680532283),(24,4,3,'{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true,\"AllowManualMerge\":false,\"AutodetectManualMerge\":false,\"AllowRebaseUpdate\":true,\"DefaultDeleteBranchAfterMerge\":false,\"DefaultMergeStyle\":\"merge\"}',1680532283),(25,4,4,NULL,1680532283),(26,4,5,NULL,1680532283),(27,4,8,NULL,1680532283),(28,4,9,NULL,1680532283);
/*!40000 ALTER TABLE `repo_unit` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `repository`
--
DROP TABLE IF EXISTS `repository`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `repository` (
`id` bigint NOT NULL AUTO_INCREMENT,
`owner_id` bigint DEFAULT NULL,
`owner_name` varchar(255) DEFAULT NULL,
`lower_name` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text,
`website` varchar(2048) DEFAULT NULL,
`original_service_type` int DEFAULT NULL,
`original_url` varchar(2048) DEFAULT NULL,
`default_branch` varchar(255) DEFAULT NULL,
`num_watches` int DEFAULT NULL,
`num_stars` int DEFAULT NULL,
`num_forks` int DEFAULT NULL,
`num_issues` int DEFAULT NULL,
`num_closed_issues` int DEFAULT NULL,
`num_pulls` int DEFAULT NULL,
`num_closed_pulls` int DEFAULT NULL,
`num_milestones` int NOT NULL DEFAULT '0',
`num_closed_milestones` int NOT NULL DEFAULT '0',
`num_projects` int NOT NULL DEFAULT '0',
`num_closed_projects` int NOT NULL DEFAULT '0',
`is_private` tinyint(1) DEFAULT NULL,
`is_empty` tinyint(1) DEFAULT NULL,
`is_archived` tinyint(1) DEFAULT NULL,
`is_mirror` tinyint(1) DEFAULT NULL,
`status` int NOT NULL DEFAULT '0',
`is_fork` tinyint(1) NOT NULL DEFAULT '0',
`fork_id` bigint DEFAULT NULL,
`is_template` tinyint(1) NOT NULL DEFAULT '0',
`template_id` bigint DEFAULT NULL,
`size` bigint NOT NULL DEFAULT '0',
`is_fsck_enabled` tinyint(1) NOT NULL DEFAULT '1',
`close_issues_via_commit_in_any_branch` tinyint(1) NOT NULL DEFAULT '0',
`topics` text,
`trust_model` int DEFAULT NULL,
`avatar` varchar(64) DEFAULT NULL,
`created_unix` bigint DEFAULT NULL,
`updated_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_repository_s` (`owner_id`,`lower_name`),
KEY `IDX_repository_lower_name` (`lower_name`),
KEY `IDX_repository_is_mirror` (`is_mirror`),
KEY `IDX_repository_is_fork` (`is_fork`),
KEY `IDX_repository_created_unix` (`created_unix`),
KEY `IDX_repository_name` (`name`),
KEY `IDX_repository_original_service_type` (`original_service_type`),
KEY `IDX_repository_is_empty` (`is_empty`),
KEY `IDX_repository_is_archived` (`is_archived`),
KEY `IDX_repository_fork_id` (`fork_id`),
KEY `IDX_repository_is_template` (`is_template`),
KEY `IDX_repository_template_id` (`template_id`),
KEY `IDX_repository_updated_unix` (`updated_unix`),
KEY `IDX_repository_owner_id` (`owner_id`),
KEY `IDX_repository_is_private` (`is_private`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `repository`
--
LOCK TABLES `repository` WRITE;
/*!40000 ALTER TABLE `repository` DISABLE KEYS */;
INSERT INTO `repository` VALUES (3,1,'administrator','scripts','scripts','','',0,'','main',1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,105931,1,0,'null',0,'',1671982230,1671982230),(4,2,'cody','searcher_site','Searcher_site','Flask Application for the Searcher Site','',0,'','main',1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,102237,1,0,'null',0,'',1671982230,1671982230);
/*!40000 ALTER TABLE `repository` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` bigint NOT NULL AUTO_INCREMENT,
`lower_name` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`full_name` varchar(255) DEFAULT NULL,
`email` varchar(255) NOT NULL,
`keep_email_private` tinyint(1) DEFAULT NULL,
`email_notifications_preference` varchar(20) NOT NULL DEFAULT 'enabled',
`passwd` varchar(255) NOT NULL,
`passwd_hash_algo` varchar(255) NOT NULL DEFAULT 'argon2',
`must_change_password` tinyint(1) NOT NULL DEFAULT '0',
`login_type` int DEFAULT NULL,
`login_source` bigint NOT NULL DEFAULT '0',
`login_name` varchar(255) DEFAULT NULL,
`type` int DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`website` varchar(255) DEFAULT NULL,
`rands` varchar(32) DEFAULT NULL,
`salt` varchar(32) DEFAULT NULL,
`language` varchar(5) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`created_unix` bigint DEFAULT NULL,
`updated_unix` bigint DEFAULT NULL,
`last_login_unix` bigint DEFAULT NULL,
`last_repo_visibility` tinyint(1) DEFAULT NULL,
`max_repo_creation` int NOT NULL DEFAULT '-1',
`is_active` tinyint(1) DEFAULT NULL,
`is_admin` tinyint(1) DEFAULT NULL,
`is_restricted` tinyint(1) NOT NULL DEFAULT '0',
`allow_git_hook` tinyint(1) DEFAULT NULL,
`allow_import_local` tinyint(1) DEFAULT NULL,
`allow_create_organization` tinyint(1) DEFAULT '1',
`prohibit_login` tinyint(1) NOT NULL DEFAULT '0',
`avatar` varchar(2048) NOT NULL,
`avatar_email` varchar(255) NOT NULL,
`use_custom_avatar` tinyint(1) DEFAULT NULL,
`num_followers` int DEFAULT NULL,
`num_following` int NOT NULL DEFAULT '0',
`num_stars` int DEFAULT NULL,
`num_repos` int DEFAULT NULL,
`num_teams` int DEFAULT NULL,
`num_members` int DEFAULT NULL,
`visibility` int NOT NULL DEFAULT '0',
`repo_admin_change_team_access` tinyint(1) NOT NULL DEFAULT '0',
`diff_view_style` varchar(255) NOT NULL DEFAULT '',
`theme` varchar(255) NOT NULL DEFAULT '',
`keep_activity_private` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_user_lower_name` (`lower_name`),
UNIQUE KEY `UQE_user_name` (`name`),
KEY `IDX_user_last_login_unix` (`last_login_unix`),
KEY `IDX_user_is_active` (`is_active`),
KEY `IDX_user_created_unix` (`created_unix`),
KEY `IDX_user_updated_unix` (`updated_unix`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'administrator','administrator','','administrator@gitea.searcher.htb',0,'enabled','ba598d99c2202491d36ecf13d5c28b74e2738b07286edc7388a2fc870196f6c4da6565ad9ff68b1d28a31eeedb1554b5dcc2','pbkdf2',0,0,0,'',0,'','','44748ed806accc9d96bf9f495979b742','a378d3f64143b284f104c926b8b49dfb','en-US','',1672857920,1680531979,1673083022,1,-1,1,1,0,0,0,1,0,'','administrator@gitea.searcher.htb',0,0,0,0,1,0,0,0,0,'','auto',0),(2,'cody','cody','','cody@gitea.searcher.htb',0,'enabled','b1f895e8efe070e184e5539bc5d93b362b246db67f3a2b6992f37888cb778e844c0017da8fe89dd784be35da9a337609e82e','pbkdf2',0,0,0,'',0,'','','304b5a2ce88b6d989ea5fae74cc6b3f3','d1db0a75a18e50de754be2aafcad5533','en-US','',1672858006,1680532283,1680532243,1,-1,1,0,0,0,0,1,0,'','cody@gitea.searcher.htb',0,0,0,0,1,0,0,0,0,'','auto',0);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `watch`
--
DROP TABLE IF EXISTS `watch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `watch` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_id` bigint DEFAULT NULL,
`repo_id` bigint DEFAULT NULL,
`mode` smallint NOT NULL DEFAULT '1',
`created_unix` bigint DEFAULT NULL,
`updated_unix` bigint DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_watch_watch` (`user_id`,`repo_id`),
KEY `IDX_watch_updated_unix` (`updated_unix`),
KEY `IDX_watch_created_unix` (`created_unix`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `watch`
--
LOCK TABLES `watch` WRITE;
/*!40000 ALTER TABLE `watch` DISABLE KEYS */;
INSERT INTO `watch` VALUES (3,1,3,1,1671982230,1671982230),(4,2,4,1,1671982230,1671982230);
/*!40000 ALTER TABLE `watch` ENABLE KEYS */;
UNLOCK TABLES;
This is a mysql dump for the gitea
DB
It’s for periodic restoration
Home Directory of root
root@busqueda:~# ll
total 60
drwx------ 9 root root 4096 Apr 3 2023 ./
drwxr-xr-x 19 root root 4096 Mar 1 2023 ../
lrwxrwxrwx 1 root root 9 Feb 20 2023 .bash_history -> /dev/null
-rw-r--r-- 1 root root 3106 Oct 15 2021 .bashrc
drwx------ 3 root root 4096 Mar 1 2023 .cache/
drwx------ 3 root root 4096 Mar 1 2023 .config/
-rw-r----- 1 root root 430 Apr 3 2023 ecosystem.config.js
-rw-r--r-- 1 root root 104 Apr 3 2023 .gitconfig
drwxr-xr-x 3 root root 4096 Mar 1 2023 .local/
-rw------- 1 root root 50 Feb 20 2023 .my.cnf
lrwxrwxrwx 1 root root 9 Feb 20 2023 .mysql_history -> /dev/null
drwxr-xr-x 4 root root 4096 Mar 1 2023 .npm/
drwxr-xr-x 5 root root 4096 nov 27 15:51 .pm2/
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
-rw-r----- 1 root root 33 nov 27 15:51 root.txt
drwxr-xr-x 4 root root 4096 Apr 3 2023 scripts/
drwx------ 3 root root 4096 Mar 1 2023 snap/
ecosystem.config.js
root@busqueda:~# cat ecosystem.config.js
module.exports = {
apps: [
{
name: 'app',
script: '/var/www/app/app.py',
interpreter: 'python3',
exec_mode: 'fork_mode',
autorestart: true,
cwd: '/var/www/app',
error_file: '/root/.pm2/logs/app-error.log',
out_file: '/root/.pm2/logs/app-out.log',
pid_file: '/root/.pm2/pids/app-0.pid',
env: {
HOME: '/home/svc',
},
user: 'svc',
},
],
};
~/Scripts
root@busqueda:~/scripts# ll
total 40
drwxr-xr-x 4 root root 4096 Apr 3 2023 ./
drwx------ 9 root root 4096 Apr 3 2023 ../
drwxr-xr-x 4 www-data www-data 4096 Mar 1 2023 app/
-rwxr-xr-x 1 root root 184 Apr 3 2023 cron.sh*
drwxr-xr-x 5 root root 4096 Apr 3 2023 docker/
-rw-r--r-- 1 root root 17456 Apr 3 2023 gitea_bak.sql
docker
root@busqueda:~/scripts# ll docker
total 24
drwxr-xr-x 5 root root 4096 Apr 3 2023 ./
drwxr-xr-x 4 root root 4096 Apr 3 2023 ../
-rw-r--r-- 1 root root 994 Dec 29 2022 docker-compose.yml
drwxr-xr-x 5 root root 4096 Mar 1 2023 gitea/
drwxr-xr-x 8 lxd root 4096 Nov 27 15:51 mysql/
drwxr-xr-x 4 root root 4096 Mar 1 2023 repositories/
docker-compose.yml
root@busqueda:~/scripts# cat docker/docker-compose.yml
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=115
- USER_GID=121
- GITEA__database__DB_TYPE=mysql
- gitea__database__host=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=yuiu1hoiu4i5ho1uh
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "127.0.0.1:3000:3000"
- "127.0.0.1:222:22"
depends_on:
- db
db:
image: mysql:8
container_name: mysql_db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=jI86kGUuj87guWr3RyF
- MYSQL_USER=gitea
- MYSQL_PASSWORD=yuiu1hoiu4i5ho1uh
- MYSQL_DATABASE=gitea
ports:
- "127.0.0.1:3306:3306"
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql
./gitea:/data
Gitea Instance
root@busqueda:~/scripts/docker/gitea# ll
total 20
drwxr-xr-x 5 root root 4096 Mar 1 2023 ./
drwxr-xr-x 5 root root 4096 Apr 3 2023 ../
drwxr-xr-x 5 115 netdev 4096 Mar 1 2023 git/
drwxr-xr-x 16 115 netdev 4096 Nov 27 21:33 gitea/
drwx------ 2 root root 4096 Mar 1 2023 ssh/
gitea
root@busqueda:~/scripts/docker/gitea# ll gitea
total 64
drwxr-xr-x 16 115 netdev 4096 Nov 27 21:33 ./
drwxr-xr-x 5 root root 4096 Mar 1 2023 ../
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 attachments/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 avatars/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 conf/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 home/
drwx------ 3 115 netdev 4096 Mar 1 2023 indexers/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 jwt/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 log/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 packages/
drwxr-xr-x 3 115 netdev 4096 Mar 1 2023 queues/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 repo-archive/
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 repo-avatars/
drwx------ 17 115 netdev 4096 Nov 27 23:42 sessions/
drwxr-xr-x 4 115 netdev 4096 Nov 27 21:33 tmp/
drwxr-xr-x 4 115 netdev 4096 Nov 27 21:34 uploads/
conf
root@busqueda:~/scripts/docker/gitea/gitea# cd conf ; ll
total 12
drwxr-xr-x 2 115 netdev 4096 Mar 1 2023 ./
drwxr-xr-x 16 115 netdev 4096 Nov 27 21:33 ../
-rw-r--r-- 1 115 netdev 2267 Feb 20 2023 app.ini
app.ini
app.ini
root@busqueda:~/scripts/docker/gitea/gitea/conf# grep -v '^#' app.ini
app_name = gitea: Git with a cup of tea
RUN_MODE = prod
RUN_USER = git
[repository]
ROOT = /data/git/repositories
DEFAULT_PRIVATE = private
[repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
[repository.upload]
TEMP_PATH = /data/gitea/uploads
[server]
APP_DATA_PATH = /data/gitea
DOMAIN = gitea.searcher.htb
SSH_DOMAIN = gitea.searcher.htb
HTTP_PORT = 3000
root_url = http://gitea.searcher.htb/
DISABLE_SSH = false
SSH_PORT = 22
SSH_LISTEN_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = akoc10X0jNr0cssonH_E3QHC6DsOSPq_66A5s-KGVBE
OFFLINE_MODE = false
[database]
PATH = /data/gitea/gitea.db
DB_TYPE = mysql
host = db:3306
NAME = gitea
USER = gitea
PASSWD = yuiu1hoiu4i5ho1uh
LOG_SQL = false
SCHEMA =
SSL_MODE = disable
CHARSET = utf8mb4
[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER = file
[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
ENABLE_FEDERATED_AVATAR = false
[attachment]
PATH = /data/gitea/attachments
[log]
MODE = console
LEVEL = info
ROUTER = console
ROOT_PATH = /data/gitea/log
[security]
INSTALL_LOCK = true
SECRET_KEY =
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2NzI4NTc5MjB9.ZNxPJmC43Gfl1uysb2TRxVRPiF2WbgaPoWEgq10pZFM
PASSWORD_HASH_ALGO = pbkdf2
[service]
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = false
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost
[lfs]
PATH = /data/git/lfs
[mailer]
ENABLED = false
[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true
[repository.pull-request]
DEFAULT_MERGE_STYLE = merge
[repository.signing]
DEFAULT_TRUST_MODEL = committer