summaryrefslogtreecommitdiff
path: root/FixTime/README.md
blob: 957358e65d7c17a8b954a5b15ca2c7123e438269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# **TimeFix โ€“ Kerberos Clock Skew Auto-Fix Toolkit**

When attacking Windows domains (WinRM, Kerberos auth, Impacket, Evil-WinRM, etc.), you may hit the classic:

```
KRB_AP_ERR_SKEW โ€“ Clock skew too great
```

**TimeFix** provides **two small tools (Bash + Python)** that automatically fetch the target machineโ€™s time via its WinRM HTTP `Date:` header and sync your local clock to match it.

Perfect for pentesters doing Kerberos-based operations where precise time alignment is required.

---

## **Features**

* ๐Ÿ”Ž Fetches remote Windows system time from WinRM (port **5985**)
* โฑ Automatically sets your Linux system clock to match the target
* ๐Ÿ’ฅ Instantly fixes Kerberos clock skew errors
* ๐Ÿ›  Includes **two versions**:

  * **Bash script** for quick usage on Linux
  * **Python3 script** for cross-platform usage and cleaner parsing
* ๐Ÿ”’ Gracefully handles failures & can re-enable system time sync

---

## **Usage**

### **Bash Version**

```bash
sudo ./timefix <IP>
```

Example:

```bash
sudo ./fixtime 10.10.10.5
```

---

### **Python Version**

```bash
python3 fixtime.py -u <IP>
```

Example:

```bash
python3 fixtime.py -u http://10.10.10.5
```

---

## **Purpose**

These scripts are designed for lab, CTF, and penetration-testing environments where:

* Kerberos authentication breaks due to clock skew
* NTP is disabled or not configurable
* You need a fast, reliable way to sync with the target host